[RFC] rc.d integration for the bluetooth subsystem

Vladimir Grebenschikov vova at fbsd.ru
Mon Oct 17 01:22:40 PDT 2005


В вс, 16/10/2005 в 02:44 +0300, Panagiotis Astithas пишет:
> Hi all,
> 
> I've been playing with integrating the bluetooth subsystem into our rc.d 
>   infrastructure and I'd like to submit the results of my efforts for 
> review. My testing has been centered around my USB bluetooth dongle and 
> I know that it works, but I suppose other bluetooth devices should work 
> as well. I have taken the existing rc.bluetooth script (that is not 
> installed by default) and converted it to rc.d, renaming it as 
> 'bluetooth'. I also added a couple of other scripts for hcsecd and sdpd, 
> that are started from bluetooth, but can also function independently, id 
> so desired. Finally I have added a devd configuration file that makes 
> sure the bluetooth script gets started on insertion and removal of the 
> USB dongle.
> 
> With these changes, when I plug in my USB bluetooth dongle, all the 
> necessary initialization happens behind the scenes and I can start using 
> my bluetooth peripherals right away. When I unplug the dongle all the 
> services stop and the necessary shutdown operations are performed on the 
> bluetooth stack. There is still some work left, like specifying 
> different flags for sdpd & hcsecd, but the defaults work fine.
> 
> In order to test this stuff you have to:
> 
> - copy bluetooth, hcsecd and sdpd into /etc/rc.d
> - copy ubt.conf into /usr/local/etc/devd (creating it if necessary), or 
> add its contents to /etc/devd.conf
> - add a line in /etc/rc.conf with:
>    bluetooth_enable="YES"
> 
> In an eventual merge into the base system the devd configuration should 
> be merged into /etc/devd.conf and /etc/defaults/rc.conf should contain 
> the following line instead:
>    bluetooth_enable="NO"
> 
> I'd appreciate any comments you may have.

Great ! It just works, Thank you.

I've added bthidd script (in attachment) to start human interface daemon
(bt mouse in my case).

Probably it should load vkbd module, but I am not sure now.

> Cheers,
> Panagiotis

-- 
Vladimir B. Grebenschikov
vova at fbsd.ru


More information about the freebsd-bluetooth mailing list