osx - How can I keep track of a USB device across disconnections? -
i've got bunch of usb serial devices (these precise: http://plugable.com/products/pl2303-db9) and, if @ possible, "keep track" of them across unplug/replug events (even if replug event different usb port).
the driver appears create bsd dialin/callout/tty device names usb location, changes depending on usb port plug them into.
looking @ iokit property dictionaries between 2 identical devices plugged 2 separate usb ports, differences in sessionid
, usb address
, locationid
, portnum
or in values appear derived locationid
. sessionid
appears change, well, per session (i.e. different after every unplug/replug).
since these devices return 0
iserialnumber
, think i'm screwed here, figured i'd toss out here , see if has ideas. there maybe generic facility write "token" usb device can read back? don't see in quick skimming/googling of usb standard, facility trick...
any ideas?
unfortunately, there's no way (and if figure 1 out, please post here, i've been trying come 1 years).
the problem, have surmised, there's no unique id on device itself. if devices had unique serial numbers (exposed in iokit property dictionaries), handle it, , if there little bit of user-addressable flash on device access, write it, far i've been able divine, there isn't any.
the thing i've been able far keep track of locations , tell people connect devices same ports if want devices recognized. however, in case, have predictable set of devices, handle serial numbers, able bit of querying devices @ other end of serial line directly.
Comments
Post a Comment