Rework BluetoothSerial.StartRead() for device compatibility.


Checking for the number of bytes to be read to be greater than 0 did not work with the HTC Mogul's (PPC-6800) built-in Assisted-GPS device. Find another way to check for this while still addressing memory concerns.


wrote Feb 11, 2008 at 12:21 AM

Rather than checking for SerialPort.BytesToRead > 0 before attempting to read, a line is read and checked to see that it is not null and not an empty string be for proceeding.

wrote Feb 11, 2008 at 12:21 AM

wrote Feb 11, 2008 at 3:56 PM

Added SerialPort.DtrEnable = true before opening the serial port.

wrote Feb 11, 2008 at 4:44 PM

Added Thread.Sleep(100) after each line is read. This seems to have improved serial port stability.

wrote Feb 13, 2013 at 12:18 AM