Alan Stern wrote:
>> How do I get the "plug" event (and "unplug" too...) ?
>> Are there some docs I couldn't find?
>> As you may think the system is quite resource-constrained, so the less 
>> sw is installed, the better.
> The short answer is "hotplug events".
Yep. Sorry. I've not been clear (some weeks looking for an answer to a 
problem makes one think that all is obvious :( ).
My problem with hotplug is the translation between the shell variable 
DEVICE and "struct device" libusb expects (well, actually I should pass 
that variable to a running daemon, too, but that's another problem).

>  If you are using udev then you can 
> write scripts to do what you want.  Otherwise you will have to receive the 
> hotplug event notifications in some other way.
Same problem. shell -> libusb translation.

What I have is a daemon that handles all the connected devices. It gets 
notified of the relevant (un)plug events, so it knows when a certain 
/proc/bus/usb/BUS/DEV exists. What I don't know how to handle is the 
"opening" of that device (even better verifying it's the right device, 
too), even in presence of many other similar devices.

> You can try asking more questions on the linux-hotplug mailing list.
I thought it was more an usb 'problem' than an hotplug problem.

Tks,
  Diego.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Linux-usb-users@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to