Hello,

I am working on a code which supports integration of Usb device for an Embedded 
system. I am using javax.usb API. I was successfully able to send and receive 
data
from/to usb device.

However I came across a issue.
 I have an infinite thread which polls for the data (swiped by user). I am 
using pipe.syncSubmit() method. The problem comes when I want to shutdown the 
application and so I need
to close the polling thread, but when I closed the thread pipe.syncSubmit just 
hangs up (as it is waiting to read the data). I tried to release the interface  
interf.release(); but it also hangs up.  Using pipe.abortAllSubmission( ) 
doesn't help, So I am not able to close the pipe properly.

If Polling thread or pipe is not closed properly, then restarting the 
application causes error in sending and receiving the data from usb device. As 
it uses already claimed interface. (as interface was not release previously 
since pipe is not closed successfully).

I can't use pipe.asyncSubmit method, as I am not sure when user is going to 
swipe the card and using waitUntilComplete() method is same as using 
pipe.syncSubmit() method.

I don't know whether this is a potential bug in javax.usb api  or am I missing 
something. Thanks for your help

Regards
Shah





------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to