title: UWP SerialDevice Communication Property Access Error
body: <p>I am attempting to communicate in UWP over serial ports. My problem is not connecting to the serial port, but rather reading the properties from the serial port and writing to the properties of the serial port. We have used the UWP samples <strong>CustomeSerialDeviceAccess</strong> and <strong>Arduino</strong> as well as our own UWP application, and in each we get the same errors. The first screenshot below was acquired by breaking on the <strong>device.BaudRate = 9600</strong> line and viewing the device properties. The 2nd screenshot was acquired when trying to read/write from/to the BaudRate property of the serial device.</p>
  
  <p>I have not seen any other posts with the exact issue on UWP SerialDevice communication. Any assistance is much appreciated.</p>
  
  <pre><code>string selector = SerialDevice.GetDeviceSelector("COM3");
  DeviceInformationCollection devices = await DeviceInformation.FindAllAsync(selector);
           if (devices.Any())
           {
               DeviceInformation deviceInfo = devices.First();
               device = await SerialDevice.FromIdAsync(deviceInfo.Id);
               //*********************
               device.BaudRate = 9600;
               device.DataBits = 8;
               device.Parity = SerialParity.None;
               device.StopBits = SerialStopBitCount.One;
               device.ReadTimeout = device.WriteTimeout = TimeSpan.FromMilliseconds(1000);
               device.Handshake = SerialHandshake.None;
           }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/kdOrt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kdOrt.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/XkXOf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XkXOf.png" alt="Read Write Error"></a></p>