LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-11-2016, 03:53 AM   #1
badbetty
Member
 
Registered: Jan 2014
Posts: 158

Rep: Reputation: Disabled
Slackware 64bit 14.2 usb bluetooth adapter not automatically detected


Good morning

When the computer starts up *without* the usb bluetooth adapter inserted, the [executable] rc.bluetooth is called but nothing further happens; no bluetooth services at all are started or left running. As far as I can tell from checking the script (-d /sys/class/bluetooth), it is because /sys/class/bluetooth directory does not exist at that moment.

Inserting the bluetooth adapter causes the /sys/class/bluetooth directory to be created (I presume from udev intervention ?).

Removing it *does not* appear to cause the directory to be deleted - why is that by the way ?

Call the rc.bluetooth script manually and now everything starts up and appears to leave all the services running (because the sys/class/bluetooth directory is present) even if the adapter is removed.

From then on, inserting and reinserting the bluetooth adapter works just fine.

The solution then, to the bluetooth services not starting up at boot time, is to ensure the adapter is in the machine at boot time.

Ideally, however, it would be better that the bluetooth services would start at boot and the action of plugging in the adapter at some point later would be picked up. This is not the case it would appear.

It would appear that the /sys/class/bluetooth directory is fundamental to this 'issue' and because the action of removing the adapter appears to not cause the directory to be removed (and the services can still run), is it fundamental for the rc.bluetooth script to check for its existence at all ?

Thank you for comments, info, insight etc.

Peace and best wishes
 
Old 08-11-2016, 06:10 AM   #2
badbetty
Member
 
Registered: Jan 2014
Posts: 158

Original Poster
Rep: Reputation: Disabled
ok - looking at the matter further, in the /etc/rc.d/rc.bluetooth, the key line as mentioned earlier appears to be:
"if [ -d /sys/class/bluetooth ]; then..."

All the services are called within this condition block. With the fact that /sys/class/bluetooth does not exist at boot time (unless bluetooth devices are detected at boot), no services will be started, meaning that when a USB adapter is plugged in for instance (with the associated created on the bluetooth dir in /sys/class), the rc.bluetooth script will have to be run again but manually before it will all work.

From that time on, all will be fine until a reboot.

I took the opportunity to comment out the above 'if' condition and just leave the contained lines to run. It seemed to sort everything out.

Therefore I am left asking for confirmation if that 'if' condition is required or not; is there some fundamental reason for checking for the bluetooth directory before the other lines of the script (the bluetooth services startup) are actioned.

If anyone can help or point to where to ask why this rc script was set up with this check, please let me know.

It does not appear that starting the bluetooth services without the existence of that directory at startup causes any issues, *but* I am not sure !
 
2 members found this post helpful.
  


Reply

Tags
adapter, bluetooth, usb



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bluetooth adapter not detected after resume charles95 Slackware 5 08-26-2013 01:09 PM
Bluetooth not working on FC6 with Targus USB bluetooth adapter mikevicious Linux - Software 1 12-11-2009 09:03 AM
USB Bluetooth Adapter bassplayer69 Linux - Hardware 2 06-24-2008 10:36 PM
Bluetooth 2.0 USB adapter MasterC Linux - Laptop and Netbook 3 04-27-2007 03:31 PM
bluetooth usb adapter _gnomm Slackware 36 06-15-2006 08:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration