2004-02-10 17:58:02

by Radu Maurer

[permalink] [raw]
Subject: [Bluez-users] Apple keyboard

What is the method of choice to get an Apple BT keyboard running with
linux?

I am running kernel 2.4.24 and debian unstable.
I have a USB dongle Epox DG02A.

Do I need to patch the kernel?
Do I need to upgrade to the 2.6 kernel series?
Do i need bluez from CVS?

thanks
Radu

hciconfig -a sais:
hci0: Type: USB
BD Address: 00:04:61:81:24:6F ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN
RX bytes:99 acl:0 sco:0 events:13 errors:0
TX bytes:296 acl:0 sco:0 commands:12 errors:0
Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'baerbel-0'
Class: 0x000100
Service Classes: Unspecified
Device Class: Computer, Uncategorized
HCI Ver: 1.1 (0x1) HCI Rev: 0x20d LMP Ver: 1.1 (0x1) LMP Subver: 0x20d
Manufacturer: Cambridge Silicon Radio (10)

hcitool scan:
Scanning ...
00:0A:95:3A:3F:CC Apple Wireless Keyboard

hcitool inq
Inquiring ...
00:0A:95:3A:3F:CC clock offset: 0x0ece class: 0x002540




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2004-02-14 00:24:14

by Radu Maurer

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

> > now I wonder: how do I use the keyboard with X11 (and possibly at the
> > console), i.e. which device do I have to enter in the "InputDevice"
> > section of XFree86Config?
>
> you only have to load the keybdev kernel module.

it works like a charm. I am typing this on the Apple keyboard.
thanks for your help & patience!

Radu

2004-02-13 23:14:31

by Marcel Holtmann

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

Hi Radu,

> Feb 13 23:20:49 localhost bthid[8705]: Connected: Apple Computer, Inc. Apple Wireless Keyboard (05ac:0209)
>
> hcidump prints this every time a press a key:
> > ACL data: handle 0x0029 flags 0x02 dlen 15
> L2CAP(d): cid 0x41 len 11 [psm 19]
>
> now I wonder: how do I use the keyboard with X11 (and possibly at the
> console), i.e. which device do I have to enter in the "InputDevice"
> section of XFree86Config?

you only have to load the keybdev kernel module.

Regards

Marcel




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-02-13 22:50:30

by Radu Maurer

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

> then you must make sure that the hcid PIN helper works perfect. To be
> sure replace it with a simple executable shell script.
>
> #!/bin/sh
> echo "PIN:0000"
>
> Try again and enter the PIN "0000" on your keyboard.

ok, it worked, thanks very much Marcel!!

Feb 13 23:20:49 localhost bthid[8705]: Connected: Apple Computer, Inc. Apple Wireless Keyboard (05ac:0209)

hcidump prints this every time a press a key:
> ACL data: handle 0x0029 flags 0x02 dlen 15
L2CAP(d): cid 0x41 len 11 [psm 19]

now I wonder: how do I use the keyboard with X11 (and possibly at the
console), i.e. which device do I have to enter in the "InputDevice"
section of XFree86Config?

thanks
Radu

2004-02-13 12:22:29

by Marcel Holtmann

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

Hi Thomas,

> > sure replace it with a simple executable shell script.
> > #!/bin/sh
> > echo "PIN:0000"
>
> Is that /usr/bin/bluepin to /etc/bluetooth/pin ?

the /etc/bluetooth/pin is the PIN for incoming connections and the PIN
helper script from hcid.conf is executed on everything else.

Regards

Marcel




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-02-13 12:11:35

by Thomas Chiverton

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

On Friday 13 February 2004 11:56 am, you said:
> sure replace it with a simple executable shell script.
> #!/bin/sh
> echo "PIN:0000"

Is that /usr/bin/bluepin to /etc/bluetooth/pin ?

--
Tom Chiverton
Advanced ColdFusion Programmer

Tel: +44(0)1749 834997
email: [email protected]
BlueFinger Limited
Underwood Business Park
Wookey Hole Road, WELLS. BA5 1AF
Tel: +44 (0)1749 834900
Fax: +44 (0)1749 834901
web: http://www.bluefinger.com
Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple
Quay, BRISTOL. BS1 6EG.
*** This E-mail contains confidential information for the addressee
only. If you are not the intended recipient, please notify us
immediately. You should not use, disclose, distribute or copy this
communication if received in error. No binding contract will result from
this e-mail until such time as a written document is signed on behalf of
the company. BlueFinger Limited cannot accept responsibility for the
completeness or accuracy of this message as it has been transmitted over
public networks.***


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-02-13 11:56:05

by Marcel Holtmann

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

Hi Radu,

> > So it is a pairing problem. Check the keyboard manual how the pairing
> > procedure should work. Maybe it has a default PIN or you have to use the
> > num pad for input.
>
> The manual just sais to follow the instructions on screen :-(
> There is no default PIN in the manual.
> I tested it on windows 2000: there you get a PIN written on the screen,
> which you have to type on the keyboard.

then you must make sure that the hcid PIN helper works perfect. To be
sure replace it with a simple executable shell script.

#!/bin/sh
echo "PIN:0000"

Try again and enter the PIN "0000" on your keyboard.

Regards

Marcel




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-02-13 11:41:08

by Radu Maurer

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

On Mi, 11 Feb, 2004 at 17:22:12 +0100, Michal Semler (volny.cz) wrote:
> Hi,
>
> switch encrypt and auth off in hcid.conf and try again

I think these are off, since they are commented out in hcid.conf:

# Authentication and Encryption
#auth enable;
#encrypt enable;

thanks
Radu


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-02-13 11:37:49

by Radu Maurer

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

On Fr, 13 Feb, 2004 at 11:54:00 +0100, Marcel Holtmann wrote:
> Hi Radu,
>
> > hcidump -w <file> seems to write a binary file. Do you nee that file?
> > Anyway, if I don't give the -w option, it dumps this to stdout:
>
> yes.

ok, see attachment.

> So it is a pairing problem. Check the keyboard manual how the pairing
> procedure should work. Maybe it has a default PIN or you have to use the
> num pad for input.

The manual just sais to follow the instructions on screen :-(
There is no default PIN in the manual.
I tested it on windows 2000: there you get a PIN written on the screen,
which you have to type on the keyboard.

thanks
Radu


Attachments:
(No filename) (647.00 B)
hcidump.log (74.00 B)
Download all attachments

2004-02-13 10:54:00

by Marcel Holtmann

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

Hi Radu,

> hcidump -w <file> seems to write a binary file. Do you nee that file?
> Anyway, if I don't give the -w option, it dumps this to stdout:

yes.

> # hcidump
> HCIDump - HCI packet analyzer ver 1.5
> device: hci0 snap_len: 1028 filter: 0xffffffff
> < HCI Command: Create Connection(0x01|0x0005) plen 13
> > HCI Event: Command Status(0x0f) plen 4
> > HCI Event: PIN Code Request(0x16) plen 6
> > HCI Event: Connect Complete(0x03) plen 11

So it is a pairing problem. Check the keyboard manual how the pairing
procedure should work. Maybe it has a default PIN or you have to use the
num pad for input.

Regards

Marcel




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-02-13 10:50:35

by Radu Maurer

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

On Mi, 11 Feb, 2004 at 17:00:15 +0100, Marcel Holtmann wrote:
> Hi Radu,
>
> > /var/log/daemon.log sais:
> > bthid[19500]: Bluetooth HID service started
> >
> > after a few seconds I get the message:
> > bthid[19500]: Connection failed: Function not implemented (38)
>
> this can be a paring problem, because the Apple HID devices don't allow
> unencrypted connections. Run "hcidump -w <file>" so I can see what is on
> the HCI layer.

hi Marcel,

hcidump -w <file> seems to write a binary file. Do you nee that file?
Anyway, if I don't give the -w option, it dumps this to stdout:

# hcidump
HCIDump - HCI packet analyzer ver 1.5
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection(0x01|0x0005) plen 13
> HCI Event: Command Status(0x0f) plen 4
> HCI Event: PIN Code Request(0x16) plen 6
> HCI Event: Connect Complete(0x03) plen 11

thanks
Radu

2004-02-11 16:22:12

by CIJOML

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

Hi,

switch encrypt and auth off in hcid.conf and try again

Michal

Dne st 11. =FAnora 2004 16:11 Radu Maurer napsal(a):
> On Di, 10 Feb, 2004 at 23:26:19 +0100, Marcel Holtmann wrote:
> > Hi Radu,
> >
> > > What is the method of choice to get an Apple BT keyboard running with
> > > linux?
> >
> > start here http://www.bueche.ch/comp/mx900/mx900.html
>
> thanks Marcel, I followed the instructions there.
> - recompiled the 2.4.24 kernel with your patch for uinput.
> - got libs2 and utils2 from bluez cvs and compiled them
> (as debian packages).
>
> - made /dev/input/uinput device.
>
> - installed:
> bluetooth-hci_0.1-1_i386.deb
> bluetooth-hid_0.1-1_i386.deb
> bluez-utils_0.1-1_i386.deb
> libbluetooth2-dev_0.1-1_i386.deb
> libbluetooth2_0.1-1_i386.deb
> libbluez1-dev_0.1-1_i386.deb
> libbluez1_0.1-1_i386.deb
>
> - started bthid:
> bthid --daemon
>
> /var/log/daemon.log sais:
> bthid[19500]: Bluetooth HID service started
>
> then I try to connect:
> bthid -c <Apple Keyboard Address>
>
> I switch on the keyboard, the green LED on the back side starts to blink.
>
> after a few seconds I get the message:
> bthid[19500]: Connection failed: Function not implemented (38)
>
> where do i go from here?
>
> thanks
> Radu
>
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-02-11 17:53:26

by Marcel Holtmann

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

Hi Radu,

> right now to compile hcidump from cvs but configure fails:
>
> checking "for bluetooth/bluetooth.h"... (/usr/include) yes
> checking "for libbluetooth"... "no"
> configure: error: Bluetooth library not found.
> Please compile and install bluez-libs package.
>
> although I do have libbluetooth.so installed in /usr/lib (package
> libbluetooth2_0.1-1_i386.deb)

you can't mix the libraries, because version 2 breaks some stuff. That's
why I prefer to use the Debian packages and install libs2 and utils2 by
hand under /opt/bluetooth.

Regards

Marcel




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-02-11 17:35:19

by Radu Maurer

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

On Mi, 11 Feb, 2004 at 17:00:15 +0100, Marcel Holtmann wrote:
> > after a few seconds I get the message:
> > bthid[19500]: Connection failed: Function not implemented (38)
>
> this can be a paring problem, because the Apple HID devices don't allow
> unencrypted connections. Run "hcidump -w <file>" so I can see what is on
> the HCI layer.

Ok, I'm trying
right now to compile hcidump from cvs but configure fails:

checking "for bluetooth/bluetooth.h"... (/usr/include) yes
checking "for libbluetooth"... "no"
configure: error: Bluetooth library not found.
Please compile and install bluez-libs package.

although I do have libbluetooth.so installed in /usr/lib (package
libbluetooth2_0.1-1_i386.deb)

Radu

2004-02-11 16:00:15

by Marcel Holtmann

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

Hi Radu,

> /var/log/daemon.log sais:
> bthid[19500]: Bluetooth HID service started
>
> then I try to connect:
> bthid -c <Apple Keyboard Address>
>
> I switch on the keyboard, the green LED on the back side starts to blink.
>
> after a few seconds I get the message:
> bthid[19500]: Connection failed: Function not implemented (38)

this can be a paring problem, because the Apple HID devices don't allow
unencrypted connections. Run "hcidump -w <file>" so I can see what is on
the HCI layer.

Regards

Marcel




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-02-11 15:11:46

by Radu Maurer

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

On Di, 10 Feb, 2004 at 23:26:19 +0100, Marcel Holtmann wrote:
> Hi Radu,
>
> > What is the method of choice to get an Apple BT keyboard running with
> > linux?
>
> start here http://www.bueche.ch/comp/mx900/mx900.html

thanks Marcel, I followed the instructions there.
- recompiled the 2.4.24 kernel with your patch for uinput.
- got libs2 and utils2 from bluez cvs and compiled them
(as debian packages).

- made /dev/input/uinput device.

- installed:
bluetooth-hci_0.1-1_i386.deb
bluetooth-hid_0.1-1_i386.deb
bluez-utils_0.1-1_i386.deb
libbluetooth2-dev_0.1-1_i386.deb
libbluetooth2_0.1-1_i386.deb
libbluez1-dev_0.1-1_i386.deb
libbluez1_0.1-1_i386.deb

- started bthid:
bthid --daemon

/var/log/daemon.log sais:
bthid[19500]: Bluetooth HID service started

then I try to connect:
bthid -c <Apple Keyboard Address>

I switch on the keyboard, the green LED on the back side starts to blink.

after a few seconds I get the message:
bthid[19500]: Connection failed: Function not implemented (38)

where do i go from here?

thanks
Radu



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-02-10 22:26:19

by Marcel Holtmann

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

Hi Radu,

> What is the method of choice to get an Apple BT keyboard running with
> linux?

start here http://www.bueche.ch/comp/mx900/mx900.html

> I am running kernel 2.4.24 and debian unstable.
> I have a USB dongle Epox DG02A.
>
> Do I need to patch the kernel?

Maybe, because you need the uinput kernel module.

> Do I need to upgrade to the 2.6 kernel series?

You don't need, if you don't want to ;)

> Do i need bluez from CVS?

Yes.

Regards

Marcel




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users