2004-10-07 17:07:33

by Kyle Rose

[permalink] [raw]
Subject: [Bluez-users] AMD64 HID pairing

On my AMD64 system (Tyan K8W, dual Opteron 244, logitech MX 900 mouse
and bluetooth cradle, linux-2.6.8.1 with patch-2.6.8-mh2), I have to
switch to VT, do "hidd --search", and hit both buttons (on the mouse
and on the cradle) every time I either reboot the machine or let it
sit for a while. Needless to say, this is pretty irritating.

What really bugs me is that this exact same hardware configuration
works in IA32 mode: when I reboot, I just hit the button on the mouse
and a few seconds later the mouse comes alive; and when I leave it sit
for a while, I just move it or hit a button and a few seconds later
the mouse comes back.

I've confirmed I've got hidd --server running.

Any insight?

Cheers,
Kyle


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2004-10-10 22:05:09

by Kyle Rose

[permalink] [raw]
Subject: Re: [Bluez-users] AMD64 HID pairing

Marcel Holtmann <[email protected]> writes:

> Do you tried the bluez-utils from CVS?

Well, I'll be a sonofabitch. With the CVS bluez-utils, it works
fine. I'd be interested in figuring out what made the difference. I
may just try recompiling Debian's source package with gcc-3.4 to see
if the compiler makes the difference.

Thanks, Marcel.

Cheers,
Kyle

2004-10-10 07:58:51

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] AMD64 HID pairing

Hi Kyle,

> > why do you enabled auth and encrypt? This is security mode 3. Disable it
> > and try again.
>
> I just tried this with no auth or encrypt, and the same behavior
> ensues.

I never heard of a 64 bit bug in the HID support, but it seems that
there is one. I don't know if it is in the kernel or in the user space.
Do you tried the bluez-utils from CVS?

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-10-10 07:57:38

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] AMD64 HID pairing

Hi Kyle,

> > why do you enabled auth and encrypt? This is security mode 3. Disable it
> > and try again.
>
> I guess my rebuttal is, "Why shouldn't it work with auth and encrypt
> in 64 bit mode only?" :)

the security mode 3 can have some weird effects. You shouldn't use it
unless you really know what you are doing. I repeated this so often, but
actually it seems no one is really believing me.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-10-10 04:00:58

by Kyle Rose

[permalink] [raw]
Subject: Re: [Bluez-users] AMD64 HID pairing

> why do you enabled auth and encrypt? This is security mode 3. Disable it
> and try again.

I just tried this with no auth or encrypt, and the same behavior
ensues.

Cheers,
Kyle

2004-10-10 02:19:27

by Kyle Rose

[permalink] [raw]
Subject: Re: [Bluez-users] AMD64 HID pairing

> why do you enabled auth and encrypt? This is security mode 3. Disable it
> and try again.

I guess my rebuttal is, "Why shouldn't it work with auth and encrypt
in 64 bit mode only?" :)

But, for sake of completeness I will try this with both turned off.

Cheers,
Kyle

2004-10-09 22:12:57

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] AMD64 HID pairing

Hi Kyle,

> > are you sure that your settings are the same on both machine. Show us
> > the output of "hciconfig -a".
>
> I did the diff between the 64-bit install and a different machine
> running the 32-bit install to keep me from having to reboot. Here's
> the diff:
>
> --- /tmp/32.txt 2004-10-09 15:43:24.475967740 -0400
> +++ /tmp/64.txt 2004-10-09 15:43:17.187060956 -0400
> @@ -1,13 +1,13 @@
> hci0: Type: USB
> - BD Address: 00:07:61:07:2B:41 ACL MTU: 192:8 SCO MTU: 64:8
> + BD Address: 00:07:61:15:3C:79 ACL MTU: 192:8 SCO MTU: 64:8
> UP RUNNING PSCAN ISCAN AUTH ENCRYPT
> - RX bytes:683597 acl:41770 sco:0 events:1153 errors:0
> - TX bytes:3189 acl:116 sco:0 commands:31 errors:0
> + RX bytes:516464 acl:36254 sco:0 events:733 errors:0
> + TX bytes:6111 acl:155 sco:0 commands:181 errors:0
> Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
> Link policy: RSWITCH HOLD SNIFF PARK
> Link mode: SLAVE ACCEPT
> - Name: 'san-0'
> + Name: 'nausicaa-0'
> Class: 0x000100
> Service Classes: Unspecified
> Device Class: Computer, Uncategorized
>
> Only differences are where I would expect them (node name, status, and
> bluetooth address).

why do you enabled auth and encrypt? This is security mode 3. Disable it
and try again.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-10-09 19:45:05

by Kyle Rose

[permalink] [raw]
Subject: Re: [Bluez-users] AMD64 HID pairing

> are you sure that your settings are the same on both machine. Show us
> the output of "hciconfig -a".

I did the diff between the 64-bit install and a different machine
running the 32-bit install to keep me from having to reboot. Here's
the diff:

--- /tmp/32.txt 2004-10-09 15:43:24.475967740 -0400
+++ /tmp/64.txt 2004-10-09 15:43:17.187060956 -0400
@@ -1,13 +1,13 @@
hci0: Type: USB
- BD Address: 00:07:61:07:2B:41 ACL MTU: 192:8 SCO MTU: 64:8
+ BD Address: 00:07:61:15:3C:79 ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN AUTH ENCRYPT
- RX bytes:683597 acl:41770 sco:0 events:1153 errors:0
- TX bytes:3189 acl:116 sco:0 commands:31 errors:0
+ RX bytes:516464 acl:36254 sco:0 events:733 errors:0
+ TX bytes:6111 acl:155 sco:0 commands:181 errors:0
Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
- Name: 'san-0'
+ Name: 'nausicaa-0'
Class: 0x000100
Service Classes: Unspecified
Device Class: Computer, Uncategorized

Only differences are where I would expect them (node name, status, and
bluetooth address).

Cheers,
Kyle

2004-10-09 17:21:59

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] AMD64 HID pairing

Hi Kyle,

> OK, so I'm now using 2.6.9-rc3-bk8, and I get the following when
> moving the mouse around after the connection times out:
>
> > HCI Event: Connect Request (0x04) plen 10
> 19 C4 14 61 07 00 80 25 00 01
> < HCI Command: Accept Connection Request (0x01|0x0009) plen 7
> 19 C4 14 61 07 00 00
> > HCI Event: Command Status (0x0f) plen 4
> 00 01 09 04
> > HCI Event: Link Key Request (0x17) plen 6
> 19 C4 14 61 07 00
> < HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
> 19 C4 14 61 07 00
> > HCI Event: Role Change (0x12) plen 8
> 00 19 C4 14 61 07 00 00
> > HCI Event: Command Complete (0x0e) plen 10
> 01 0C 04 00 19 C4 14 61 07 00
> > HCI Event: PIN Code Request (0x16) plen 6
> 19 C4 14 61 07 00
> < HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
> 19 C4 14 61 07 00 04 36 30 35 38 00 00 00 00 00 00 00 00 00
> 00 00 00
> > HCI Event: Command Complete (0x0e) plen 10
> 01 0D 04 00 19 C4 14 61 07 00
> > HCI Event: Connect Complete (0x03) plen 11
> 18 2A 00 19 C4 14 61 07 00 01 00
> > HCI Event: Connect Request (0x04) plen 10
> 19 C4 14 61 07 00 80 25 00 01
> < HCI Command: Accept Connection Request (0x01|0x0009) plen 7
> 19 C4 14 61 07 00 00
> > HCI Event: Command Status (0x0f) plen 4
> 00 01 09 04
> > HCI Event: Role Change (0x12) plen 8
> 00 19 C4 14 61 07 00 00
> > HCI Event: Connect Complete (0x03) plen 11
> 17 2B 00 19 C4 14 61 07 00 01 00
> > HCI Event: Connect Request (0x04) plen 10
> 19 C4 14 61 07 00 80 25 00 01
> < HCI Command: Accept Connection Request (0x01|0x0009) plen 7
> 19 C4 14 61 07 00 00
> > HCI Event: Command Status (0x0f) plen 4
> 00 01 09 04
> > HCI Event: Link Key Request (0x17) plen 6
> 19 C4 14 61 07 00
> < HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
> 19 C4 14 61 07 00
> > HCI Event: Role Change (0x12) plen 8
> 00 19 C4 14 61 07 00 00
> > HCI Event: Command Complete (0x0e) plen 10
> 01 0C 04 00 19 C4 14 61 07 00
> > HCI Event: PIN Code Request (0x16) plen 6
> 19 C4 14 61 07 00
> < HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
> 19 C4 14 61 07 00 04 36 30 35 38 00 00 00 00 00 00 00 00 00
> 00 00 00
> > HCI Event: Command Complete (0x0e) plen 10
> 01 0D 04 00 19 C4 14 61 07 00
> > HCI Event: Connect Complete (0x03) plen 11
> 18 2C 00 19 C4 14 61 07 00 01 00
> > HCI Event: Connect Request (0x04) plen 10
> 19 C4 14 61 07 00 80 25 00 01
> < HCI Command: Accept Connection Request (0x01|0x0009) plen 7
> 19 C4 14 61 07 00 00
> > HCI Event: Command Status (0x0f) plen 4
> 00 01 09 04
> > HCI Event: Role Change (0x12) plen 8
> 00 19 C4 14 61 07 00 00
> > HCI Event: Connect Complete (0x03) plen 11
> 17 2D 00 19 C4 14 61 07 00 01 00
> > HCI Event: Connect Request (0x04) plen 10
> 19 C4 14 61 07 00 80 25 00 01
> < HCI Command: Accept Connection Request (0x01|0x0009) plen 7
> 19 C4 14 61 07 00 00
> > HCI Event: Command Status (0x0f) plen 4
> 00 01 09 04
> > HCI Event: Role Change (0x12) plen 8
> 00 19 C4 14 61 07 00 00
> > HCI Event: Connect Complete (0x03) plen 11
> 17 2E 00 19 C4 14 61 07 00 01 00

are you sure that your settings are the same on both machine. Show us
the output of "hciconfig -a".

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-10-09 15:04:47

by Kyle Rose

[permalink] [raw]
Subject: Re: [Bluez-users] AMD64 HID pairing

>> Then use "-x". I think the "-X" option was introduced with 1.11 or so
>> and the Debian packages are a little bit behind.
>
> I'll have to do this when I get home, so I can move the mouse around
> and see what I get.

OK, so I'm now using 2.6.9-rc3-bk8, and I get the following when
moving the mouse around after the connection times out:

> HCI Event: Connect Request (0x04) plen 10
19 C4 14 61 07 00 80 25 00 01
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
19 C4 14 61 07 00 00
> HCI Event: Command Status (0x0f) plen 4
00 01 09 04
> HCI Event: Link Key Request (0x17) plen 6
19 C4 14 61 07 00
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
19 C4 14 61 07 00
> HCI Event: Role Change (0x12) plen 8
00 19 C4 14 61 07 00 00
> HCI Event: Command Complete (0x0e) plen 10
01 0C 04 00 19 C4 14 61 07 00
> HCI Event: PIN Code Request (0x16) plen 6
19 C4 14 61 07 00
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
19 C4 14 61 07 00 04 36 30 35 38 00 00 00 00 00 00 00 00 00
00 00 00
> HCI Event: Command Complete (0x0e) plen 10
01 0D 04 00 19 C4 14 61 07 00
> HCI Event: Connect Complete (0x03) plen 11
18 2A 00 19 C4 14 61 07 00 01 00
> HCI Event: Connect Request (0x04) plen 10
19 C4 14 61 07 00 80 25 00 01
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
19 C4 14 61 07 00 00
> HCI Event: Command Status (0x0f) plen 4
00 01 09 04
> HCI Event: Role Change (0x12) plen 8
00 19 C4 14 61 07 00 00
> HCI Event: Connect Complete (0x03) plen 11
17 2B 00 19 C4 14 61 07 00 01 00
> HCI Event: Connect Request (0x04) plen 10
19 C4 14 61 07 00 80 25 00 01
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
19 C4 14 61 07 00 00
> HCI Event: Command Status (0x0f) plen 4
00 01 09 04
> HCI Event: Link Key Request (0x17) plen 6
19 C4 14 61 07 00
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
19 C4 14 61 07 00
> HCI Event: Role Change (0x12) plen 8
00 19 C4 14 61 07 00 00
> HCI Event: Command Complete (0x0e) plen 10
01 0C 04 00 19 C4 14 61 07 00
> HCI Event: PIN Code Request (0x16) plen 6
19 C4 14 61 07 00
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
19 C4 14 61 07 00 04 36 30 35 38 00 00 00 00 00 00 00 00 00
00 00 00
> HCI Event: Command Complete (0x0e) plen 10
01 0D 04 00 19 C4 14 61 07 00
> HCI Event: Connect Complete (0x03) plen 11
18 2C 00 19 C4 14 61 07 00 01 00
> HCI Event: Connect Request (0x04) plen 10
19 C4 14 61 07 00 80 25 00 01
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
19 C4 14 61 07 00 00
> HCI Event: Command Status (0x0f) plen 4
00 01 09 04
> HCI Event: Role Change (0x12) plen 8
00 19 C4 14 61 07 00 00
> HCI Event: Connect Complete (0x03) plen 11
17 2D 00 19 C4 14 61 07 00 01 00
> HCI Event: Connect Request (0x04) plen 10
19 C4 14 61 07 00 80 25 00 01
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
19 C4 14 61 07 00 00
> HCI Event: Command Status (0x0f) plen 4
00 01 09 04
> HCI Event: Role Change (0x12) plen 8
00 19 C4 14 61 07 00 00
> HCI Event: Connect Complete (0x03) plen 11
17 2E 00 19 C4 14 61 07 00 01 00

Cheers,
Kyle

2004-10-07 22:07:06

by Kyle Rose

[permalink] [raw]
Subject: Re: [Bluez-users] AMD64 HID pairing

Marcel Holtmann <[email protected]> writes:

> If this is a Debian system then hid2hci will normaly run a boot time and
> switch it from HID to HCI mode.

You are correct, and this is being run at boot time. However, I don't
think this does anything interesting in my case since I have USB
legacy support disabled in my BIOS as I have only a bluetooth mouse
and not a bluetooth keyboard, the former of which I don't need until
after Linux boots.

> Then use "-x". I think the "-X" option was introduced with 1.11 or so
> and the Debian packages are a little bit behind.

I'll have to do this when I get home, so I can move the mouse around
and see what I get.

Thanks,
Kyle

2004-10-07 21:58:42

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] AMD64 HID pairing

Hi Kyle,

> > this looks very weird. Especially the switching to the VT.
>
> I guess I wasn't very specific here. I switch to VT because I can't
> get to a terminal without a working mouse. :) It has nothing to do
> with executing hidd --search from a VT vs. a pty.

this are good news, because otherwise the input subsystem may be broken.

> > Is the cradle in HID or in HCI mode?
>
> Uh... this isn't something I've dealt with before. When I installed
> bluez on the 32 bit system several months ago, I just turned on HIDP
> support and it simply "worked." I didn't realize there were different
> modes here. How do I switch the mode? Different module?
>
> FWIW, "hcitool dev" gives "hci0 ...", suggesting it is in hci mode,
> which probably isn't right.

If this is a Debian system then hid2hci will normaly run a boot time and
switch it from HID to HCI mode.

> > Run "hcidump -X" as root whenever possible so we can see if there are
> > wrong things.
>
> My hcidump doesn't recognize -X. This is a new option maybe? I'm
> using the one from the Debian AMD64 alioth repository (1.10).

Then use "-x". I think the "-X" option was introduced with 1.11 or so
and the Debian packages are a little bit behind.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-10-07 21:49:46

by Kyle Rose

[permalink] [raw]
Subject: Re: [Bluez-users] AMD64 HID pairing

Marcel Holtmann <[email protected]> writes:

> this looks very weird. Especially the switching to the VT.

I guess I wasn't very specific here. I switch to VT because I can't
get to a terminal without a working mouse. :) It has nothing to do
with executing hidd --search from a VT vs. a pty.

> Please try to reproduce it with a 2.6.9-rc3-bk7 kernel.

Will do.

> Is the cradle in HID or in HCI mode?

Uh... this isn't something I've dealt with before. When I installed
bluez on the 32 bit system several months ago, I just turned on HIDP
support and it simply "worked." I didn't realize there were different
modes here. How do I switch the mode? Different module?

FWIW, "hcitool dev" gives "hci0 ...", suggesting it is in hci mode,
which probably isn't right.

> Run "hcidump -X" as root whenever possible so we can see if there are
> wrong things.

My hcidump doesn't recognize -X. This is a new option maybe? I'm
using the one from the Debian AMD64 alioth repository (1.10).

Cheers,
Kyle

2004-10-07 21:39:48

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] AMD64 HID pairing

Hi Kyle,

> On my AMD64 system (Tyan K8W, dual Opteron 244, logitech MX 900 mouse
> and bluetooth cradle, linux-2.6.8.1 with patch-2.6.8-mh2), I have to
> switch to VT, do "hidd --search", and hit both buttons (on the mouse
> and on the cradle) every time I either reboot the machine or let it
> sit for a while. Needless to say, this is pretty irritating.
>
> What really bugs me is that this exact same hardware configuration
> works in IA32 mode: when I reboot, I just hit the button on the mouse
> and a few seconds later the mouse comes alive; and when I leave it sit
> for a while, I just move it or hit a button and a few seconds later
> the mouse comes back.

this looks very weird. Especially the switching to the VT. Please try to
reproduce it with a 2.6.9-rc3-bk7 kernel.

Is the cradle in HID or in HCI mode? Do you see any other errors on
AMD64. I fixed some 64 bit bugs, but I can't remember that any of them
where in the HID stuff.

Run "hcidump -X" as root whenever possible so we can see if there are
wrong things.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users