The identification is a topological identification. So more than an
OS-specific value, I would call it a setup-specific value (as in: if I add
a hub between my computer and my device, the location ID will change, just
like the device path would).

The value I see in using the platform's location ID is exactly what I
mentioned: it allows you to discover a device outside of libusbx's world
and find it and then address it in libusbx's world (or vice versa).
Location ID identifiers are somewhat opaque (for example on my Mac it seems
like the bus number uses 8 bit, but then the subsequent port information
uses less bits), and while they all describe the path to a device, I
wouldn't want to depend on code in my app that would try to produce a
correct platform location ID from a libusbx device path.

Location ID usually becomes important when one wants to be able to
consistently address "that device in that port." For example, it is used by
the open source PL2303 driver for OS X; if you plug a USB to serial adapter
in the same port in the Mac, it will have the same device name
(e.g. /dev/cu.PL2303-00001004 where 00001004 is the network-ordered
Location ID 0x04010000). A user interface is also a good client for
Location ID as a simple way to allow one to recognize the same device
plugged in the same port (which is important if the UI, or a service
attached to the UI, needs to offer its own addressing scheme and
consistently refer to that device in a  given port through that addressing
scheme).

YA

On Tue, May 22, 2012 at 4:06 PM, Peter Stuge <pe...@stuge.se> wrote:

> Hi Yves,
>
> Yves Arrouye wrote:
> > It seems to me that location ID is worth being part of the topology
> > information, and offers a reliable way to identify a device on both
> > the libusbx side of things and the native OS side too.
>
> What about the portability of the information? I mean: with
> platform-specific values the identification only works for that
> particular operating system. Does this warrant some consideration,
> or not so much?
>
>
> Thanks!
>
> //Peter
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> libusbx-devel mailing list
> libusbx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libusbx-devel
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to