The problem comes from that I have to send data via bluetooth serial port from a tiny robot to my laptop at baudrate 115200, robot sends 32-bytes packet every 10ms (100 times per second). Transmission works only a few seconds, and then
cat shows nothing. When I decrease frequency to 10 times per second it works smoothly. I suppose that bluetooth serial port rx buffer overflows.
Getting status of serial ports (
ttyS*) via terminal is simple:
sudo cat /proc/tty/driver/serial
Then it shows
serinfo with list of all uarts and info about status and buffers. When I call
sudo cat /proc/tty/drivers
I can see that
rfcomm drivers are available:
rfcomm /dev/rfcomm 216 0-255 serial
And, of course, reading data coming from paired bluetooth device (e.g. via
cat or pipe) is not a problem.
The question is: how to get status of rfcomm serial ports (e.g. Blueotooth SPP devices), especially amount of data in rx/tx buffers? Is this information available somewhere in the
/proc directory like for
ttyS* or could I use totally different way?