2005-09-06 16:22:00

by Ben Tullis

[permalink] [raw]
Subject: [Bluez-users] I have a question about the bdaddr utility

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


2005-09-08 00:28:37

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] I have a question about the bdaddr utility

Hi Peter,

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

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.

> 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

2005-09-07 10:10:34

by Ben Tullis

[permalink] [raw]
Subject: Re: [Bluez-users] I have a question about the bdaddr utility

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

Marcel Holtmann wrote:

>Hi Andy,
>
>
>
>>>>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 ;)
>
>
>
>>>>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".
>
>
>
>>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

2005-09-07 09:13:08

by Peter Stephenson

[permalink] [raw]
Subject: Re: [Bluez-users] I have a question about the bdaddr utility

Marcel Holtmann <[email protected]> wrote:
> Hi Andy,
>
> > > > 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

2005-09-07 09:13:13

by Ronny L Nilsson

[permalink] [raw]
Subject: Re: [Bluez-users] I have a question about the bdaddr utility


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

2005-09-06 20:53:58

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] I have a question about the bdaddr utility

Hi Andy,

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

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

> 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

2005-09-06 20:15:02

by Andreas Beck

[permalink] [raw]
Subject: Re: [Bluez-users] I have a question about the bdaddr utility

Marcel Holtmann <[email protected]> wrote:
> > 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?

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

2005-09-06 17:03:42

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] I have a question about the bdaddr utility

Hi Ben,

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

> 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