Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bluetooth startup and udev timing issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 459

PostPosted: Tue Dec 20, 2011 10:56 am    Post subject: bluetooth startup and udev timing issue Reply with quote

I have a usb-based bluetooth dongle.
When the pc is started, the bluetooth service is also started by dynamic runlevel 'hotplugged'
However, after the startup, when I execute 'hcitool dev', no device is visible.
After some investigation, I found that in the case that bluetooth fails after startup, that lsmod shows the module rfcomm to be loaded, but that the module 'bnep' is missing.

If I then execute on the command line
Code:
udevadm trigger --subsystem-match=bluetooth --action=add

then I see that the module 'bnep' gets loaded, after which the device is detected by 'hcitool dev'.

Since this does not happen at each reboot, I assume there is some timing issue between udev and the bluetooth device.

I am thinking about changing /etc/init.d/bluetooth to

Code:

        ebegin "Starting Bluetooth"

        udevadm trigger --subsystem-match=bluetooth --action=add
        # the line above has trouble loading all needed modules. Try to catch that using settle
        udevadm settle
        eend $?


but maybe there is a better way (e.g. changing the depend() statement). Any suggestions ?
Back to top
View user's profile Send private message
ultraincognito
Guru
Guru


Joined: 03 Jun 2011
Posts: 346
Location: Ukraine

PostPosted: Tue Dec 20, 2011 5:15 pm    Post subject: Reply with quote

I store the service /etc/init.d/bluetooth in the 'default' runlevel. And you?
Back to top
View user's profile Send private message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 459

PostPosted: Thu Dec 22, 2011 12:46 am    Post subject: Reply with quote

It is just autostarted with hotplugging because the presence of the usb bluetooth dongle is detected.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum