Skip to contentSkip to conversation

Using windows breaks bluetooth in linux? huh

Bluez-users Patrick 3 participants 12 messages Nov 17, 2004 – Nov 19, 2004 Bluetooth drivers

lore
Share & tools
lore

Patrick

author
#0 lore raw

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

Quoted 3 lines

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

Quoted 2 lines

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

Quoted 2 lines

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

maintainer
#1 lore raw

Hi Patrick,

Quoted 45 lines

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

Quoted 3 lines

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

Quoted 2 lines

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

Quoted 2 lines

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.

Quoted 8 lines

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

author
#2 lore raw

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

Quoted 13 lines · Marcel Holtmann

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

Quoted 9 lines

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

maintainer
#3 lore raw

Hi Patrick,

Quoted 1 line

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

author
#4 lore raw

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

Quoted 17 lines · Marcel Holtmann

Hi Patrick,

Quoted 1 line

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

Quoted 9 lines

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

maintainer
#5 lore raw

Hi Patrick,

Quoted 6 lines

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

author
#6 lore raw

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

Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

00 01 01 04

Quoted 1 line

HCI Event: Inquiry Result (0x02) plen 15

01 E4 63 3A 95 0A 00 01 00 00 40 25 00 16 2E

Quoted 1 line

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

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

Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

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

Quoted 1 line

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

Quoted 17 lines · Marcel Holtmann

Hi Patrick,

Quoted 3 lines

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

Quoted 9 lines

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

maintainer
#7 lore raw

Hi Patrick,

Quoted 20 lines

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

Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

00 01 01 04

Quoted 1 line

HCI Event: Inquiry Result (0x02) plen 15

01 E4 63 3A 95 0A 00 01 00 00 40 25 00 16 2E

Quoted 1 line

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

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

Quoted 8 lines
Quoted 1 line

HCI Event: Command Complete (0x0e) plen 10

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

Quoted 1 line

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.

Quoted 2 lines

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

author
#8 lore raw

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

Quoted 22 lines · Marcel Holtmann

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.

Quoted 1 line

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

Thanks for these nice words.

Regards

Marcel

Quoted 9 lines

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

#9 lore raw

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

maintainer
#10 lore raw

Hi Wim,

Quoted 5 lines

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

maintainer
#11 lore raw
In reply to Patrick

Hi Patrick,

Quoted 5 lines

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