Automatic rfcomm binding at startup doesn't work

Bug #416056 reported by diazabelar
128
This bug affects 23 people
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
Invalid
Undecided
Unassigned
linux (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Description: Ubuntu Karmic (development branch)
Release: 9.10

The bluetooth modem of my Nokia phone doesn't work in Ubuntu Karmic.
The error message reads:
"Cannot open /dev/rfcomm0: No such file or directory"

ProblemType: Bug
Architecture: i386
Date: Wed Aug 19 19:49:18 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/yelp
Package: yelp 2.27.3-0ubuntu2
ProcEnviron:
 LANG=es_ES.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-6.25-generic
SourcePackage: yelp
Uname: Linux 2.6.31-6-generic i686

Following /etc/bluetooth/rfcomm.conf file is supposed to make the device bind automatically at startup.

rfcomm0 {
 bind yes;
 device XX:XX:XX:XX:XX:XX;
 channel RFCOMM_CHANNEL_NUM;
 comment "Description";
}

This is not the case in Ubuntu Karmic.

Revision history for this message
diazabelar (diazabelar) wrote :
Goutham (gouthambachu)
affects: ubuntu → linux (Ubuntu)
diazabelar (diazabelar)
description: updated
Revision history for this message
koshari (holto2go) wrote :

i just upgraded from jaunty to karmic and i as well when trying to set up my nokia phone via Bluetooth dont get the /dev/rfcomm0 created when i restart bluetooth.

/etc/bluetooth/rfcomm.conf file is

rfcomm0 {
bind yes;
device 00:00:00:00:00:00;
channel 4;
comment "nokia";
}

device id deliberately changed for post.

Revision history for this message
koshari (holto2go) wrote :

actually it should be channel 1 but it still dont create the note,

additionaly when i "sudo /etc/init.d/bluetooth restart"

i dont get the bluetooth restarted message.

Revision history for this message
koshari (holto2go) wrote :

i had to manually make a device with "sudo rfcomm bind 0"

Revision history for this message
tony (tony-mwasoftware) wrote :

I had similar problems. A configuration that had worked find in 9.04 and 8.10 for using my Nokia N95 for dial up Internet access failed miserably after upgrading to 9.10. To fix it, I had to make 4 changes. Looks like the Bluetooth stack has changed...

1. I had to add a semi-colon to the end of the device line in /etc/bluetooth/rfcomm.conf as the lack of one was now deemed a syntax error.

2. After running sdptool I found that the rfcomm channel number for dial up access had mysteriously changed from channel 2 to channel 1.

3. The /dev/rfcomm0 entry is no longer automatically added at boot time. I added

rfcomm bind yes

to /etc/rc.local to work round this and force rfcomm bind at boot time.

4. /usr/sbin/pppd needed to have the suid bit set i.e.

sudo chmod +s /usr/sbin/pppd

Then all worked fine

Revision history for this message
Arek Olek (arekolek) wrote :

Got the same after jaunty->karmic upgrade. In my case adding "rfcomm bind all" to /etc/rc.local was sufficient to solve this one.

I believe I've already done (4.) in the past.
All the configuration lines in rfcomm.conf are ended with semicolon in my case.
And the channel didn't change for me - it's still 4.

My mobile is Nokia N95-2 by the way.

In conclusion, this bug should probably be renamed to "rfcomm.conf configuration is ignored at start-up" or something similar.

Arek Olek (arekolek)
summary: - Cannot open /dev/rfcomm0: No such device
+ Automatic rfcomm binding at startup doesn't work in Karmic
Arek Olek (arekolek)
description: updated
Arek Olek (arekolek)
description: updated
Arek Olek (arekolek)
tags: added: rfcomm
Revision history for this message
mantakbilug (mantakbilug) wrote : Re: Automatic rfcomm binding at startup doesn't work in Karmic

I still can't connect, also following the advice.
I can connect only entering the command

rfcomm connect /dev/rfcomm0 00:00:00:00:00:00 1

at startup.

In this way I can connect by network manager (And not by GnomePPP), after setting the broadband.

This solution has 3 problems:

1)I give the command at every startup
2)When drops the connection, I give the command again
3)I can't control the connection time because there is no counter. In Italy this is very important, because we pre-pay in increments of 15 minutes.

Revision history for this message
Fabio Ornellas (fabio-ornellas) wrote :

The package maintainer did this change:

bluez (4.45-0ubuntu1) karmic; urgency=low

  * debian/bluez.bluetooth.default:
    - Drop. Doesn't do anything now.
  * debian/bluez.bluetooth.init:
    - Drop most calls in this script as now all it serves as
      is to workaround a problem with dbus not being ready early
      enough. Once dbus is started by an upstart service, this
      should be able to be converted to an upstart service too.

As a result, rfcomm is not started automatically anymore. It broke my ppp configuration to connect to 3G network. Now I must manually run:

# rfcomm bind all

every boot in order for things to work out.

It is now up to the package maintainer to decide where to go from here:

1. Restore rfcomm call from inside the bluetooth init script
2. Insert rfcomm call somewhere else
3. Force all users who need to manually add "rfcomm bind all" to initialization scripts manually.

For now, as a quick & dirty trick, edit /etc/rc.local at the end and add this line:

/usr/bin/rfcomm bind all &

before the "exit 0" line.

Hope this helps.

Bye.

Revision history for this message
mantakbilug (mantakbilug) wrote :

I applied the trick, but I get the following error from gnome PPP:

--> Cannot open /dev/rfcomm0: Host is down

What could be not working?

Revision history for this message
Arek Olek (arekolek) wrote :

@mantakbilug: I get that message when bluetooth in Nokia is turned off for example.

Revision history for this message
mantakbilug (mantakbilug) wrote :

No, bluetooth is turned on.

I also redid the pairing and restarted the phone

I do not understand ...

Revision history for this message
Fabio Ornellas (fabio-ornellas) wrote : Re: [Bug 416056] Re: Automatic rfcomm binding at startup doesn't work in Karmic

That's a device binding issue then, Please check the channel. My Nokia E71
chooses an arbitrary bluetooth channel for DUN at startup. Usually it ticks
with channel 4, but it changes sometimes. rfcomm needs to be informed of the
correct channel at rfcomm.conf, it isn't able to find the channel by itself.
This issue however, is not related with this Ubuntu bug in question.
----
Fabio Pugliese Ornellas
E-Mail: <email address hidden>
gTalk: <email address hidden>
ICQ: 6516089
MSN: <email address hidden>
WWW: http://ornellas.apanela.com/

On Sat, Nov 14, 2009 at 10:43, mantakbilug <email address hidden> wrote:

> No, bluetooth is turned on.
>
> I also redid the pairing and restarted the phone
>
>
> I do not understand ...
>
> --
> Automatic rfcomm binding at startup doesn't work in Karmic
> https://bugs.launchpad.net/bugs/416056
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
mantakbilug (mantakbilug) wrote : Re: Automatic rfcomm binding at startup doesn't work in Karmic

OK, I checked the channel and now the modem is recognized. I have another problem, Gnome PPP, at startup of Ubuntu, the first time I try to connect, falls asleep for about 1 minute. From the second time this does not happen anymore. This trick works just as well? Since the settings gnomePPP I have not changed, and before the upgrade worked fine, what should I do?

Revision history for this message
Richard Ulrich (richi-paraeasy) wrote :

I had the same problem after upgrading to karmic. It used to work with hardy/intrepid/jaunty.
The hints on this page solved the issue for me.
Thanks

Changed in bluez (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

Same problem here under Lucid.
/dev/rfcomm0 is not created I must do it manually with a "sudo rfcomm bind 0"

Revision history for this message
Robert Osowiecki (robert-osowiecki) wrote :

I've just tried to connect my Ubuntu via Samsung Avila bluetooth modem for the first time and encountered this bug. I thought I did something wrong, discovered manual rfcomm connect command, and after that Network Manager discovered the modem and connected to my moblie provider nicely and quickly :)

My other problem is that I often turn off bluetooth in my laptop and turn it on only when needed, so putting bluetooth connection in startup scripts is not a good solution for me.

papukaija (papukaija)
summary: - Automatic rfcomm binding at startup doesn't work in Karmic
+ Automatic rfcomm binding at startup doesn't work
tags: added: karmic
removed: rfcomm
tags: added: lucid
Revision history for this message
gionnico (gionnico) wrote :

http://ubuntuforums.org/showthread.php?t=1449940

This tell the solution!

Devs why the heck did you forgot those 2 lines in the script???

/etc/init.d/bluetooth
start)
# added to bind rfcomm channels in rfcomm.conf automatically
rfcomm bind all
stop)
rfrcomm release all

-_-

Revision history for this message
Brad Figg (brad-figg) wrote : Unsupported series, setting status to "Won't Fix".

This bug was filed against a series that is no longer supported and so is being marked as Won't Fix. If this issue still exists in a supported series, please file a new bug.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

This is reported against an old version of Ubuntu and many things has changed since then. Because of that we won't fix this issue however if this behavior repeats on a modern version please fill a bug report against it and we will take it from there.

Changed in bluez (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.