You are not logged in.

#1 2017-01-06 16:26:58

voobscout
Member
Registered: 2014-12-05
Posts: 9

How to auto-connect bluetooth RFCOMM device when in-range?

Here's the gist of it - I got a bluetooth thermal printer and I would like to "rfcomm bind 0 <thermal printer BT MAC>" whenever the device is in range or powered up.

# cat /etc/conf.d/bluetooth.conf
RFCOMM_ENABLE="true"

# cat /etc/bluetooth/rfcomm.conf
rfcomm0 {
     bind yes;
     device 00:19:5D:B1:52:65;
     channel 1;
     comment "Thermal receipt printer QS-5806";
}

What has been discovered so far is that the above settings in config files have absolutely ZERO effect, the rfcomm binary doesn't even try to read it's config (as promised in man pages) and the bluetoothd doesn't care about RFCOMM_ENABLE setting either.

Everything works manually just great:

# rfcomm bind 0 00:19:5D:B1:52:65
# echo "Printer Test\n\n" > /dev/rfcomm0


Any help and/or thoughts on this are greatly appreciated!

Offline

Board footer

Powered by FluxBB