John wrote:
> This is the device that is working on Windows and has been in production for
> years (with Windows API calles), I am not develop the device, what I am
> doing is use the device, simple read & write.
>
> The exactly the same code work when running in single-threaded app.
>
> when look at my libUSB code, did you see anything that should be changed?

Honestly, the app was too long for me to desk check.

You should only call libusb_claim_interface once at the beginning of
your application, and libusb_release_interface once at the end of your
application.  You need to own the interface during the entire period
that you are using it.  You don't claim and release for every operation.

libusbx does not throw any exceptions.  Your try/catch is pointless.

It looks like your read code claims the interface, submits the transfer,
then releases the interface and returns, without ever entering the event
loop.  Who is going to reap the completed URB?


> I do not currently have a USB Analyze for Linux Right,

I really meant a hardware analyzer, but I'm thinking now that's not
necessary.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to