Skip to contentSkip to conversation

Sharing devices with dual-booted Windows

Bluez-users Rob Sims 6 participants 13 messages May 22, 2007 – Nov 29, 2007 Bluetooth drivers

lore
Share & tools
lore

Rob Sims

author
#0 lore raw

I have several devices that I use with both Linux and Windows on the same laptop. The issue is that the remote devices, such as my PDA, see the laptop as the same device no matter what OS is running, and pairing is broken.

I need some way to either make the Windows and Linux stacks present a unified front in terms of pairing, or alter the adapter address while in Linux so that the laptop appears to be a different device. Altering the name alone in hcid.conf is insufficient.

Currently, when switching OS, I must manually delete the pairing from my PDA, then re-pair the device.

Is there a way to override the preprogrammed address with a user specified one, as you can do with network MAC addresses? The adapter is a built-in hci_usb driven device.

Searching the list archives yielded nothing applicable.

Signature · 1 line
Rob

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#1 lore raw

Rob Sims wrote (Tue 2007-May-22 10:12:55 -0600):

Quoted 4 lines

I have several devices that I use with both Linux and Windows on the same laptop. The issue is that the remote devices, such as my PDA, see the laptop as the same device no matter what OS is running, and pairing is broken.

I always thought of this as a defect in the protocol:
Identification is based on the hardware address, but stateful authentication using that identification is performed on a layer way up.

Cheers, Marcus

-- =

Marcus C. Gottwald =B7 http://www.inf.fu-berlin.de/~gottwald/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

author
#2 lore raw
Quoted 10 lines · Marcus C. Gottwald

Rob Sims wrote (Tue 2007-May-22 10:12:55 -0600):

Quoted 4 lines

I have several devices that I use with both Linux and Windows on the same laptop. The issue is that the remote devices, such as my PDA, see the laptop as the same device no matter what OS is running, and pairing is broken.

I always thought of this as a defect in the protocol:
Identification is based on the hardware address, but stateful authentication using that identification is performed on a layer way up.

Are you implying that the hardware address is not changeable, as it is for ethernet hardware?

Signature · 1 line
Rob

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#3 lore raw

Rob Sims wrote (Sun 2007-May-27 18:13:40 -0600):

Quoted 4 lines · Marcus C. Gottwald
Quoted 3 lines

Rob Sims wrote (Tue 2007-May-22 10:12:55 -0600):

Quoted 2 lines

I have several devices that I use with both Linux and Windows on the same laptop. The issue is that the remote devices, such as my PDA, s=

ee

Quoted 1 line
Quoted 1 line
Quoted 1 line

the laptop as the same device no matter what OS is running, and pairi=

ng

Quoted 11 lines
Quoted 1 line
Quoted 1 line

is broken.

=

Quoted 4 lines

I always thought of this as a defect in the protocol:
Identification is based on the hardware address, but stateful authentication using that identification is performed on a layer way up.

=

Are you implying that the hardware address is not changeable, as it is for ethernet hardware?

No. But there's an interesting thought: Do you think (Or does anybody know?) that during protocol design, where this issue might have come up, someone said, "Ah, that's not a problem, simply let the user configure his operating systems to change the hardware address after the device has been plugged in."? -- I still think this was overlooked.

Cheers, Marcus

-- =

Marcus C. Gottwald =B7 http://www.inf.fu-berlin.de/~gottwald/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#4 lore raw

[Bluez-users] auth problems

In reply to Rob Sims

i posted to the list before, but got no answer.

i am trying to obexftp some files from my nokia fone. the phone asks for a password (pin).
the problem is:
1. if i set security none, in hcid.conf, it still wants a password. is this normal ?
2. if i set security auto, and passkey 1234, hcid says:

hcid[11839]: pin_code_request (sba=00:0B:0D:4C:AB:C3, dba=00:18:C5:38:AF:D1)
hcid[11839]: call_passkey_agent(): no agent registered

why am i setting the passkey if it doesn't read it ?

3. if i set security user, and pin_helper WHATEVER, it says at startup hcid[11854]: Unknown option 'pin_helper' line 25 hcid[11854]: syntax error line 25

and if i try to connect,
hcid[11854]: pin_code_request (sba=00:0B:0D:4C:AB:C3, dba=00:18:C5:38:AF:D1)
hcid[11854]: call_passkey_agent(): no agent registered

is the security setting a joke ? shouldn't that give me to option to say if i even WANT to use an agent ?

i use debian 4.0 with kernel 2.6.21.1 and hcid ver 3.7.

thanks for any insight.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#5 lore raw

Re: [Bluez-users] auth problems

I am using FC6, kernel 2.6.20-1. I have tested with setting the security to none in hcif.conf. In this case my Nokia 6600 doesn't ask for any password(pin) while doing Obex File Transfer.

-----Original Message-----
From: bhairava [mailto:[email protected]]
Sent: Thursday, May 24, 2007 2:08 AM
To: BlueZ users
Subject: [Bluez-users] auth problems

i posted to the list before, but got no answer.

i am trying to obexftp some files from my nokia fone. the phone asks for a password (pin).
the problem is:
1. if i set security none, in hcid.conf, it still wants a password. is this normal ?
2. if i set security auto, and passkey 1234, hcid says:

hcid[11839]: pin_code_request (sba=00:0B:0D:4C:AB:C3, dba=00:18:C5:38:AF:D1)
hcid[11839]: call_passkey_agent(): no agent registered

why am i setting the passkey if it doesn't read it ?

3. if i set security user, and pin_helper WHATEVER, it says at startup hcid[11854]: Unknown option 'pin_helper' line 25 hcid[11854]: syntax error line 25

and if i try to connect,
hcid[11854]: pin_code_request (sba=00:0B:0D:4C:AB:C3, dba=00:18:C5:38:AF:D1)
hcid[11854]: call_passkey_agent(): no agent registered

is the security setting a joke ? shouldn't that give me to option to say if i even WANT to use an agent ?

i use debian 4.0 with kernel 2.6.21.1 and hcid ver 3.7.

thanks for any insight.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#6 lore raw

Re: [Bluez-users] auth problems

solved it.

hcid pass is for incoming connections.
i was doing outgoing.
managed to make it work with help of the example passkey-agent in bluez-utils. i don't understand why this only comes as a source file and not installed by default, as it should be. oh well.

Quoted 54 lines · Aveek Audhya

I am using FC6, kernel 2.6.20-1. I have tested with setting the security to none in hcif.conf. In this case my Nokia 6600 doesn't ask for any password(pin) while doing Obex File Transfer.

-----Original Message-----
From: bhairava [mailto:[email protected]]
Sent: Thursday, May 24, 2007 2:08 AM
To: BlueZ users
Subject: [Bluez-users] auth problems

i posted to the list before, but got no answer.

i am trying to obexftp some files from my nokia fone. the phone asks for a password (pin).
the problem is:
1. if i set security none, in hcid.conf, it still wants a password. is this normal ?
2. if i set security auto, and passkey 1234, hcid says:

hcid[11839]: pin_code_request (sba=00:0B:0D:4C:AB:C3, dba=00:18:C5:38:AF:D1)
hcid[11839]: call_passkey_agent(): no agent registered

why am i setting the passkey if it doesn't read it ?

3. if i set security user, and pin_helper WHATEVER, it says at startup hcid[11854]: Unknown option 'pin_helper' line 25 hcid[11854]: syntax error line 25

and if i try to connect,
hcid[11854]: pin_code_request (sba=00:0B:0D:4C:AB:C3, dba=00:18:C5:38:AF:D1)
hcid[11854]: call_passkey_agent(): no agent registered

is the security setting a joke ? shouldn't that give me to option to say if i even WANT to use an agent ?

i use debian 4.0 with kernel 2.6.21.1 and hcid ver 3.7.

thanks for any insight.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

Quoted 11 lines

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

author
#7 lore raw
In reply to Rob Sims

Back in May, I posted a query:

Quoted 10 lines · Rob Sims

I have several devices that I use with both Linux and Windows on the same laptop. The issue is that the remote devices, such as my PDA, see the laptop as the same device no matter what OS is running, and pairing is broken.

I need some way to either make the Windows and Linux stacks present a unified front in terms of pairing, or alter the adapter address while in Linux so that the laptop appears to be a different device. Altering the name alone in hcid.conf is insufficient.

Quoted 6 lines

Currently, when switching OS, I must manually delete the pairing from my PDA, then re-pair the device.

Is there a way to override the preprogrammed address with a user specified one, as you can do with network MAC addresses? The adapter is a built-in hci_usb driven device.

and got a response that was more a side comment than an answer.

In July, John Smith posted a similar query, and Brad Midgley responded:
} The problem is both operating systems share the same adapter but don't } share any of the state that is built up during pairing.

} You could change between two bluetooth adapters on your computer so } the phone doesn't get confused. There are even hacks where you use } just one adapter and temporarily change the mac addr on the adapter } when under linux.

John Smith's followup message asking for such a hack went unanswered.

Is the bdaddr an unchangeable part of the hardware, or is it soft, like the MAC addresses of virtually all network cards?

If it's soft, how does one assign the desired "fake" bdaddr to the host adapter? With network devices, 'ifconfig hw' does the job.

Alternatively, can the pairing info be extracted from the Windows side and translated to the Linux side?

Signature · 1 line
Rob

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#8 lore raw

Rob

Quoted 2 lines

If it's soft, how does one assign the desired "fake" bdaddr to the host adapter? With network devices, 'ifconfig hw' does the job.

Sorry I didn't really answer this before. I'm trying to remember who told me about bdaddr hacks.

Quoted 2 lines

Alternatively, can the pairing info be extracted from the Windows side and translated to the Linux side?

That would require digging into some registry etc internals in windows, so this list would only be helpful once you've dug up the credentials there first.

Signature · 11 lines
Brad

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
author
#9 lore raw
Quoted 5 lines · Brad Midgley
Quoted 2 lines

If it's soft, how does one assign the desired "fake" bdaddr to the host adapter? With network devices, 'ifconfig hw' does the job.

Sorry I didn't really answer this before. I'm trying to remember who told me about bdaddr hacks.

It would be appreciated.

Quoted 6 lines
Quoted 2 lines

Alternatively, can the pairing info be extracted from the Windows side and translated to the Linux side?

That would require digging into some registry etc internals in windows, so this list would only be helpful once you've dug up the credentials there first.

I did some digging in May and was unable to find where Windows hides its pairing info. I'd probably have to diff the registry before and after a pairing to narrow it down.

This list seemed to be the most likely candidate for users of both stacks; Windows fora users would have no reason to extract such data.

Signature · 1 line
Rob

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#10 lore raw
In reply to Brad Midgley

Rob,

fwiw, the only thing I could find would work only for csr chips using bccmd from bluez-utils/tools (configure --enable-bccmd). Get the bdaddr to see how the bytes are swapped around:

bccmd psget bdaddr

then set and reset the adapter (sometimes these commands take two goes to take)

bccmd psset -r bdaddr 0x2000 0xaf9b 0xf400 0x0800

I could give this a whack tonight.

fyi, bccmd can brick the adapter (eg if you use "-s" to make bad settings permanent). It would be nice if someone who fiddles with csr stuff can verify this approach.

Brad

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#11 lore raw

Hi Brad,

Quoted 4 lines

fwiw, the only thing I could find would work only for csr chips using bccmd from bluez-utils/tools (configure --enable-bccmd). Get the bdaddr to see how the bytes are swapped around:

Quoted 8 lines

bccmd psget bdaddr

then set and reset the adapter (sometimes these commands take two goes to take)

bccmd psset -r bdaddr 0x2000 0xaf9b 0xf400 0x0800

I could give this a whack tonight.

using the bdaddr command is much simpler. It does the magic of bringing the address into the right format.

Quoted 3 lines

fyi, bccmd can brick the adapter (eg if you use "-s" to make bad settings permanent). It would be nice if someone who fiddles with csr stuff can verify this approach.

Take this warning serious. You can really brick your dongle.

Regards

Marcel

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

author
#12 lore raw
Quoted 13 lines · Marcel Holtmann
Quoted 4 lines

fwiw, the only thing I could find would work only for csr chips using bccmd from bluez-utils/tools (configure --enable-bccmd). Get the bdaddr to see how the bytes are swapped around:

Quoted 8 lines

bccmd psget bdaddr

then set and reset the adapter (sometimes these commands take two goes to take)

bccmd psset -r bdaddr 0x2000 0xaf9b 0xf400 0x0800

I could give this a whack tonight.

Quoted 8 lines

using the bdaddr command is much simpler. It does the magic of bringing the address into the right format.

Quoted 3 lines

fyi, bccmd can brick the adapter (eg if you use "-s" to make bad settings permanent). It would be nice if someone who fiddles with csr stuff can verify this approach.

Take this warning serious. You can really brick your dongle.

It appears from the behavior described above and a sample CSR datasheet that PS is "Persistent Store." This means that not only would I have to run this each time starting Linux, I'd have to restore the original bdaddr in Linux before booting to Windows.

Also, this is a built-in adapter in a Thinkpad; it's significantly more expensive than a dongle to fix, even if it might be a CSR core.

Thanks for settling this - there is no way to soft-set (change disappears on reset) the bdaddr of existing bluetooth adapters.

Signature · 1 line
Rob

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users