Problems with bluetooth keyboard
#1
Hi,

I have a bluetooth keyboard and I've been able to make it work using

(before hcitool scan I have to press the "reset" button in the keyboard)
hcitool scan
hidd --connect aa:bb:cc:dd:ee:ff (obviusly replacing aa:bb:cc:dd:ee:ff with the address of my keyboard)

but it only works till the next reboot. I've seen various methods to make it permanent, but in 10.04 none of them works for me (for example, in this link https://help.ubuntu.com/community/BluetoothSetup says that editing /etc/default/bluetooth and adding the module hidp in /etc/modules is the way to do it, but it 10.04 this file doesn't exists anymore, and I've tried to add it without any success). Also I can't add hidd --connect aa:bb:cc:dd:ee:ff directly to rc scripts because it doesn't work until I press the "reset" button in the keyboard and make a hcitool scan.

Another question which is not directly related but whose answer can be useful is : how can I run programs which require X windows from XBMC terminals? for example : I've seen that in various sources it says that using blueman-applet can help to configure bluetooth devices, but I think it's GTK based (I've tested and obviously it doesn't work), so... how can I run it in XBMC? I would be also interested in how to run chromium (to add it to XBMC using some launcher).

Thank you in advance
Reply
#2
Finally it works! In case someone has the same problem, here is the solution (at least the one it works for me using Ubuntu 10.04).

hcitool scan ( if you don't know the address of the keyboard you want to use)

pyhton /usr/share/doc/bluez/examples/simple-agent hci0 xx:xx:xx:xx:xx:xx (where xx:xx:xx:xx:xx:xx is the address)

Once that’s done, simple-agent should take a few seconds and respond "Release” and then "New device (/org/bluez/nnnnn/hci0/dev_xx_xx_xx_xx_xx_xx)”. Then you must type :

sudo dbus-send –system –dest=org.bluez –print-reply /org/bluez/nnnnn/hci0/dev_xx_xx_xx_xx_xx_xx org.bluez.Input.Connect

The device path will probably change, specifically the "nnnnn" part. In the next boot if you type :

pyhton /usr/share/doc/bluez/examples/simple-agent hci0

it prompts for permission to connect, so you have to type yes; I've changed the python script to avoid this part and I've added the line before to rc.local . Now it works as a normal keyboard will do after every reboot/shutdown.
Reply
#3
Hi,

I followed your post and it went exactly as you described and I was hopefull all was going to be well but I've got stuck at the last bit. I'm running xbmc live and have just come across from a windows mediaportal setup so im a little rusty on linux still.

I entered ctrl+alt+f2 then typed out all your commands and paired got to the point where it asked for authorisation and I typed yes. any further typing on the keyboard simply causes the PC to give authorisation again.

It sounds like you have possible have encounterred this also but I cant figure out your description of how to get it working.

"I've changed the python script to avoid this part and I've added the line before to rc.local . Now it works as a normal keyboard will do after every reboot/shutdown.
2011-03-31 07:47 "

I found rc.local by using putty and wincp but could change it and didnt really know what i was to be changing.

I think im rambling as im knackered from trying to get this to work for hours now but hopefully this makes sense.

by the way I also found this patch which looks really really good bu again I couldnt get it to work. its worth a look - let me know if you get it working,

http://trac.xbmc.org/ticket/11003

Ticket #11003 (new Feature Requests)

By the way how on earth did you manage to figure that code out? impressed.

Many Thanks,

Hugh
Reply

Logout Mark Read Team Forum Stats Members Help
Problems with bluetooth keyboard0