1

I'm trying to remotely connect to a system via Bluetooth but am running into problems. Here's what I'm trying to do...

On the remote device I'd like to have the following running: rfcomm -r watch 0 3 getty -L {} 9600

What that does is: Watch on the bluetooth device "0" for an rfcomm connection on channel 3. When one occurs, run getty -L {} 9600 and replace the "{}" with the device created. (usually /dev/rfcomm0 in this case)

I then should be able to connect to the remote device by running on my laptop: rfcomm connect 0 11:22:33:44:55:66 3 (tells it to use device "0" to connect to the bluetooth address "11:22:33:44:55:66" on channel 3) I then should get a serial console on the remote device by typing screen /dev/rfcomm0.

The problem...

Everything should be working fine except NetworkManager on my laptop somehow "sees" the connection and tries to probe it as if it was a modem. It sends AT+GCAP strings and ~x�~ but the remote end is running getty and is expecting login credentials.

I'm able to get it to work by making the rfcomm0 connection first:

remote$  rfcomm -r watch 0 3
laptop$  rfcomm connect 0 11:22:33:44:55:66 3

wait about 60 seconds for the NetworkManger to stop probing /dev/rfcomm0

remote$  getty -L rfcomm0 9600
laptop$  screen /dev/rfcomm0 9600

However, in order to do this, I already need to have console access to the remote device in order to run the getty comamnd

Question

So, is there any way to tell NetworkManager to ignore /dev/rfcomm or to tell it to not probe the device?

Tim Tisdall
  • 623
  • 1
  • 5
  • 17

1 Answers1

2

This is a very old question, but in case anyone ends up here via Google, a straightforward solution that worked for me was to create a file /etc/udev/rules.d/99-rfcomm.rules with the following content:

# ignore rfcomm0 device for now
KERNEL=="rfcomm0", ENV{ID_MM_DEVICE_IGNORE}="1"

ModemManager will ignore the device in the future. Note: this is a catch-all rule that will match any rfcomm device, so if you actually want to use one as a modem in the future, you would have to disable the rule again.