Skip to contentSkip to conversation

Keyboard woe

Bluez-users John Morton 2 participants 5 messages Aug 17, 2006 – Aug 18, 2006 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

I've just picked up a luggable bluetooth keyboard for use with a cellphone, but I'd like to get it going under linux. This is proving to be a challenge.

So far the USB bluetooth dongle seems to work fine, and I can gather information about the keyboard, ie:

Quoted 1 line

hcitool inq

Inquiring ...

        00:0A:3A:30:D4:40       clock offset: 0x60be    class: 0x001f00
Quoted 1 line

hcitool info 00:0A:3A:30:D4:40

Requesting information ...
BD Address: 00:0A:3A:30:D4:40
Device Name: KEYBOARD
LMP Version: 1.1 (0x1) LMP Subversion: 0x2c2
Manufacturer: Cambridge Silicon Radio (10)
Features: 0xbc 0x06 0x07 0x00 0x00 0x00 0x00 0x00
<encryption> <slot offset> <timing accuracy> <role switch> <sniff mode> <RSSI> <channel quality> <CVSD> <paging scheme> <power control>

After some reading I discover that I need to get going hidd to use the keyboard and I'd need to connect manually first to perform pairing. (This I find in the Debian readme, but no where else - is there documentation I'm missing?)

The first time I run hidd --connect 00:0A:3A:30:D4:40 it fails with an oblique error message about not being able to open an input device. I have to run strace to find out which (/dev/input/uinput) then grep the kernel source to work out which module needs building (CONFIG_INPUT_UNINPUT). Again - have I missed some vital piece of documentation, here, because googling was rather unreliable...

Now, when I run it, I get a connection, but I'm a bit lost as to what ought to happen. What I'm getting is every key press on the bluetooth keyboard producing an unknown event code, ie:

Quoted 1 line

hidd --connect 00:0A:3A:30:D4:40

Connected to 00:0A:3A:30:D4:40 on channel 1
Press CTRL-C for hangup
Unknown event code 1
Unknown event code 64
Unknown event code 2
Unknown event code 3
Unknown event code 4

(String was 1234)

What _should_ be happening?

And what can I do to produce some debugging output of use to any developers on the list?

TIA,
John

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#1 lore raw

Hi John,

Quoted 45 lines

I've just picked up a luggable bluetooth keyboard for use with a cellphone, but I'd like to get it going under linux. This is proving to be a challenge.

So far the USB bluetooth dongle seems to work fine, and I can gather information about the keyboard, ie:

Quoted 1 line

hcitool inq

Inquiring ...

        00:0A:3A:30:D4:40       clock offset: 0x60be    class: 0x001f00
Quoted 1 line

hcitool info 00:0A:3A:30:D4:40

Requesting information ...
BD Address: 00:0A:3A:30:D4:40
Device Name: KEYBOARD
LMP Version: 1.1 (0x1) LMP Subversion: 0x2c2
Manufacturer: Cambridge Silicon Radio (10)
Features: 0xbc 0x06 0x07 0x00 0x00 0x00 0x00 0x00
<encryption> <slot offset> <timing accuracy> <role switch> <sniff mode> <RSSI> <channel quality> <CVSD> <paging scheme> <power control>

After some reading I discover that I need to get going hidd to use the keyboard and I'd need to connect manually first to perform pairing. (This I find in the Debian readme, but no where else - is there documentation I'm missing?)

The first time I run hidd --connect 00:0A:3A:30:D4:40 it fails with an oblique error message about not being able to open an input device. I have to run strace to find out which (/dev/input/uinput) then grep the kernel source to work out which module needs building (CONFIG_INPUT_UNINPUT). Again - have I missed some vital piece of documentation, here, because googling was rather unreliable...

Now, when I run it, I get a connection, but I'm a bit lost as to what ought to happen. What I'm getting is every key press on the bluetooth keyboard producing an unknown event code, ie:

Quoted 1 line

hidd --connect 00:0A:3A:30:D4:40

Connected to 00:0A:3A:30:D4:40 on channel 1
Press CTRL-C for hangup
Unknown event code 1
Unknown event code 64
Unknown event code 2
Unknown event code 3
Unknown event code 4

Quoted 6 lines

(String was 1234)

What _should_ be happening?

And what can I do to produce some debugging output of use to any developers on the list?

please get us the SDP records for this device. Use sdptool with "browse" or "records" commands to fetch them. You might have a non-HID device that needs special support in hidd.

Regards

Marcel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#2 lore raw
Quoted 16 lines · Marcel Holtmann
Quoted 6 lines

Inquiring ...

        00:0A:3A:30:D4:40       clock offset: 0x60be    class: 0x001f00
Quoted 1 line

hcitool info 00:0A:3A:30:D4:40

Quoted 9 lines

Requesting information ...
BD Address: 00:0A:3A:30:D4:40
Device Name: KEYBOARD
LMP Version: 1.1 (0x1) LMP Subversion: 0x2c2
Manufacturer: Cambridge Silicon Radio (10)
Features: 0xbc 0x06 0x07 0x00 0x00 0x00 0x00 0x00
<encryption> <slot offset> <timing accuracy> <role
switch> <sniff mode> <RSSI> <channel quality> <CVSD> <paging scheme> <power control>

Quoted 5 lines

please get us the SDP records for this device. Use sdptool with "browse" or "records" commands to fetch them. You might have a non-HID device that needs special support in hidd.

sdptool records 00:0A:3A:30:D4:40

Service Name: SPP slave
Service RecHandle: 0x10000
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100

I stumbled on a useful review of the device, under the Freedom brand:

http://www.geekzone.co.nz/content.asp?contentid=5236

So it's definitely a serial rather than HID device. How much of a struggle would it be to build drivers for it, given that there is already similar code for the EPoX presenter?

John

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#4 lore raw
In reply to Marcel Holtmann
Quoted 3 lines · Marcel Holtmann

please redo it with "sdptool records --raw <bdaddr>".

sdptool records --raw 00:0A:3A:30:D4:40

Sequence

        Attribute 0x0000 - ServiceRecordHandle
                UINT32 0x00010000
        Attribute 0x0001 - ServiceClassIDList
                Sequence
                        UUID16 0x1101 - SerialPort
        Attribute 0x0004 - ProtocolDescriptorList
                Sequence
                        Sequence
                                UUID16 0x0100 - L2CAP
                        Sequence
                                UUID16 0x0003 - RFCOMM
                                UINT8 0x01
        Attribute 0x0006 - LanguageBaseAttributeIDList
                Sequence
                        UINT16 0x656e
                        UINT16 0x006a
                        UINT16 0x0100
        Attribute 0x0100
                String SPP slave
Quoted 2 lines

You need to know what protocol are they using or I need a donation of such a keyboard to actually hack the protocol.

Unfortunately, I bought it because I can't afford anything better at the moment, but they can be picked up for less than retail on Trademe (a local eBay-a-like trading site), so if my fortunes improve, I'll try and arrange it.

Might try contacting the manufacturers as they might prove to be helpful. Stranger things have happened...

Thanks,
John

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#3 lore raw
In reply to John Morton

Hi John,

Quoted 5 lines
Quoted 5 lines

please get us the SDP records for this device. Use sdptool with "browse" or "records" commands to fetch them. You might have a non-HID device that needs special support in hidd.

sdptool records 00:0A:3A:30:D4:40

Quoted 12 lines

Service Name: SPP slave
Service RecHandle: 0x10000
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100

please redo it with "sdptool records --raw <bdaddr>".

Quoted 7 lines

I stumbled on a useful review of the device, under the Freedom brand:

http://www.geekzone.co.nz/content.asp?contentid=5236

So it's definitely a serial rather than HID device. How much of a struggle would it be to build drivers for it, given that there is already similar code for the EPoX presenter?

You need to know what protocol are they using or I need a donation of such a keyboard to actually hack the protocol.

Regards

Marcel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users