I'm trying to establish a serial connection between the PC (Linux 32bit) and an hardware device via Bluetooth.
I've already tested the system using cutecom. It works. Baud 115200, /dev/rfcomm0
etc ...
Now I'm trying to create a client software with Mono to be able to implement a communication protocol. I have tested the SerialPort
Object:
SerialPort mySerial;
mySerial = new SerialPort("/dev/rfcomm0", 115200);
mySerial.Open();
mySerial.ReadTimeout = 1000;
It doesn't work. I've tested the system via a wired serial connection, on /dev/ttyACM0
, and it worked. So I don't think this is the way.
I've tried to use FileStream
and StreamReader
but throws an Exception.IO: WIN32 IO returned 997
.
How use a serial connection with a Bluetooth device with Mono C#?