Skip to contentSkip to conversation

I have a question about the bdaddr utility

Bluez-users Ben Tullis 5 participants 8 messages Sep 6, 2005 – Sep 8, 2005 Bluetooth drivers

lore
Share & tools
lore

Ben Tullis

author
#0 lore raw

Hello again,

Maybe this should be directed at bluez-devel, but I'll ask anyway.
I have a question about the bdaddr utility, with reference to a CSR chipset, connected via internal USB on a Sony Vaio According to the list, this utility is able to change the bluetooth address of a particular device.

My question is, is this change permanently written to the chip, or is it merely a volatile change as far as the running kernel is concerned?

The reason I ask is that I am having trouble with dual-booting between Windows XP and Linux. I have to repair each time I swap operating systems and it is a pain.

It seems to me that the easiest way to get it to work is to convince the kernel to use a different bluetooth address when initialising the device. I could then have two pairings on my phone. Hey presto.

If the bdaddr utility writes this change to the chip, then that's no good for this situation. Is there any other way in which this could be achieved? Should it be necessasry at all? Are the link keys etc. stored on the chip in order to be o/s independent anyway?

The phone is a Nokia 6680
The kernel is 2.6.13-mh1
bluez-utils/libs are at 2.19

Many thanks.

Ben Tullis

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#1 lore raw

Hi Ben,

Quoted 8 lines

Maybe this should be directed at bluez-devel, but I'll ask anyway. I have a question about the bdaddr utility, with reference to a CSR chipset, connected via internal USB on a Sony Vaio According to the list, this utility is able to change the bluetooth address of a particular device.

My question is, is this change permanently written to the chip, or is it merely a volatile change as far as the running kernel is concerned?

the change is permanent.

Quoted 3 lines

The reason I ask is that I am having trouble with dual-booting between Windows XP and Linux. I have to repair each time I swap operating systems and it is a pain.

Once you paired with Linux you can store the link key on the Bluetooth chip and you don't need to repair with Windows. Check the hciconfig for the correct command.

Regards

Marcel

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#2 lore raw
Quoted 3 lines · Marcel Holtmann
Quoted 2 lines

My question is, is this change permanently written to the chip, or is it merely a volatile change as far as the running kernel is concerned?

the change is permanent.

Would it be possible to make it volatile?

Quoted 6 lines
Quoted 3 lines

The reason I ask is that I am having trouble with dual-booting between Windows XP and Linux. I have to repair each time I swap operating systems and it is a pain.

Once you paired with Linux you can store the link key on the Bluetooth chip and you don't need to repair with Windows. Check the hciconfig for the correct command.

Could you please detail on that? I can see no obvious way in the manpage (maybe I should use CVS version?) and I don't quite understand how it would work. Is there some on-chip storage for linkkeys that gets read by the windows drivers?

I'm asking, because I have the same problem when moving a bluetooth adapter between two different PCs. The headset will need to be re-paired with the other PC, whenever I do so (and I got to remove the linkkey before, of course).

I could try copying the link keys, as they are both linux (not sure, if that would work, but it sounds worth a try), but I doubt this is possible with windows.

CU, Andy

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#3 lore raw

Hi Andy,

Quoted 5 lines
Quoted 3 lines
Quoted 2 lines

My question is, is this change permanently written to the chip, or is it merely a volatile change as far as the running kernel is concerned?

the change is permanent.

Would it be possible to make it volatile?

in case of CSR chips the BD_ADDR is a PSKEY. I don't know if it can be made volatile. This is a question for the CSR gurus ;)

Quoted 11 lines
Quoted 6 lines
Quoted 3 lines

The reason I ask is that I am having trouble with dual-booting between Windows XP and Linux. I have to repair each time I swap operating systems and it is a pain.

Once you paired with Linux you can store the link key on the Bluetooth chip and you don't need to repair with Windows. Check the hciconfig for the correct command.

Could you please detail on that? I can see no obvious way in the manpage (maybe I should use CVS version?) and I don't quite understand how it would work. Is there some on-chip storage for linkkeys that gets read by the windows drivers?

Whoops. It seems that I forgot to update the manual page. What you are searching for are the putkey and delkey commands. Call "hciconfig -h".

Quoted 8 lines

I'm asking, because I have the same problem when moving a bluetooth adapter between two different PCs. The headset will need to be re-paired with the other PC, whenever I do so (and I got to remove the linkkey before, of course).

I could try copying the link keys, as they are both linux (not sure, if that would work, but it sounds worth a try), but I doubt this is possible with windows.

Copying the link key should work.

Regards

Marcel

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#4 lore raw
Quoted 10 lines · Marcel Holtmann

Hi Andy,

Quoted 5 lines
Quoted 3 lines
Quoted 2 lines

My question is, is this change permanently written to the chip, or is it merely a volatile change as far as the running kernel is concerned?

the change is permanent.

Would it be possible to make it volatile?

in case of CSR chips the BD_ADDR is a PSKEY. I don't know if it can be made volatile. This is a question for the CSR gurus ;)

It's possible to have volatile PSKEYs. You need to use the CSR BCCMD command set to make this work, but that's the same set you'd be using to write the PSKEY to flash. The command is BCCMDVARID_PS. You write the PSKEY to temporary (actually, it says here "transient") store (code 8) instead of the default (code 0) or implementation (usually meaning flash, code 1). Then you have to perform a warm reset by setting BCCMDVARID_WARM_RESET --- this resets pretty much everything except the persistent store, including resetting the host transport. There's no way around the warm reset; the new address won't take effect otherwise. Note the temporary store overrides any address in flash.

If you don't already have access to the BCCMD command set this is likely to be Greek, unfortunately. (Unless you speak Greek.)

pws

**********************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager.

**********************************************************************

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#5 lore raw

Hi Peter,

Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines

My question is, is this change permanently written to the chip, or is it merely a volatile change as far as the running kernel is concerned?

the change is permanent.

Would it be possible to make it volatile?

in case of CSR chips the BD_ADDR is a PSKEY. I don't know if it can be made volatile. This is a question for the CSR gurus ;)

Quoted 10 lines

It's possible to have volatile PSKEYs. You need to use the CSR BCCMD command set to make this work, but that's the same set you'd be using to write the PSKEY to flash. The command is BCCMDVARID_PS. You write the PSKEY to temporary (actually, it says here "transient") store (code 8) instead of the default (code 0) or implementation (usually meaning flash, code 1). Then you have to perform a warm reset by setting BCCMDVARID_WARM_RESET --- this resets pretty much everything except the persistent store, including resetting the host transport. There's no way around the warm reset; the new address won't take effect otherwise. Note the temporary store overrides any address in flash.

this is great. I added a "-t" switch to the bdaddr utility to make the change of the address volatile and a "-r" switch to perform the needed cold or warm reset.

Quoted 2 lines

If you don't already have access to the BCCMD command set this is likely to be Greek, unfortunately. (Unless you speak Greek.)

Some people of us speak Greek ;)

Regards

Marcel

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#6 lore raw
In reply to Marcel Holtmann
Quoted 11 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

My question is, is this change permanently written to the chip, or is it merely a volatile change as far as the running kernel is concerned?

the change is permanent.

Would it be possible to make it volatile?

in case of CSR chips the BD_ADDR is a PSKEY. I don't know if it can be made volatile. This is a question for the CSR gurus ;)

Hi
This is a bit of guessing...but I think there is at least a theoretical way of achieving this volatile.

Some PSKEYs can be written to the device RAM which then overrides the persisten flash values as long power supply retains. Haven't tried it though but it's perhaps something to investigate further.

/Ronny

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

author
#7 lore raw
In reply to Marcel Holtmann

Thanks for all the responses.

hciconfig hci0 putkey [bdaddr]
worked perfectly for me and my chip.

I can now dual-boot and use the bluetooth seamlessly between XP and Linux.

Regards,

Ben Tullis

Quoted 45 lines · Marcel Holtmann

Hi Andy,

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

My question is, is this change permanently written to the chip, or is it merely a volatile change as far as the running kernel is concerned?

the change is permanent.

Would it be possible to make it volatile?

in case of CSR chips the BD_ADDR is a PSKEY. I don't know if it can be made volatile. This is a question for the CSR gurus ;)

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

The reason I ask is that I am having trouble with dual-booting between Windows XP and Linux. I have to repair each time I swap operating systems and it is a pain.

Once you paired with Linux you can store the link key on the Bluetooth chip and you don't need to repair with Windows. Check the hciconfig for the correct command.

Quoted 6 lines

Could you please detail on that? I can see no obvious way in the manpage (maybe I should use CVS version?) and I don't quite understand how it would work. Is there some on-chip storage for linkkeys that gets read by the windows drivers?

Whoops. It seems that I forgot to update the manual page. What you are searching for are the putkey and delkey commands. Call "hciconfig -h".

Quoted 5 lines

I'm asking, because I have the same problem when moving a bluetooth adapter between two different PCs. The headset will need to be re-paired with the other PC, whenever I do so (and I got to remove the linkkey before, of course).

I could try copying the link keys, as they are both linux (not sure, if that would work, but it sounds worth a try), but I doubt this is possible with windows.

Quoted 8 lines

Copying the link key should work.

Regards

Marcel

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users