Skip to contentSkip to conversation

Pairing a keyboard

Bluez-users Chris Frost 2 participants 4 messages Nov 25, 2004 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

When trying to pair with an apple wireless keyboard, hcitool cc errors "Can't create connection: Input/output error". I was hoping someone might have a suggestion on what to look into.

The details:
I'm kernel 2.6.9-mh4 and bluez 2.11 on an x86 with a D-Link DBT-120. After starting hcid I run "hcitool cc <addr>" and get the error above. I've included "hcidump -x"'s transcript at the bottom of this email. bluepin does not work on my installation (pygtk seems broken), so I wrote a script to echo "0000" to stdout. This may well be my problem? I do not know if this is the format hcid is expecting or if it is the initial pin apple sets. I did read that the mouse uses this pin, this is the only reason for my choice. For my hcid.conf file, security is auto, pin_helper is set to this script, and auth and encrypt are commented out.

I am able "hcitool scan" to see the keyboard. I'm also able to pair with an ericsson phone. The phone, however, may not use a pin?

hcidump output:

< HCI Command: Create Connection (0x01|0x0005) plen 13
4B 9A 3B 95 0A 00 18 CC 02 00 00 00 01

Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

00 01 05 04

Quoted 1 line

HCI Event: PIN Code Request (0x16) plen 6

4B 9A 3B 95 0A 00
< HCI Command: PIN Code Request Negative Reply (0x01|0x000e) plen 6
4B 9A 3B 95 0A 00

Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

01 0E 04 00 4B 9A 3B 95 0A 00

Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

18 29 00 4B 9A 3B 95 0A 00 01 00

thanks for any suggestions or pointers!

Signature · 16 lines
Chris Frost  |  <http://www.frostnet.net/chris/>
-------------+----------------------------------
Public PGP Key:
   Email [email protected] with the subject "retrieve pgp key"
   or visit <http://www.frostnet.net/chris/about/pgp_key.phtml>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
maintainer
#1 lore raw

Hi Chris,

Quoted 3 lines

When trying to pair with an apple wireless keyboard, hcitool cc errors "Can't create connection: Input/output error". I was hoping someone might have a suggestion on what to look into.

who said that pairing works by calling "hcitool cc ..."? You should use the "hidd --connect ..." command instead.

Quoted 9 lines

I'm kernel 2.6.9-mh4 and bluez 2.11 on an x86 with a D-Link DBT-120. After starting hcid I run "hcitool cc <addr>" and get the error above. I've included "hcidump -x"'s transcript at the bottom of this email. bluepin does not work on my installation (pygtk seems broken), so I wrote a script to echo "0000" to stdout. This may well be my problem? I do not know if this is the format hcid is expecting or if it is the initial pin apple sets. I did read that the mouse uses this pin, this is the only reason for my choice. For my hcid.conf file, security is auto, pin_helper is set to this script, and auth and encrypt are commented out.

The bluepin script must echo "PIN:0000".

Regards

Marcel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#2 lore raw
Quoted 2 lines · Marcel Holtmann

who said that pairing works by calling "hcitool cc ..."? You should use the "hidd --connect ..." command instead.

No one did; I had tried hidd --connect but got the same errors. Sorry about this mistake, thanks for the correction.

Quoted 1 line

The bluepin script must echo "PIN:0000".

Aha, that gets it. Thank you.

Do you know if I should I read about/look into putting the keyboard to sleep after inactivity? I have read in a couple places on the web that apple's devices do not go to sleep themselves, but perhaps what I read was old and bluez does this automatically now?

Signature · 16 lines
Chris Frost  |  <http://www.frostnet.net/chris/>
-------------+----------------------------------
Public PGP Key:
   Email [email protected] with the subject "retrieve pgp key"
   or visit <http://www.frostnet.net/chris/about/pgp_key.phtml>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
maintainer
#3 lore raw

Hi Chris,

Quoted 8 lines
Quoted 1 line

The bluepin script must echo "PIN:0000".

Aha, that gets it. Thank you.

Do you know if I should I read about/look into putting the keyboard to sleep after inactivity? I have read in a couple places on the web that apple's devices do not go to sleep themselves, but perhaps what I read was old and bluez does this automatically now?

the hidd has a --timeout option you can use, but we don't support the automatic switch into sniff mode.

Regards

Marcel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users