maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Accessories (https://talk.maemo.org/forumdisplay.php?f=17)
-   -   how to get bluetooth pc105 keyboards to work with N900 (https://talk.maemo.org/showthread.php?t=38372)

cardiff-blues 2010-01-31 22:41

Re: how to get bluetooth pc105 keyboards to work with N900
 
1 Attachment(s)
ok here goes. By the way, i havent had the keyboard working at all.
Hopefully i have managed to attach the file correctly.

jtkim 2010-02-01 02:03

Re: how to get bluetooth pc105 keyboards to work with N900
 
1 Attachment(s)
Quote:

Originally Posted by qobi (Post 504305)
Can people run the following command:

$ tar cf /tmp/bluetooth.tar /var/lib/bluetooth

(ignore the errors that it gives) and send me the /tmp/bluetooth.tar
file. I need samples both from people who have been able to connect to bluetooth keyboards under 51 as well as people who have not. (If you haven't yet posted whether or not you are successful, let me know when you send this file.)

Ok -- please find my /var/lib/bluetooth archive attached. I've tried again this weekend, no success so far. Just out of interest -- what are you looking for?

Best regards, Jan

JoHnY 2010-02-01 05:32

Re: how to get bluetooth pc105 keyboards to work with N900
 
1 Attachment(s)
Quote:

Originally Posted by qobi (Post 504305)
Can people run the following command:

$ tar cf /tmp/bluetooth.tar /var/lib/bluetooth

(ignore the errors that it gives) and send me the /tmp/bluetooth.tar
file. I need samples both from people who have been able to connect to bluetooth keyboards under 51 as well as people who have not. (If you haven't yet posted whether or not you are successful, let me know when you send this file.)

here's mine

JoHnY 2010-02-01 15:17

Re: how to get bluetooth pc105 keyboards to work with N900
 
What component of the system is exactly responsible for handling HID devices in maemo? Under generic linux, I use hidd --connect <mac_address> to connect a bluetooth keyboard (and after that, I can see the connection using hcitool con), but there is no hidd in maemo, so I wonder what replaces hidd (if anything) there?

smoku 2010-02-01 15:25

Re: how to get bluetooth pc105 keyboards to work with N900
 
BlueZ 4 uses only one daemon - bluetoothd controlled via D-Bus.

JoHnY 2010-02-01 15:28

Re: how to get bluetooth pc105 keyboards to work with N900
 
Actually, I was just editing my original message with the fact that I have been looking around and found that hidd is actually deprecated in favor of input service through dbus, which is probably how it works in maemo.
Since I am not very familiar with dbus, can anyone explain how exactly does it work and what command is used to actually activate the input service and connect HID device (keyboard)?

I have read through this link: http://wiki.bluez.org/wiki/HOWTO/InputDevices , but I'm quite lost when it comes to Dbus :-)

smoku 2010-02-01 15:57

Re: how to get bluetooth pc105 keyboards to work with N900
 
http://wiki.bluez.org/wiki/Input#InputAPI + http://linux.die.net/man/1/dbus-send

You should be able to figure out the exact command. :)
(I have no device at the moment to try to find it.)

JoHnY 2010-02-01 16:59

Re: how to get bluetooth pc105 keyboards to work with N900
 
Thanks, I'll try to figure out :-)

Ulysses 2010-02-01 17:52

Re: how to get bluetooth pc105 keyboards to work with N900
 
True, hidd is deprecated, but you do have hcitool at your disposal.

Typically, you would do something like this first:

Code:

Nokia-N900-51-1:~# hcitool scan
Scanning ...
        00:22:98:A9:1F:D1        W980       
        00:1D:4F:A7:71:46        Apple Wireless Keyboard

Then you can create a connection like so:

Code:

Nokia-N900-51-1:~# hcitool cc 00:1D:4F:A7:71:46
It is my understanding that since the latest firmware updated, if you check that connection with:

Code:

Nokia-N900-51-1:~# hcitool con
The result will always be empty:

Code:

Connections:
Now, you can do this while debugging in another terminal with:

Code:

Nokia-N900-51-1:/home/user# hcidump -B -w hci-trace.log
After you try to connect, you can read the log file by issuing this:

Code:

Nokia-N900-51-1:/home/user# hcidump -r hci-trace.log
And then chances are you will see that the bluetooth keyboard actually connects:

Code:

> HCI Event: Connect Complete (0x03) plen 11
but then almost immediately:

Code:

< HCI Command: Disconnect (0x01|0x0006) plen 3
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Disconn Complete (0x05) plen 4

The question, thus, is what process sends the HCI command "disconnect", and why.


PS: To run hci-dump you will have to install the bluez-hcidump debian package, as per the instructions http://80.248.164.233/Bugs:Stock_ans...n_Fremantle.29
Ulysses

JoHnY 2010-02-02 17:57

Re: how to get bluetooth pc105 keyboards to work with N900
 
Quote:

Originally Posted by Ulysses (Post 505465)

PS: To run hci-dump you will have to install the bluez-hcidump debian package, as per the instructions http://80.248.164.233/Bugs:Stock_ans...n_Fremantle.29
Ulysses

I am unable to install bluez-hcidump... I have downloaded the package but when I try to install it, it says it depends on libbluetooth2 and that one is not available.
When I check which packages are available, I see libbluetooth3, but if I try apt-get install libbluetooth3, it says it needs libbluetooth2 as well so I'm stuck here...


All times are GMT. The time now is 13:15.

vBulletin® Version 3.8.8