1
Vote

Rework BluetoothSerial.StartRead() for device compatibility.

description

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.

comments

wrote Feb 10, 2008 at 11:21 PM

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 10, 2008 at 11:21 PM

wrote Feb 11, 2008 at 2:56 PM

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

wrote Feb 11, 2008 at 3:44 PM

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

wrote Feb 12, 2013 at 11:18 PM