All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] Support for stored link keys
@ 2005-04-21 14:46 Marcel Holtmann
  2005-04-21 15:55 ` Mitja Pufic
  2005-04-28 18:28 ` David Woodhouse
  0 siblings, 2 replies; 12+ messages in thread
From: Marcel Holtmann @ 2005-04-21 14:46 UTC (permalink / raw)
  To: BlueZ Mailing List

Hi Folks,

the new support for storing the link keys in an ASCII base format
under /var/lib/bluetooth is now part of the bluez-utils-2.16 release and
I am now thinking of adding support for stored link keys. This would be
very useful for people in multi-boot environments, I think.

However there are some other things first, that should be addressed. The
path for /var/lib/bluetooth is hardcoded into hcid/storage.c at the
moment and that is a bad think. I actually forgot to think about that
problem before I released it.

In the long term there will be config options for the embedded guys to
fully override all storage parameters, but that is future talk. What I
wanna do now is use ${localstatedir} to define the storage place at
compilation time. This means you can add --localstatedir=/var to your
configure command. Do you think that is the right way? Another thing is
if we should use /var/lib64/bluetooth on 64-bit platforms? What is the
deal for the /var directory on these architectures?

Now back to the stored link keys issue. I think about adding a "key"
option to hciconfig which allows you to list all link keys and also to
move specific ones (specified by a BD_ADDR) for storage on the chip. The
question is what should we do with the link key in the linkkeys storage
file? Keep it or delete it afterwards?

I also wanna let hcid retrieve all stored link keys when a new device is
plugged in or configured. Should we then store these keys in the
linkkeys file or cache them only in memory? What we get from link key
notify is obvious a valid key, but the stored ones could be wrong. On
the other side you can also put invalid keys in the linkkeys file very
easy.

Please post your thoughts.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Support for stored link keys
  2005-04-21 14:46 [Bluez-devel] Support for stored link keys Marcel Holtmann
@ 2005-04-21 15:55 ` Mitja Pufic
  2005-04-21 16:07   ` Marcel Holtmann
  2005-04-28 18:28 ` David Woodhouse
  1 sibling, 1 reply; 12+ messages in thread
From: Mitja Pufic @ 2005-04-21 15:55 UTC (permalink / raw)
  To: BlueZ Mailing List

Hello Marcel,

I use at least 3 dongles and so I implemented profiles for each one, simmilar 
to alternatives, so each profile has a directory in /etc/bluetooth/profiles and
script softlinks files to /etc/bluetooth and this solved my issues, when 
connecting with different dongles, but it did not solve issues regarding 
linkkeys in windows. 

Your idea is great, would love to see it, and I would store all linkkeys 
which device ever created, if it is possible to add them later on chip.
But I think this would not solve my problem with multiple dongles, as I 
would still need to use profiles, as each dongle would still need it's own 
list, right? 

Do you have any other sollution to this, or what do you think of 
inclusion of profiles for each device? Do you know how widcomm stack store 
linkkeys, in registry? Would it be possible to use same linkkey in both 
OSes?

take care,
mitja


-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Support for stored link keys
  2005-04-21 15:55 ` Mitja Pufic
@ 2005-04-21 16:07   ` Marcel Holtmann
  2005-04-21 16:34     ` Mitja Pufic
  2005-04-21 16:37     ` Mitja Pufic
  0 siblings, 2 replies; 12+ messages in thread
From: Marcel Holtmann @ 2005-04-21 16:07 UTC (permalink / raw)
  To: bluez-devel

Hi Mitja,

> I use at least 3 dongles and so I implemented profiles for each one, simmilar 
> to alternatives, so each profile has a directory in /etc/bluetooth/profiles and
> script softlinks files to /etc/bluetooth and this solved my issues, when 
> connecting with different dongles, but it did not solve issues regarding 
> linkkeys in windows. 

I don't know for what this is needed. The current hcid stores the link
keys now under /var/lib/bluetooth and it uses a subdirectory with the
text representation of the BD_ADDR to differ between adapters.

However even the previous hcid was able to store link keys for different
dongles and you can also use profiling inside the hcid.conf. For example
I use something like this to name all my development dongles.

	device 00:02:xx:xx:xx:xx {
	        name "Casira BC4";
	}

	device 00:0B:xx:xx:xx:xx {
	        name "3Com USB dongle";
	}

> Your idea is great, would love to see it, and I would store all linkkeys 
> which device ever created, if it is possible to add them later on chip.
> But I think this would not solve my problem with multiple dongles, as I 
> would still need to use profiles, as each dongle would still need it's own 
> list, right? 

There is no problem or I don't understand what you mean. However the
space for stored link keys on the chip is limited. I think that max for
CSR based chips is 20.

> Do you have any other sollution to this, or what do you think of 
> inclusion of profiles for each device? Do you know how widcomm stack store 
> linkkeys, in registry? Would it be possible to use same linkkey in both 
> OSes?

The Widcomm stack stores it somewhere in the Registry and actually I
like to see a program that can read these keys from the Registry if the
Windows root partition is mounted. Anyone?

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Support for stored link keys
  2005-04-21 16:07   ` Marcel Holtmann
@ 2005-04-21 16:34     ` Mitja Pufic
  2005-04-21 16:45       ` Marcel Holtmann
  2005-04-21 16:37     ` Mitja Pufic
  1 sibling, 1 reply; 12+ messages in thread
From: Mitja Pufic @ 2005-04-21 16:34 UTC (permalink / raw)
  To: bluez-devel

Hello Marcel,

> 	device 00:02:xx:xx:xx:xx {
> 	        name "Casira BC4";
> 	}
> 
> 	device 00:0B:xx:xx:xx:xx {
> 	        name "3Com USB dongle";
> 	}

Did not know that. Now I can ditch profiles and use hcid way :) Well only 
problem I can see now is: for example with first dongle I create 
connection to access point and store linkkey, and then I do the same with 
second dongle, wouldn't that overwrite the first linkkey, as target would 
have the same bdaddr? 

> The Widcomm stack stores it somewhere in the Registry and actually I
> like to see a program that can read these keys from the Registry if the
> Windows root partition is mounted. Anyone?

This would be cool :)

take care and have a nice day,
mitja


-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Support for stored link keys
  2005-04-21 16:07   ` Marcel Holtmann
  2005-04-21 16:34     ` Mitja Pufic
@ 2005-04-21 16:37     ` Mitja Pufic
  1 sibling, 0 replies; 12+ messages in thread
From: Mitja Pufic @ 2005-04-21 16:37 UTC (permalink / raw)
  To: bluez-devel

Hello again,

> I don't know for what this is needed. The current hcid stores the link 
> keys now under /var/lib/bluetooth and it uses a subdirectory with the 
> text representation of the BD_ADDR to differ between adapters.

Dissregard the previous question :) I will install 2.16 and shut up for 
now :) I see that each device has its own subdirectory.

thanks and regards,
mitja


-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Support for stored link keys
  2005-04-21 16:34     ` Mitja Pufic
@ 2005-04-21 16:45       ` Marcel Holtmann
  2005-04-22 22:26         ` Scott W Gifford
  2005-04-24 18:12         ` Fred Schaettgen
  0 siblings, 2 replies; 12+ messages in thread
From: Marcel Holtmann @ 2005-04-21 16:45 UTC (permalink / raw)
  To: bluez-devel

Hi Mitja,

> > 	device 00:02:xx:xx:xx:xx {
> > 	        name "Casira BC4";
> > 	}
> > 
> > 	device 00:0B:xx:xx:xx:xx {
> > 	        name "3Com USB dongle";
> > 	}
> 
> Did not know that. Now I can ditch profiles and use hcid way :) Well only 
> problem I can see now is: for example with first dongle I create 
> connection to access point and store linkkey, and then I do the same with 
> second dongle, wouldn't that overwrite the first linkkey, as target would 
> have the same bdaddr? 

starting with 2.16 we use sub-directories, but the previous versions
stored the link keys with source and destination BD_ADDR.

> > The Widcomm stack stores it somewhere in the Registry and actually I
> > like to see a program that can read these keys from the Registry if the
> > Windows root partition is mounted. Anyone?
> 
> This would be cool :)

Exists any tool or library that allows to read the Windows registry
directly from Linux if the filesystem is mounted?

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Support for stored link keys
  2005-04-21 16:45       ` Marcel Holtmann
@ 2005-04-22 22:26         ` Scott W Gifford
  2005-04-22 22:55           ` Henryk Plötz
  2005-04-24 18:12         ` Fred Schaettgen
  1 sibling, 1 reply; 12+ messages in thread
From: Scott W Gifford @ 2005-04-22 22:26 UTC (permalink / raw)
  To: bluez-devel

Marcel Holtmann <marcel@holtmann.org> writes:

[...]

> Exists any tool or library that allows to read the Windows registry
> directly from Linux if the filesystem is mounted?

If anybody has this working, it's the WINE folks.  That would be the
place to ask.

---ScottG.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Support for stored link keys
  2005-04-22 22:26         ` Scott W Gifford
@ 2005-04-22 22:55           ` Henryk Plötz
  2005-04-23  0:00             ` Marcel Holtmann
  0 siblings, 1 reply; 12+ messages in thread
From: Henryk Plötz @ 2005-04-22 22:55 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

Moin,

Am Fri, 22 Apr 2005 18:26:48 -0400 schrieb Scott W Gifford:

> Marcel Holtmann <marcel@holtmann.org> writes:
> 
> [...]
> 
> > Exists any tool or library that allows to read the Windows registry
> > directly from Linux if the filesystem is mounted?
> 
> If anybody has this working, it's the WINE folks.  That would be the
> place to ask.

Actually a quick google turns up two sets of code: editreg from samba
for the newer windows systems (as used by kregedit, for example) and a
perl hack called readreg95 for windows 95, 98 and millennium edition.

-- 
Henryk Plötz
Grüße aus Berlin
~~~~~~~ Un-CDs, nein danke! http://www.heise.de/ct/cd-register/ ~~~~~~~
~ Help Microsoft fight software piracy: Give Linux to a friend today! ~

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Support for stored link keys
  2005-04-22 22:55           ` Henryk Plötz
@ 2005-04-23  0:00             ` Marcel Holtmann
  0 siblings, 0 replies; 12+ messages in thread
From: Marcel Holtmann @ 2005-04-23  0:00 UTC (permalink / raw)
  To: bluez-devel

Hi Henryk,

> > > Exists any tool or library that allows to read the Windows registry
> > > directly from Linux if the filesystem is mounted?
> > 
> > If anybody has this working, it's the WINE folks.  That would be the
> > place to ask.
> 
> Actually a quick google turns up two sets of code: editreg from samba
> for the newer windows systems (as used by kregedit, for example) and a
> perl hack called readreg95 for windows 95, 98 and millennium edition.

they write something about a regedit library. It would be cool to have a
tool that can read/write link keys from the Widcomm and the XP Bluetooth
stack. Anyone volunteering for this job?

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Support for stored link keys
  2005-04-21 16:45       ` Marcel Holtmann
  2005-04-22 22:26         ` Scott W Gifford
@ 2005-04-24 18:12         ` Fred Schaettgen
  1 sibling, 0 replies; 12+ messages in thread
From: Fred Schaettgen @ 2005-04-24 18:12 UTC (permalink / raw)
  To: bluez-devel

On Thursday, 21. April 2005 18:45, Marcel Holtmann wrote:
> > > The Widcomm stack stores it somewhere in the Registry and actually I
> > > like to see a program that can read these keys from the Registry if the
> > > Windows root partition is mounted. Anyone?
> >
> > This would be cool :)
>
> Exists any tool or library that allows to read the Windows registry
> directly from Linux if the filesystem is mounted?

What I tried a while ago was to export BlueZ link keys to reuse them with 
Microsoft's bluetooth stack. The idea was to write a .inf-file under Linux, 
which can later be applied under windows to put the link key into the 
registry. IIRC it was basically working, but I didn't include into the KDE 
link key manager so far, because I had to change permission of some keys and 
I didn't know how to do that in an inf file. 
The same approach should work for the Widcomm stack, too. It's not fully 
automatic, but it would be flexible and safe.
It should also be easy to write a small windows tool to extract the contents 
of the windows bluetooth stack to use it with BlueZ. Extracting it directly 
under Linux would be more efficient, but I don't think it's worth the effort. 
It won't hurt much if windows had to be started to transfer link keys. It's 
meant for Windows/Linux dual boot users anyway.

Fred

-- 
Fred Schaettgen
bluez-devel@schaettgen.de


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Support for stored link keys
  2005-04-21 14:46 [Bluez-devel] Support for stored link keys Marcel Holtmann
  2005-04-21 15:55 ` Mitja Pufic
@ 2005-04-28 18:28 ` David Woodhouse
  2005-04-29  9:37   ` Marcel Holtmann
  1 sibling, 1 reply; 12+ messages in thread
From: David Woodhouse @ 2005-04-28 18:28 UTC (permalink / raw)
  To: bluez-devel

On Thu, 2005-04-21 at 16:46 +0200, Marcel Holtmann wrote:
> Another thing is if we should use /var/lib64/bluetooth on 64-bit
> platforms? What is the deal for the /var directory on these
> architectures?

Only arch-specific binary stuff which is 64-bit should go in lib64.
Since none of that should be in /var anyway, I think there is
no /var/lib64.


-- 
dwmw2




-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Support for stored link keys
  2005-04-28 18:28 ` David Woodhouse
@ 2005-04-29  9:37   ` Marcel Holtmann
  0 siblings, 0 replies; 12+ messages in thread
From: Marcel Holtmann @ 2005-04-29  9:37 UTC (permalink / raw)
  To: bluez-devel

Hi David,

> > Another thing is if we should use /var/lib64/bluetooth on 64-bit
> > platforms? What is the deal for the /var directory on these
> > architectures?
> 
> Only arch-specific binary stuff which is 64-bit should go in lib64.
> Since none of that should be in /var anyway, I think there is
> no /var/lib64.

so using /var/lib/bluetooth or ${localstatedir}/lib/bluetooth is okay
for storing the link keys and other information?

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-04-29  9:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-21 14:46 [Bluez-devel] Support for stored link keys Marcel Holtmann
2005-04-21 15:55 ` Mitja Pufic
2005-04-21 16:07   ` Marcel Holtmann
2005-04-21 16:34     ` Mitja Pufic
2005-04-21 16:45       ` Marcel Holtmann
2005-04-22 22:26         ` Scott W Gifford
2005-04-22 22:55           ` Henryk Plötz
2005-04-23  0:00             ` Marcel Holtmann
2005-04-24 18:12         ` Fred Schaettgen
2005-04-21 16:37     ` Mitja Pufic
2005-04-28 18:28 ` David Woodhouse
2005-04-29  9:37   ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.