USB Host API how to clear halt/stall

  • Replies:0
  • OpenNot stickiedUnanswered

Jan 26, 2013 7:47:44 PM via Website

I am an IT professionnal with Java experience. I am porting a Java program (it communicates with USB devices through USB interface) to Android for the first time. Everything was far simpler than I thought.

Except that I have one outstanding problem: I get a stall/halt from one particular USB device connected to Android phone with a USB OTG adapter cable:
ret = mConnection.bulkTransfer(endpoint_in, buffer, 4, 1000);
returns -1

I had the same problem in Java on Linux, Mac OS x, and Windows; I used a clear_halt and everything worked fine.

But in the Android API, there is no such thing as a clear-halt function...

Question: how do I clear a stall/halt? reset interface? how?
Once you know it, it is probably so simple stupid... but I don't.

Anybody can help me here?