Skip to contentSkip to conversation

Apple bluetooth keyboard fun...

Bluez-users Patrick 3 participants 12 messages Aug 8, 2004 Bluetooth drivers

lore
Share & tools
lore

Patrick

author
#0 lore raw

I have had my apple bt keyboard working in linux for some time on my old pc. I now have a new pc and I can't get the damn thing going...

I am using the same bluetooth adaptor from the old pc and as far as I
can tell the same kernel config (as relates to bluetooth) as the old pc. This is with bluez-libs and utils 2.7.

Reading through the archives I saw some mention of hcidump but I don't seem to have that.

hcitool scan
Scanning ...

        00:0A:95:3A:63:E4       Apple Wireless Keyboard

hcitool inq
Inquiring ...

        00:0A:95:3A:63:E4       clock offset: 0x3a7f    class: 0x002540

hcitool info 00:0A:95:3A:63:E4
Requesting information ...
BD Address: 00:0A:95:3A:63:E4
Device Name: Apple Wireless Keyboard
LMP Version: 1.1 (0x1) LMP Subversion: 0x5b00
Manufacturer: Broadcom Corporation (15)
Features: 0xbc 0x02 0x04 0x00 0x08 0x00 0x00 0x00
<encryption> <slot offset> <timing accuracy> <role switch> <sniff mode> <RSSI> <power control> <AFH cap. slave>

I have hidd --server in my startup scripts...

hidd --show
00:0A:95:3A:63:E4 HID Boot Device [05ac:0208] connected

Here is my bluetooth kernel config. As far as I know all I need is RFCOMM and HIDP support but since I was having trouble I figured what the hell and turned on everything. What can I safely turn off down there?

Linux Kernel v2.6.8-rc2 Configuration

--- Bluetooth subsystem support

<*>   L2CAP protocol support
<*>   SCO links support
<*>   RFCOMM protocol support

[*] RFCOMM TTY support
<*> BNEP protocol support
[*] Multicast filter support
[*] Protocol filter support
<*> HIDP protocol support

<*> HCI USB driver
[ ] SCO (voice) support
<*> HCI UART driver
[*] UART (H4) protocol support
[*] BCSP protocol support
[ ] Transmit CRC with every BCSP packet
< > HCI BCM203x USB driver
< > HCI BlueFRITZ! USB driver
<*> HCI VHCI (Virtual HCI device) driver

My hcid.conf file...

# HCI daemon configuration file.
# $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $

options {
        autoinit yes;
        security user;
        pairing multi;
        pin_helper /usr/bin/bluepin;
}
device {
        name "BlueZ (%d)";
        class 0x100;
        iscan enable; pscan enable;
        lm accept;
        lp rswitch,hold,sniff,park;
        auth enable;
        encrypt enable;
}

bluepin is just the basic echo "PIN:0000" or whatever...

What am I missing here? I am completely stumped. Thank you for any help!

Patrick

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

author
#1 lore raw

Feel a bit silly replying to my own question but I did just now notice with dmesg the single line error:

drivers/usb/input/hid-input.c: event field not found

Maybe that's a clue to what's happening? Or not happening?

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#2 lore raw
In reply to Patrick

Dne ne 8. srpna 2004 06:02 Patrick napsal(a):

Quoted 52 lines

I have had my apple bt keyboard working in linux for some time on my old pc. I now have a new pc and I can't get the damn thing going...

I am using the same bluetooth adaptor from the old pc and as far as I can tell the same kernel config (as relates to bluetooth) as the old pc. This is with bluez-libs and utils 2.7.

Reading through the archives I saw some mention of hcidump but I don't seem to have that.

hcitool scan
Scanning ...

         00:0A:95:3A:63:E4       Apple Wireless Keyboard

hcitool inq
Inquiring ...

         00:0A:95:3A:63:E4       clock offset: 0x3a7f    class: 0x002540

hcitool info 00:0A:95:3A:63:E4
Requesting information ...
BD Address: 00:0A:95:3A:63:E4
Device Name: Apple Wireless Keyboard
LMP Version: 1.1 (0x1) LMP Subversion: 0x5b00
Manufacturer: Broadcom Corporation (15)
Features: 0xbc 0x02 0x04 0x00 0x08 0x00 0x00 0x00
<encryption> <slot offset> <timing accuracy> <role switch> <sniff mode> <RSSI> <power control> <AFH cap. slave>

I have hidd --server in my startup scripts...

hidd --show
00:0A:95:3A:63:E4 HID Boot Device [05ac:0208] connected

Here is my bluetooth kernel config. As far as I know all I need is RFCOMM and HIDP support but since I was having trouble I figured what the hell and turned on everything. What can I safely turn off down there?

Linux Kernel v2.6.8-rc2 Configuration

--- Bluetooth subsystem support

<*>   L2CAP protocol support
<*>   SCO links support
<*>   RFCOMM protocol support

[*] RFCOMM TTY support
<*> BNEP protocol support
[*] Multicast filter support
[*] Protocol filter support
<*> HIDP protocol support

Quoted 9 lines

<*> HCI USB driver
[ ] SCO (voice) support
<*> HCI UART driver
[*] UART (H4) protocol support
[*] BCSP protocol support
[ ] Transmit CRC with every BCSP packet
< > HCI BCM203x USB driver
< > HCI BlueFRITZ! USB driver
<*> HCI VHCI (Virtual HCI device) driver

here use modules!

Quoted 9 lines

My hcid.conf file...

# HCI daemon configuration file.
# $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $

options {
         autoinit yes;
         security user;

auto

Quoted 9 lines
         pairing multi;
         pin_helper /usr/bin/bluepin;
}
device {
         name "BlueZ (%d)";
         class 0x100;
         iscan enable; pscan enable;
         lm accept;

lm accept,master;

Quoted 2 lines
         lp rswitch,hold,sniff,park;
         auth enable;

disable

Quoted 1 line
         encrypt enable;

disable

Quoted 9 lines

}

bluepin is just the basic echo "PIN:0000" or whatever...

What am I missing here? I am completely stumped. Thank you for any help!

Patrick

Quoted 9 lines

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#4 lore raw
In reply to Patrick

Hi Patrick,

Quoted 6 lines

I have had my apple bt keyboard working in linux for some time on my old pc. I now have a new pc and I can't get the damn thing going...

I am using the same bluetooth adaptor from the old pc and as far as I can tell the same kernel config (as relates to bluetooth) as the old pc. This is with bluez-libs and utils 2.7.

use bluez-libs-2.9 and bluez-utils-2.9 and kernel 2.6.8-rc3.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#3 lore raw
In reply to Bc. Michal Semler

Hi Michal,

Quoted 13 lines
Quoted 8 lines

My hcid.conf file...

# HCI daemon configuration file.
# $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $

options {
         autoinit yes;
         security user;

auto

Quoted 4 lines
         pairing multi;
         pin_helper /usr/bin/bluepin;
}
Quoted 6 lines
Quoted 5 lines
device {
         name "BlueZ (%d)";
         class 0x100;
         iscan enable; pscan enable;
         lm accept;

lm accept,master;

don't suggest the master option, because this is only needed in very special cases. The hidd program can request the role switch by itself.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

author
#5 lore raw
In reply to Marcel Holtmann

Alright I got libz, utils, and pin 2.9. I had to install dbus to get bluez-pin to compile.

Now I have to do hciconfig hci0 up to get the adaptor to wake up...

Now whenever I try to connect with hidd it always times out.

Ah yes and I am using a 2.6.8-rc3 colonel now.

2.7 was a package from my distro, I had to do 2.9 by hand. I guess there is a chance I missed something but it all seemed to go over without a hitch installation wise.

Thanks for everyones replies!

Patrick

Quoted 10 lines · Marcel Holtmann

Hi Patrick,

Quoted 5 lines

I have had my apple bt keyboard working in linux for some time on my old pc. I now have a new pc and I can't get the damn thing going...

I am using the same bluetooth adaptor from the old pc and as far as I
can tell the same kernel config (as relates to bluetooth) as the old pc. This is with bluez-libs and utils 2.7.

Quoted 5 lines

use bluez-libs-2.9 and bluez-utils-2.9 and kernel 2.6.8-rc3.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#6 lore raw

Hi Patrick,

Quoted 4 lines

Alright I got libz, utils, and pin 2.9. I had to install dbus to get bluez-pin to compile.

Now I have to do hciconfig hci0 up to get the adaptor to wake up...

start the hcid and sdpd from a boot script. Make sure that only one hcid is running.

Quoted 3 lines

Now whenever I try to connect with hidd it always times out.

Ah yes and I am using a 2.6.8-rc3 colonel now.

On first connect to your keyboard you must input the PIN on it and press enter. Run "hcidump -x" as root to check what is going on.

Quoted 3 lines

2.7 was a package from my distro, I had to do 2.9 by hand. I guess there is a chance I missed something but it all seemed to go over without a hitch installation wise.

I hope you removed the distro packages first, before installing the new ones. Ask the package maintainer to adapt the upstream version.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

author
#7 lore raw

I have been typing in "0000 enter" and "1234 enter" to see if I can get anything to work but no dice. I didn't have to do this on my old machine though, or is it something you have to do just once and I've since forgotten having to do it?

I uninstalled 2.7 before installing 2.9. I did save the init script though and I am still using it... you can view it here:

http://www.gentoo.org/cgi-bin/viewcvs.cgi/*checkout*/net-wireless/bluez-utils/files/bluetooth.rc?rev=HEAD&content-type=text/plain

Anyhow...when I start the script and then do hidd --connect 00:0A:95:3A:63:E4 I just get the connection timed out error after a few moments. hcidump says:

HCIDump - HCI packet analyzer ver 1.10
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff

Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

10 29 00 E4 63 3A 95 0A 00 01 00
< HCI Command: Create Connection (0x01|0x0005) plen 13
E4 63 3A 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: Link Key Request (0x17) plen 6

E4 63 3A 95 0A 00

Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

10 29 00 E4 63 3A 95 0A 00 01 00

Thanks,

Patrick

Quoted 34 lines · Marcel Holtmann

Hi Patrick,

Quoted 3 lines

Alright I got libz, utils, and pin 2.9. I had to install dbus to get bluez-pin to compile.

Now I have to do hciconfig hci0 up to get the adaptor to wake up...

start the hcid and sdpd from a boot script. Make sure that only one hcid is running.

Quoted 3 lines

Now whenever I try to connect with hidd it always times out.

Ah yes and I am using a 2.6.8-rc3 colonel now.

On first connect to your keyboard you must input the PIN on it and press enter. Run "hcidump -x" as root to check what is going on.

Quoted 1 line

2.7 was a package from my distro, I had to do 2.9 by hand. I guess there is a chance I missed something but it all seemed to go over without a hitch installation wise.

I hope you removed the distro packages first, before installing the new ones. Ask the package maintainer to adapt the upstream version.

Regards

Marcel

Quoted 9 lines

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#8 lore raw

Hi Patrick,

Quoted 20 lines

I have been typing in "0000 enter" and "1234 enter" to see if I can get anything to work but no dice. I didn't have to do this on my old machine though, or is it something you have to do just once and I've since forgotten having to do it?

I uninstalled 2.7 before installing 2.9. I did save the init script though and I am still using it... you can view it here:

http://www.gentoo.org/cgi-bin/viewcvs.cgi/*checkout*/net-wireless/bluez-utils/files/bluetooth.rc?rev=HEAD&content-type=text/plain

Anyhow...when I start the script and then do hidd --connect 00:0A:95:3A:63:E4 I just get the connection timed out error after a few moments. hcidump says:

HCIDump - HCI packet analyzer ver 1.10
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff

Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

10 29 00 E4 63 3A 95 0A 00 01 00
< HCI Command: Create Connection (0x01|0x0005) plen 13
E4 63 3A 95 0A 00 18 CC 02 00 00 00 01

Quoted 6 lines
Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

00 01 05 04

Quoted 1 line

HCI Event: Link Key Request (0x17) plen 6

E4 63 3A 95 0A 00

Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

10 29 00 E4 63 3A 95 0A 00 01 00

this actually means that hcid is not running. Check your logfiles.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

author
#9 lore raw

Ah! Now I am getting somewhere...

In my log there were such obvious errors as....

Aug  8 13:38:53 Kawaii64 hcid[7695]: Bluetooth HCI daemon
Aug  8 13:38:53 Kawaii64 hcid[7695]: Can not open /etc/bluetooth/hcid.conf
Aug  8 13:38:53 Kawaii64 hcid[7695]: Config load failed
Aug  8 13:38:53 Kawaii64 hcid[7695]: Can't open PIN file /etc/bluetooth/pin. No such file or directory(2)

When bluez installed it made all those files in /usr/etc/bluetooth/ but I guess it wasn't looking there so I copied it all over to /etc/bluetooth and things are looking up...

So then I was getting things such as:

Quoted 1 line

HCI Event: Link Key Request (0x17) plen 6

E4 63 3A 95 0A 00
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
E4 63 3A 95 0A 00

hidd said:

Can't create HID control channel: Invalid exchange

So I replaced /etc/bluetooth/pin and /usr/bin/bluepin with the echo "PIN:0000" and now it doesnt seem to complain in hcidump:

Quoted 1 line

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

E4 63 3A 95 0A 00
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
E4 63 3A 95 0A 00 04 30 30 30 30 00 00 00 00 00 00 00 00 00 00 00 00

Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

01 0D 04 00 E4 63 3A 95 0A 00

But hidd says:

Can't create HID control channel: Permission denied

So close...

Quoted 34 lines · Marcel Holtmann

Hi Patrick,

Quoted 14 lines

I have been typing in "0000 enter" and "1234 enter" to see if I can get anything to work but no dice. I didn't have to do this on my old machine though, or is it something you have to do just once and I've since forgotten having to do it?

I uninstalled 2.7 before installing 2.9. I did save the init script though and I am still using it... you can view it here:

http://www.gentoo.org/cgi-bin/viewcvs.cgi/*checkout*/net-wireless/bluez-utils/files/bluetooth.rc?rev=HEAD&content-type=text/plain

Anyhow...when I start the script and then do hidd --connect 00:0A:95:3A:63:E4 I just get the connection timed out error after a few moments. hcidump says:

HCIDump - HCI packet analyzer ver 1.10
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff

Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

10 29 00 E4 63 3A 95 0A 00 01 00
< HCI Command: Create Connection (0x01|0x0005) plen 13
E4 63 3A 95 0A 00 18 CC 02 00 00 00 01

Quoted 6 lines
Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

00 01 05 04

Quoted 1 line

HCI Event: Link Key Request (0x17) plen 6

E4 63 3A 95 0A 00

Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

10 29 00 E4 63 3A 95 0A 00 01 00

this actually means that hcid is not running. Check your logfiles.

Regards

Marcel

Quoted 9 lines

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

author
#11 lore raw
In reply to Marcel Holtmann

Ah ha! I changed /etc/bluetooth/pin so it only contained 0000 and now it's all working wonderfully!

Thank you so much for all your help!

Patrick

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#10 lore raw
In reply to Patrick

Hi Patrick,

Quoted 11 lines

In my log there were such obvious errors as....

Aug  8 13:38:53 Kawaii64 hcid[7695]: Bluetooth HCI daemon
Aug  8 13:38:53 Kawaii64 hcid[7695]: Can not open /etc/bluetooth/hcid.conf
Aug  8 13:38:53 Kawaii64 hcid[7695]: Config load failed
Aug  8 13:38:53 Kawaii64 hcid[7695]: Can't open PIN file 

/etc/bluetooth/pin. No such file or directory(2)

When bluez installed it made all those files in /usr/etc/bluetooth/ but I guess it wasn't looking there so I copied it all over to /etc/bluetooth and things are looking up...

if you overwrite the prefix you should also overwrite the sysconfdir unless you really want it that way. Look at the configure example from the README file.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users