I have written a udev rule and initialisation script for PCMCIA Bluetooth devices so that they automatically attach and detach to the hci device. This enables the removal of the PCMCIA cardmgr without functionality loss. Currently the script sits in /etc/hotplug, and utilises the hotplug.functions, it does not really depend on them though.
Created attachment 89458 [details] udev PCMCIA Bluetooth rules Use in conjunction with the pcmcia.bluetooth script
Created attachment 89459 [details] Script to take handle PCMCIA Bluetooth devices
If you could rewrite this, so that this is not a hotplug script, that would be great, as we are trying to get rid of the hotplug package entirely. Also, your udev rules look like you will have to constantly be adding to them as new devices are built. Isn't there some generic way you can detect a bluetooth device?
(In reply to comment #3) > If you could rewrite this, so that this is not a hotplug script, that would > be great, as we are trying to get rid of the hotplug package entirely. Sure, any suggestion for an appropriate location? > > Also, your udev rules look like you will have to constantly be adding to them > as new devices are built. Isn't there some generic way you can detect > a bluetooth device? > Unfortunately not. The func_id is usually 0x02 (serial device), this is fine for getting the UART going but nothing else. There seems to be no common identifier for PCMCIA Bluetooth devices :(
(In reply to comment #4) > (In reply to comment #3) > > If you could rewrite this, so that this is not a hotplug script, that would > > be great, as we are trying to get rid of the hotplug package entirely. > Sure, any suggestion for an appropriate location? /lib/udev is where udev scripts go. > > Also, your udev rules look like you will have to constantly be adding to them > > as new devices are built. Isn't there some generic way you can detect > > a bluetooth device? > > > Unfortunately not. The func_id is usually 0x02 (serial device), this is fine > for getting the UART going but nothing else. There seems to be no common > identifier for PCMCIA Bluetooth devices :( Ick. These should probably go into the bluetooth package then, I don't think we want them in the general udev package.
(In reply to comment #5) > (In reply to comment #4) > > (In reply to comment #3) > > > If you could rewrite this, so that this is not a hotplug script, that would > > > be great, as we are trying to get rid of the hotplug package entirely. > > Sure, any suggestion for an appropriate location? > > /lib/udev is where udev scripts go. Thought it might be.. > > > > Also, your udev rules look like you will have to constantly be adding to them > > > as new devices are built. Isn't there some generic way you can detect > > > a bluetooth device? > > > > > Unfortunately not. The func_id is usually 0x02 (serial device), this is fine > > for getting the UART going but nothing else. There seems to be no common > > identifier for PCMCIA Bluetooth devices :( > > Ick. These should probably go into the bluetooth package then, I don't think > we want them in the general udev package. Agreed. They are rather dependant on having the bluetooth services up and running anyway. Also if the bluetooth services are not running; should it soft-fail, start the bluetooth service,...?
I'm afraid I haven't been able to get on-line for a couple of weeks... I've noticed bug #137590 so something has obviously gone in now. I have changed my scripts to remove the hotplug dependency, so if they are still wanted, I'll attach them to this bug.