Bluetooth serial device transfer for Android / Xamarin with empty output

I use Xamarin.Android to connect to a Bluetooth device that uses a serial port profile to transmit to the optical sensor. The device is intended for use with Windows via the COM port, but it (presumably) can work with any Bluetooth device.

I can configure the device and connect to it using CreateRfcommSocketToServiceRecord () and not have pairing problems.

However, when I connect to the device’s socket, it immediately starts receiving 0xFF from the Bluetooth connection, even if nothing is written to the output stream. I can correctly write the output stream and read from the other end, but the 0xFF stream does not stop until I close the socket.

I used several native Android apps to connect to the device, and they also have this problem.

When I connect to the device via Windows through the COM port, the device sends and receives data normally without any problems.

Has anyone else experienced this issue with a Bluetooth serial adapter before on Android - and if so, was there a solution?


The table of specifications for the device can be found here: http://www.probe-tec.com/Documents/997-419%20Probe-Tec%20Product%20Sheet%20(2).pdf (It is designed to communicate with smart power meters) .

+4
source share

Source: https://habr.com/ru/post/1535810/


All Articles