Date: Mon, 17 Oct 2005 12:45:09 +0400 From: Vladimir Grebenschikov <vova@fbsd.ru> To: Panagiotis Astithas <past@ebs.gr> Cc: freebsd-bluetooth@freebsd.org, imp@freebsd.org Subject: Re: [RFC] rc.d integration for the bluetooth subsystem Message-ID: <1129538709.1250.10.camel@localhost> In-Reply-To: <43534AD7.5070809@ebs.gr> References: <43519460.1090605@ebs.gr> <1129491219.1616.18.camel@localhost> <43534AD7.5070809@ebs.gr>
next in thread | previous in thread | raw e-mail | index | archive | help
=F7 =D0=CE, 17/10/2005 =D7 09:55 +0300, Panagiotis Astithas =D0=C9=DB=C5=D4= : > Vladimir Grebenschikov wrote: > > =F7 =D7=D3, 16/10/2005 =D7 02:44 +0300, Panagiotis Astithas =D0=C9=DB= =C5=D4: > >=20 > >>Hi all, > >> > >>I've been playing with integrating the bluetooth subsystem into our rc.= d=20 > >> infrastructure and I'd like to submit the results of my efforts for=20 > >>review. My testing has been centered around my USB bluetooth dongle and= =20 > >>I know that it works, but I suppose other bluetooth devices should work= =20 > >>as well. I have taken the existing rc.bluetooth script (that is not=20 > >>installed by default) and converted it to rc.d, renaming it as=20 > >>'bluetooth'. I also added a couple of other scripts for hcsecd and sdpd= ,=20 > >>that are started from bluetooth, but can also function independently, i= d=20 > >>so desired. Finally I have added a devd configuration file that makes=20 > >>sure the bluetooth script gets started on insertion and removal of the=20 > >>USB dongle. > >> > >>With these changes, when I plug in my USB bluetooth dongle, all the=20 > >>necessary initialization happens behind the scenes and I can start usin= g=20 > >>my bluetooth peripherals right away. When I unplug the dongle all the=20 > >>services stop and the necessary shutdown operations are performed on th= e=20 > >>bluetooth stack. There is still some work left, like specifying=20 > >>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= =20 > >>add its contents to /etc/devd.conf > >>- add a line in /etc/rc.conf with: > >> bluetooth_enable=3D"YES" > >> > >>In an eventual merge into the base system the devd configuration should= =20 > >>be merged into /etc/devd.conf and /etc/defaults/rc.conf should contain=20 > >>the following line instead: > >> bluetooth_enable=3D"NO" > >> > >>I'd appreciate any comments you may have. > >=20 > >=20 > > Great ! It just works, Thank you. > >=20 > > I've added bthidd script (in attachment) to start human interface daemo= n > > (bt mouse in my case). > >=20 > > Probably it should load vkbd module, but I am not sure now. >=20 > Thanks, I don't have a HID device so I forgot all about them. Minor nits: > - the rcvar line is not necessary if you don't have/need a=20 > bthidd_enable=3D"YES" in rc.conf Yes, It was my intent. Just because I think not all users need bthidd running with bluetooth stack. Probably there should be some interface between sdpd and devd to report new BT device found. In this case bthidd should be stared on mouse or keyboard appeared in range. Warner, Maksim what you think about the idea ? > - bthidd shoud probably REQUIRE: hcsecd, since I suppose the=20 > communication wouldn't have been established without authentication No, It is not strictly necessary. My mouse works well without authentication. It learns once peer and then do not talk with other devices. > Thanks again, > Panagiotis --=20 Vladimir B. Grebenschikov vova@fbsd.ru
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1129538709.1250.10.camel>