Subject: Re: usb device polling
To: Jukka Marin <firstname.lastname@example.org>
From: Jachym Holecek <email@example.com>
Date: 04/12/2005 17:51:18
> I wanted to write a small program to lauch pilot-xfer whenever I press
> the hotsync button of my Treo. The program kept trying to open()
> /dev/ttyU0 to see when Treo is ready. It worked - but then pilot-xfer
> can no longer talk to the Treo (it seems the open() causes this).
> How can I poll for the USB device to appear without doing an open()?
> I could parse the syslog output but that sounds even more kludgy...
If you just want to catch the 'device appeared/disappeared' event,
you can give kern/29485 and bin/29486 a try ;-). Works for PCI, PCMCIA,
USB -- supporting other buses is just a mechanical task I didn't yet
have time to do.
If, for some reason you don't want to, you can also use /dev/usb as
described in usb(4).
-- Jachym Holecek