[gnome-bluetooth] Enabling serial rfcomm in gnome-bluetooth

Bastien Nocera hadess at hadess.net
Thu Jun 4 15:15:24 CEST 2009

On Mon, 2009-06-01 at 15:58 -0500, Jud Craft wrote:
> Hey there.  Fedora 11 preview release, with its new gnome-bluetooth stack.
> I'm trying to use BitPim for one of my cell phones, but BitPim seems
> to only work well with COM ports.  From an article at Ars Technica
> [1], I read how to map a Bluetooth channel to a com-port using
> /etc/bluetooth/rfcomm.conf.  (Under Windows the mapping is done
> automatically, but you must specify it in Linux, I guess).
> Here's my problem:  Bluetooth is not mapping the channel automatically at
> startup, even though I figure that's the purpose of rfcomm.conf.
> Ars Technica mentions that in the Bluetooth properties in GNOME, you
> must check the "Enable Serial" option to activate the rfcomm mappings.
>  However, I know that the Bluetooth stack in GNOME has been changed
> from Bluez to something new (just the generic gnome-bluetooth, I
> guess), and the current Bluetooth Properties does not provide this option.
> Basically, I'm not sure how to enable the rfcomm mappings.  If I
> manually issue a
> command from the console (like "rfcomm connect /dev/rfcomm0 [MAC
> address of phone] [channel number]") I get a "permission denied", and
> if I do that as root, BitPim can see it but not use it.  So I can't do
> it on my own manually; the correct workflow and permissions to do it
> elude me.

There's 2 problems there.

The first one is that gnome-bluetooth doesn't support creating static
"COM ports" (rfcomm devices) for use by applications. This is on
purpose, as this shouldn't be required.

You should file a bug against BitPim for them to add native Bluetooth
support on Linux. They can use Bluez-Python for that:

The problem with creating your rfcomm devices is slightly different, and
more a question for the bluez users mailing-list.

The initscripts in Fedora 11 don't call out to rfcomm, so the
rfcomm.conf file is unused.

If you want a short-term work-around, call rfcomm yourself
in /etc/rc.local and chown the created device to your normal user.

> Does anyone have any ideas?

The "device" part of the rfcomm command is supposed to be a digit, so
'0' will create /dev/rfcomm0. And if you use "connect" it will try to
connect to the device on that channel when the command is issued.

Use something like:
rfcomm bind 0 [Bluetooth address] channel

Make sure the channel is the correct one as well.

But BitPim could do with native Bluetooth support to remove all that
work from the user. It would also be faster, and more reliable to use
in-kernel sockets rather than go through the serial port emulation


More information about the gnome-bluetooth mailing list