private async void GetFreq() { var aqsFilter = SerialDevice.GetDeviceSelector(R2Device.PortName); var devices = await DeviceInformation.FindAllAsync(aqsFilter); if (devices.Any()) { var deviceId = devices.First().Id; using (var serialPort = await SerialDevice.FromIdAsync(deviceId)) { if (serialPort != null) { Frequency = await R2.GetFrequency(serialPort); } } } }