FORUMS

Analysis & Opinion

[ CM 10.1 ][ PATCH ] UHID driver for BT keyboards, e.g. the iGo Stowaway

41 posts
Thanks Meter: 59
 
Post Reply Subscribe to Thread Email Thread
If you have tried to use a Bluetooth keyboard like the iGo Stowaway with CyanogenMod 10.1, you have likely been disappointed that it didn't work. The exact manifestation of the problem is that the keyboard pairs fine with the phone, but fails to connect to it afterwards. On inspection, the logs show error messages related to the userspace HID driver obviously missing.

Code:
E/bt-btif ( 3151): bta_hh_co_open: Error: failed to open uhid, err:No such file or directory
W/bt-btif ( 3151): BTA_HH_OPEN_EVT: Error, failed to find the uhid driver...
E/bt-btif ( 3151): uhid_write: Cannot write to uhid:Bad file number
Someone more knowledgeable might explain exactly why the UHID driver is missing from the current kernel(s), but I noticed that the driver has been backported for the ZTE's MSM7x27 kernel on GitHub by plaguedbypenguins for use in KonstaT's CM 10.1 port for the ZTE Blade. So, I decided to give it a try and, with a couple of cosmetic adaptations, the patch applied cleanly to the Sony MSM8x60 source code. It also builds without error and, most importantly, does what's it supposed to do: at least the iGo Stowaway keyboard that I have now works flawlessly with CyanogenMod 10.1.

To make it simpler for anyone interested, I've forked and patched the kernel source code here. And this in particular is the commited patch in question. Let me emphasize once more that my own input into the patch is effectively null, so all credit and thanks should go to the original developers!

Since I'm more a wannabe developer, I'd be very grateful if people who have good experience, especially with the kernel, take a look and see if there isn't something wrong under the surface, despite the fact that the patch applies and builds cleanly and seems to do the job. I guess @tilal6991 might be especially interested. I suppose that if all is OK, the patch might as well be merged in the CM 10.1 code in time for the last CM 10.1.3 release. Speaking of that, I am still having problems building the CM 10.2 code, so haven't even blindly tried the patch on it yet.
The Following 5 Users Say Thank You to kerberizer For This Useful Post: [ View ]
 
 
13th August 2013, 06:27 PM |#2  
Recognized Developer
Thanks Meter: 2,579
 
More
Quote:
Originally Posted by kerberizer

If you have tried to use a Bluetooth keyboard like the iGo Stowaway with CyanogenMod 10.1, you have likely been disappointed that it didn't work. The exact manifestation of the problem is that the keyboard pairs fine with the phone, but fails to connect to it afterwards. On inspection, the logs show error messages related to the userspace HID driver obviously missing.

Code:
E/bt-btif ( 3151): bta_hh_co_open: Error: failed to open uhid, err:No such file or directory
W/bt-btif ( 3151): BTA_HH_OPEN_EVT: Error, failed to find the uhid driver...
E/bt-btif ( 3151): uhid_write: Cannot write to uhid:Bad file number
Someone more knowledgeable might explain exactly why the UHID driver is missing from the current kernel(s), but I noticed that the driver has been backported for the ZTE's MSM7x27 kernel on GitHub by plaguedbypenguins for use in KonstaT's CM 10.1 port for the ZTE Blade. So, I decided to give it a try and, with a couple of cosmetic adaptations, the patch applied cleanly to the Sony MSM8x60 source code. It also builds without error and, most importantly, does what's it supposed to do: at least the iGo Stowaway keyboard that I have now works flawlessly with CyanogenMod 10.1.

To make it simpler for anyone interested, I've forked and patched the kernel source code here. And this in particular is the commited patch in question. Let me emphasize once more that my own input into the patch is effectively null, so all credit and thanks should go to the original developers!

Since I'm more a wannabe developer, I'd be very grateful if people who have good experience, especially with the kernel, take a look and see if there isn't something wrong under the surface, despite the fact that the patch applies and builds cleanly and seems to do the job. I guess @tilal6991 might be especially interested. I suppose that if all is OK, the patch might as well be merged in the CM 10.1 code in time for the last CM 10.1.3 release. Speaking of that, I am still having problems building the CM 10.2 code, so haven't even blindly tried the patch on it yet.

Well done! This is the sort of work I really like seeing - a person taking the initiative and fixing a problem themselves. I will try and get this patch included in 10.2 ASAP (10.1 is closed for submissions now).
The Following 2 Users Say Thank You to tilal6991 For This Useful Post: [ View ]
14th August 2013, 07:14 PM |#3  
kerberizer's Avatar
OP Member
Thanks Meter: 59
 
More
Quote:
Originally Posted by tilal6991

I will try and get this patch included in 10.2 ASAP (10.1 is closed for submissions now).

Finally managed to build a working CM 10.2 ROM (note to self: when replacing proprietary binaries, "make clean" is your best friend) and I can confirm that at least my BT keyboard works perfectly with it. Thanks a lot for reacting so fast, indeed!
The Following 2 Users Say Thank You to kerberizer For This Useful Post: [ View ]
9th May 2015, 02:51 AM |#4  
Junior Member
Thanks Meter: 1
 
More
Bluetooth Keyboard doest work
maybe the UHID driver is missing from the current kernel
logcat:
Error: failed to open uhid, err:No such file or directory
Post Reply Subscribe to Thread

Tags
bluetooth, bluetooth keyboard, cm 10.1, patch, stowaway thinkoutside
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes