2004-08-08 04:02:43

by Patrick

[permalink] [raw]
Subject: [Bluez-users] Apple bluetooth keyboard fun...

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. http://www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2004-08-08 22:53:09

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Apple bluetooth keyboard fun...

Hi Patrick,

> 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. http://www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-08-08 20:06:07

by Patrick

[permalink] [raw]
Subject: Re: [Bluez-users] Apple bluetooth keyboard fun...

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. http://www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-08-08 17:55:57

by Patrick

[permalink] [raw]
Subject: Re: [Bluez-users] Apple bluetooth keyboard fun...

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:

> 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:

> 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
> 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...

Marcel Holtmann wrote:
> Hi Patrick,
>
>
>>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
>> > 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
>> > HCI Event: Command Status (0x0f) plen 4
>> 00 01 05 04
>> > HCI Event: Link Key Request (0x17) plen 6
>> E4 63 3A 95 0A 00
>> > 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. http://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. http://www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-08-08 17:11:04

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Apple bluetooth keyboard fun...

Hi Patrick,

> 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
> > 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
> > HCI Event: Command Status (0x0f) plen 4
> 00 01 05 04
> > HCI Event: Link Key Request (0x17) plen 6
> E4 63 3A 95 0A 00
> > 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. http://www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-08-08 16:54:39

by Patrick

[permalink] [raw]
Subject: Re: [Bluez-users] Apple bluetooth keyboard fun...

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
> 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
> HCI Event: Command Status (0x0f) plen 4
00 01 05 04
> HCI Event: Link Key Request (0x17) plen 6
E4 63 3A 95 0A 00
> HCI Event: Connect Complete (0x03) plen 11
10 29 00 E4 63 3A 95 0A 00 01 00

Thanks,

Patrick

Marcel Holtmann wrote:
> Hi Patrick,
>
>
>>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.
>
>
>>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.
>
>
>>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. http://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. http://www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-08-08 15:54:52

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Apple bluetooth keyboard fun...

Hi Patrick,

> 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.

> 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.

> 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. http://www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-08-08 15:42:35

by Patrick

[permalink] [raw]
Subject: Re: [Bluez-users] Apple bluetooth keyboard fun...

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


Marcel Holtmann wrote:
> Hi Patrick,
>
>
>>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. http://www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-08-08 10:11:21

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Apple bluetooth keyboard fun...

Hi Patrick,

> 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. http://www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-08-08 10:13:07

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Apple bluetooth keyboard fun...

Hi Michal,

> > 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
> > pairing multi;
> > pin_helper /usr/bin/bluepin;
> > }
> >
> > 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. http://www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-08-08 09:21:24

by CIJOML

[permalink] [raw]
Subject: Re: [Bluez-users] Apple bluetooth keyboard fun...

Dne ne 8. srpna 2004 06:02 Patrick napsal(a):
> 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

here use modules!

>
> 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
> pairing multi;
> pin_helper /usr/bin/bluepin;
> }
>
> device {
> name "BlueZ (%d)";
> class 0x100;
> iscan enable; pscan enable;
> lm accept;
lm accept,master;
> lp rswitch,hold,sniff,park;
> auth enable;
disable
> encrypt enable;
disable
> }
>
> 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. http://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. http://www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-08-08 06:30:49

by Patrick

[permalink] [raw]
Subject: Re: [Bluez-users] Apple bluetooth keyboard fun...

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. http://www.ostg.com
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users