2004-11-17 05:52:47

by Patrick

[permalink] [raw]
Subject: [Bluez-users] Using windows breaks bluetooth in linux? huh

I have an Apple BT keyboard and a D-Link usb BT adaptor.

I have had it up and running in linux now for quite some time without
any trouble. I reboot, turn the pc off, whatever, the bluetooth always
works.

But today I booted my pc into windows (half life 2 lol) and thanks to
service pack 2 I can now use my BT adaptor in windows so I fiddled
around and got the apple keyboard connected.

So now I reboot back into linux and I cannot for the life of me get
bluetooth working again! I have had the pc/keyboard off for an extended
period of time, unplugged and plugged the adaptor back in, nothing will
get this keyboard connected again!


Kawaii64 patrick # hidd --search
Searching ...
Connecting to device 00:0A:95:3A:63:E4
Can't create HID control channel: Permission denied


And while this is happening hcidump says:


Kawaii64 ~ # hcidump
HCIDump - HCI packet analyzer ver 1.9
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
< HCI Command: Inquiry (0x01|0x0001) plen 5
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Inquiry Result (0x02) plen 15
> HCI Event: Inquiry Complete (0x01) plen 1
< HCI Command: Create Connection (0x01|0x0005) plen 13
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Link Key Request (0x17) plen 6
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
> HCI Event: Command Complete (0x0e) plen 10
> HCI Event: Connect Complete (0x03) plen 11


I used the same passkey in windows as I do in linux (0000). I honestly
cannot see how running BT while in windows would have any affect on its
functioning in linux, especially after everything has been off for a
long time in between.

The only reason I suspect there is a connection is that I had this crop
up in the past. For the longest time I stopped using the apple keyboard
because after I had it working in linux I rebooted into windows the same
day and then it never worked again in linux. I chalked it up to my
stupidty but here again it is happening.

Any idea what is going on here? Is this all unrelated? Thank you for any
insight.

Patrick


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users/listinfo/bluez-users


2004-11-19 01:42:15

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Using windows breaks bluetooth in linux? huh

Hi Wim,

> What is that problem with the link_key file. I have to remove that file from
> time to time too. I use a usb dongle and have to connect my device sometimes
> to this system sometimes to another.
>
> Could you explain why a link_key file could get 'out of sync' ?

the link key is invalid when you pair the two devices on a different
operating system. It is that simple, because a new link key deprecates
the old one.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-11-19 01:40:33

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Using windows breaks bluetooth in linux? huh

Hi Patrick,

> Ah wonderful! It took a few tries but it is happy again!
>
> Now in the future if I find myself back in windows will I be able to use
> it there without fear of disabling it in linux or should I just not use
> it in windows any more?

actually it is not very easy to share the link key between two operating
system. The only way this may work is when you store the link key on the
Bluetooth chip directly. However nobody has written support for that so
far.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-11-19 01:18:22

by wim delvaux

[permalink] [raw]
Subject: Re: [Bluez-users] Using windows breaks bluetooth in linux? huh

Marcel,

What is that problem with the link_key file. I have to remove that file from
time to time too. I use a usb dongle and have to connect my device sometimes
to this system sometimes to another.

Could you explain why a link_key file could get 'out of sync' ?

W


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-11-19 01:00:30

by Patrick

[permalink] [raw]
Subject: Re: [Bluez-users] Using windows breaks bluetooth in linux? huh

Ah wonderful! It took a few tries but it is happy again!

Now in the future if I find myself back in windows will I be able to use
it there without fear of disabling it in linux or should I just not use
it in windows any more?

Thanks again,

Patrick

Marcel Holtmann wrote:
> Hi Patrick,
>
>
> the problem is the same. Error 0x05 means "Authentication failure" and
> this means that the link key is wrong. Since we don't have an easy way
> to delete a single paired device from our list, you need to remove the
> file /etc/bluetooth/link_key and restart the hcid. After that, your
> keyboard should re-pair again.
>
>
>>Thanks again for your help! You are by far the most helpful developer I
>>have ever met.
>
>
> Thanks for these nice words.
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: InterSystems CACHE
> FREE OODBMS DOWNLOAD - A multidimensional database that combines
> robust object and relational technologies, making it a perfect match
> for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-11-18 07:13:28

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Using windows breaks bluetooth in linux? huh

Hi Patrick,

> Kawaii64 patrick # hcidump -x
> HCIDump - HCI packet analyzer ver 1.9
> device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
> < HCI Command: Inquiry (0x01|0x0001) plen 5
> 33 8B 9E 08 C8
> > HCI Event: Command Status (0x0f) plen 4
> 00 01 01 04
> > HCI Event: Inquiry Result (0x02) plen 15
> 01 E4 63 3A 95 0A 00 01 00 00 40 25 00 16 2E
> > HCI Event: Inquiry Complete (0x01) plen 1
> 00
> < HCI Command: Create Connection (0x01|0x0005) plen 13
> E4 63 3A 95 0A 00 18 CC 01 00 16 AE 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 Command: Link Key Request Reply (0x01|0x000b) plen 22
> E4 63 3A 95 0A 00 8F 77 B9 44 7B 94 1E 98 A9 9A 41 9D 3E 40
> 89 95
> > HCI Event: Command Complete (0x0e) plen 10
> 01 0B 04 00 E4 63 3A 95 0A 00
> > HCI Event: Connect Complete (0x03) plen 11
> 05 29 00 E4 63 3A 95 0A 00 01 00
>
>
> If only they would release I linux version of half life 2 this problem
> wouldn't exist!

the problem is the same. Error 0x05 means "Authentication failure" and
this means that the link key is wrong. Since we don't have an easy way
to delete a single paired device from our list, you need to remove the
file /etc/bluetooth/link_key and restart the hcid. After that, your
keyboard should re-pair again.

> Thanks again for your help! You are by far the most helpful developer I
> have ever met.

Thanks for these nice words.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-11-18 03:05:49

by Patrick

[permalink] [raw]
Subject: Re: [Bluez-users] Using windows breaks bluetooth in linux? huh

Kawaii64 patrick # hcidump -x
HCIDump - HCI packet analyzer ver 1.9
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
< HCI Command: Inquiry (0x01|0x0001) plen 5
33 8B 9E 08 C8
> HCI Event: Command Status (0x0f) plen 4
00 01 01 04
> HCI Event: Inquiry Result (0x02) plen 15
01 E4 63 3A 95 0A 00 01 00 00 40 25 00 16 2E
> HCI Event: Inquiry Complete (0x01) plen 1
00
< HCI Command: Create Connection (0x01|0x0005) plen 13
E4 63 3A 95 0A 00 18 CC 01 00 16 AE 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 Command: Link Key Request Reply (0x01|0x000b) plen 22
E4 63 3A 95 0A 00 8F 77 B9 44 7B 94 1E 98 A9 9A 41 9D 3E 40
89 95
> HCI Event: Command Complete (0x0e) plen 10
01 0B 04 00 E4 63 3A 95 0A 00
> HCI Event: Connect Complete (0x03) plen 11
05 29 00 E4 63 3A 95 0A 00 01 00


If only they would release I linux version of half life 2 this problem
wouldn't exist!

Thanks again for your help! You are by far the most helpful developer I
have ever met.

Patrick

Marcel Holtmann wrote:
> Hi Patrick,
>
>
>>For some reason I was under the impression that auth and encrypt had to
>>be on for the Apple Keyboard.
>>
>>I have turned them off and restarted but I am still receiving the same
>>error. Do I have to do something to reset the device? I took the
>>batteries out.
>
>
> check again with "hcidump -x".
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: InterSystems CACHE
> FREE OODBMS DOWNLOAD - A multidimensional database that combines
> robust object and relational technologies, making it a perfect match
> for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-11-17 20:39:27

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Using windows breaks bluetooth in linux? huh

Hi Patrick,

> For some reason I was under the impression that auth and encrypt had to
> be on for the Apple Keyboard.
>
> I have turned them off and restarted but I am still receiving the same
> error. Do I have to do something to reset the device? I took the
> batteries out.

check again with "hcidump -x".

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-11-17 20:31:16

by Patrick

[permalink] [raw]
Subject: Re: [Bluez-users] Using windows breaks bluetooth in linux? huh

For some reason I was under the impression that auth and encrypt had to
be on for the Apple Keyboard.

I have turned them off and restarted but I am still receiving the same
error. Do I have to do something to reset the device? I took the
batteries out.

Thank you,

Patrick

Marcel Holtmann wrote:
> Hi Patrick,
>
>
>>Ah ha! So I am not crazy!
>
>
> no you are not. But as I expected you activated auth and encrypt and so
> your device is in security mode 3 which causes a problem. As I said many
> times now, do this only when you know what you are doing.
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: InterSystems CACHE
> FREE OODBMS DOWNLOAD - A multidimensional database that combines
> robust object and relational technologies, making it a perfect match
> for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users/listinfo/bluez-users


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-11-17 15:21:17

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Using windows breaks bluetooth in linux? huh

Hi Patrick,

> Ah ha! So I am not crazy!

no you are not. But as I expected you activated auth and encrypt and so
your device is in security mode 3 which causes a problem. As I said many
times now, do this only when you know what you are doing.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users/listinfo/bluez-users

2004-11-17 15:09:04

by Patrick

[permalink] [raw]
Subject: Re: [Bluez-users] Using windows breaks bluetooth in linux? huh

Ah ha! So I am not crazy!


Kawaii64 patrick # hciconfig -a
hci0: Type: USB
BD Address: 00:80:C8:35:6B:CF ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN AUTH ENCRYPT
RX bytes:1799 acl:0 sco:0 events:160 errors:0
TX bytes:1141 acl:0 sco:0 commands:63 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: 'BlueZ (0)'
Class: 0x000100
Service Classes: Unspecified
Device Class: Computer, Uncategorized
HCI Ver: 1.1 (0x1) HCI Rev: 0x1bb LMP Ver: 1.1 (0x1) LMP
Subver: 0x1bb
Manufacturer: Cambridge Silicon Radio (10)


Thank you again for your help,

Patrick

Marcel Holtmann wrote:
> Hi Patrick,
>
>
> you re-paired your keyboard with Windows and thus the Linux side
> provides a wrong link key now. What does "hciconfig -a" say?
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: InterSystems CACHE
> FREE OODBMS DOWNLOAD - A multidimensional database that combines
> robust object and relational technologies, making it a perfect match
> for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users/listinfo/bluez-users


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users/listinfo/bluez-users

2004-11-17 06:44:27

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Using windows breaks bluetooth in linux? huh

Hi Patrick,

> I have an Apple BT keyboard and a D-Link usb BT adaptor.
>
> I have had it up and running in linux now for quite some time without
> any trouble. I reboot, turn the pc off, whatever, the bluetooth always
> works.
>
> But today I booted my pc into windows (half life 2 lol) and thanks to
> service pack 2 I can now use my BT adaptor in windows so I fiddled
> around and got the apple keyboard connected.
>
> So now I reboot back into linux and I cannot for the life of me get
> bluetooth working again! I have had the pc/keyboard off for an extended
> period of time, unplugged and plugged the adaptor back in, nothing will
> get this keyboard connected again!
>
>
> Kawaii64 patrick # hidd --search
> Searching ...
> Connecting to device 00:0A:95:3A:63:E4
> Can't create HID control channel: Permission denied
>
>
> And while this is happening hcidump says:
>
>
> Kawaii64 ~ # hcidump
> HCIDump - HCI packet analyzer ver 1.9
> device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
> < HCI Command: Inquiry (0x01|0x0001) plen 5
> > HCI Event: Command Status (0x0f) plen 4
> > HCI Event: Inquiry Result (0x02) plen 15
> > HCI Event: Inquiry Complete (0x01) plen 1
> < HCI Command: Create Connection (0x01|0x0005) plen 13
> > HCI Event: Command Status (0x0f) plen 4
> > HCI Event: Link Key Request (0x17) plen 6
> < HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
> > HCI Event: Command Complete (0x0e) plen 10
> > HCI Event: Connect Complete (0x03) plen 11
>
>
> I used the same passkey in windows as I do in linux (0000). I honestly
> cannot see how running BT while in windows would have any affect on its
> functioning in linux, especially after everything has been off for a
> long time in between.
>
> The only reason I suspect there is a connection is that I had this crop
> up in the past. For the longest time I stopped using the apple keyboard
> because after I had it working in linux I rebooted into windows the same
> day and then it never worked again in linux. I chalked it up to my
> stupidty but here again it is happening.
>
> Any idea what is going on here? Is this all unrelated? Thank you for any
> insight.

you re-paired your keyboard with Windows and thus the Linux side
provides a wrong link key now. What does "hciconfig -a" say?

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. http://www.intersystems.com/match8
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users/listinfo/bluez-users