linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Accessing usb devices with USBDEVFS
@ 2006-04-28 17:44 Danny Budik
  2006-04-28 21:14 ` Greg KH
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Danny Budik @ 2006-04-28 17:44 UTC (permalink / raw)
  To: linux-hotplug

I have a question that may or may not be related to hotplugging. I have 
noticed that when I plug in a USB device, it takes about 5 seconds for 
it to show up in /proc/bus/usb/001/xxx. I am using HAL to recognize when 
a USB device is plugged in and USBDEVFS to communicate with my device.

When I plug it in, dbus/HAL instantly recognizes it and sends me a 
message.  But when I make the function call to open it (using fopen on 
the file above) I get an error that the device is not found. In fact, it 
takes about 5 seconds for the device to show up in the /proc/bus/usb/ 
directory so I have to place a sleep(5) line in my C code before I am 
able to open the device.

My test machine is a PIII 733 with FC4, latest kernel, so it is a 
relatively slow machine. Is there a way to predict the time that it 
takes for the device to be accessible with USBDEVFS so that I don't have 
to hardcode the sleep statement?

Thanks,
Danny Budik


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

end of thread, other threads:[~2006-05-05 21:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-28 17:44 Accessing usb devices with USBDEVFS Danny Budik
2006-04-28 21:14 ` Greg KH
2006-04-29 13:06 ` Kay Sievers
2006-05-01 15:39 ` Danny Budik
2006-05-01 16:57 ` Greg KH
2006-05-01 19:00 ` Danny Budik
2006-05-01 19:06 ` Greg KH
2006-05-01 19:09 ` Kay Sievers
2006-05-05 20:45 ` Danny Budik
2006-05-05 21:02 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).