From: David <do...@gm...> - 2008-05-29 15:36:12
|
Daniel Drake wrote: > David wrote: >> I'm confused about the claim_interface function. I thought when a >> process opens >> a device and claims an interface this process has exclusive rights to >> the interface endpoints. >> When another process opens the device the claim_interface function >> works also but the >> behavior when receiving bytes from the interface endpoint is undefined >> (sometimes the first >> process gets the bytes and sometimes the second). > > Can't reproduce this. > Are you definitely claiming the same interface in both programs? > > I just ran libusb's dpfp example, which started running and waiting for > fingerprint scans. Then I ran it again in another terminal, and the 2nd > one bailed out immediately: > > libusb:debug [libusb_claim_interface] interface 0 > usb_claim_interface error -6 > libusb:debug [libusb_close] > > -6 is LIBUSB_ERROR_BUSY > > Seems to be working here. Linux 2.6.25. > > Daniel > Sorry, you're right. I claimed two different interfaces on the same device. Thanks for you're help. David |