Bug 514698

Summary: After upgrade to bluez-4.42-1 /etc/init.d/bluetooth fails on call to hid2hci
Product: [Fedora] Fedora Reporter: Juan Antonio Martinez <jonsito>
Component: bluezAssignee: Bastien Nocera <bnocera>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: bnocera, dwmw2, jsmith.fedora, marcel, matthias, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 4.42-3.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-11 22:32:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juan Antonio Martinez 2009-07-30 09:54:17 UTC
Description of problem:
After upgrade to bluez-4.42-1 /etc/init.d/bluetooth fails on call to hid2hci

Version-Release number of selected component (if applicable):
bluez-4.42-1

How reproducible:
Allways.

Steps to Reproduce:
1. configure properly /etc/sysconfig/bluetooth to handle hid bluetooth devices
2. execute "service bluetooth restart"
3.
  
Actual results:
bluetooth icon at gnome-panel becomes deactivated. No way to activate icon

Expected results:
bluetooth icon should work properly

Additional info:
Tested on a Dell studio 1737 with a usb bluetooth with id: 413c:8158

Looking at hid2hci page I can see that commandline options have hanged:
/etc/init.d/bluetooth shows like:
.....
[ "$HID2HCI_ENABLE" = "true" ] && hid2hci --tohci > /dev/null 2>&1 || :
        touch /var/lock/subsys/bluetooth
.....
[ "$HID2HCI_UNDO" = "true" ] && hid2hci --tohid > /dev/null 2>&1 || :
        killproc bluetoothd

but "--tohci" and "--tohid" cmdline options no longer exists

Working cmdline option for me is:

hid2hci -r hci -m dell -v 413c -p 8158 ( on start function )
hid2hci -r hid -m dell -v 413c -p 8158 ( on stop function )

So need to change init scripts and provide a propper way to 
handle hid2hci cmdline switches and discovering devices

An alternate way to handle this issue could be the one reported at bug 478731

Comment 1 Juan Antonio Martinez 2009-07-30 10:33:53 UTC
Looking at git source tree, i can see that hid2hci code was changed at version 4.38, by removing hardwired device ID's and supporting new cmdline options

At revision 4.40 support for udev and dell switches was provided 

Fedora updates I've received are 4.37 and 4.42. Current release is 4.46

So IMHO the best way to handle this issue is to provide proper udev rules to handle hid bluetooth devices

Comment 2 Juan Antonio Martinez 2009-07-30 15:56:00 UTC
Seems that development src.rpm files has also same error...

Easy patch to allow bluetooth hid devices to be handled by udev: (thanks
to debian bugzilla's people :-)

Get bluez-4.46-3.fc12.src.rpm from fedora development repository
- Adjust specfile to create a /etc/udev/rules.d/62-bluetooth-hid2hci.rules
  from scripts/bluetooth-hid2hci.rules file in source tree
- remove /etc/sysconfig/bluetooth from specfile and bluetooth.conf file from
  rpm package
- get bluetooth.init file and remove references to hid2hci

Basically changes are the same than debian people do: instead of
/etc/init.d/bluetooth script, let udev handle hid2hci

Please do not hessitate on asking me for testing. Thanks
Juan Antonio

Comment 3 Juan Antonio Martinez 2009-07-31 12:20:20 UTC
OK, I did the work :-(

Take a look at:
oasis.dit.upm.es/~jantonio/personal/privado/bluez-4.46-2.fc11.src.rpm

Works fine for me, but unsure on other non-hid bluetooth devices

Hope this helps. Cheers

Juan Antonio

Comment 4 Fedora Update System 2009-08-03 12:51:12 UTC
bluez-4.42-2.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/bluez-4.42-2.fc11

Comment 5 Juan Antonio Martinez 2009-08-03 13:47:52 UTC
from submitted bluez-4.42-2.fc11.i586.rpm
.....
/etc/sysconfig/modules/bluez-uinput.modules
/etc/udev/bluetooth-hid2hci.rules
/etc/udev/rules.d/97-bluetooth-serial.rules
.....

Seems to me that bluetooth-hid2hci.rules parent dir should be
/etc/udev/rules.d/. ¿is this correct?
Juan Antonio

Comment 6 Fedora Update System 2009-08-03 14:23:34 UTC
bluez-4.42-3.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/bluez-4.42-3.fc11

Comment 7 Fedora Update System 2009-08-03 19:21:49 UTC
bluez-4.42-2.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update bluez'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8228

Comment 8 Fedora Update System 2009-08-05 00:28:21 UTC
bluez-4.42-3.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update bluez'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8258

Comment 9 Matthias Saou 2009-08-06 11:21:52 UTC
I had the exact same problem on a Dell Latitude E4200. The new packages from updates-testing fix the problem.

Comment 10 Fedora Update System 2009-08-11 11:49:49 UTC
bluez-4.42-4.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/bluez-4.42-4.fc11

Comment 11 Fedora Update System 2009-08-11 22:31:10 UTC
bluez-4.42-4.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update bluez'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8461

Comment 12 Fedora Update System 2009-08-11 22:32:29 UTC
bluez-4.42-3.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.