Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to recover from a stall in chrome.usb?
    text
    copied!<p>I'm sending an out bulk transfer, and I stall it in the device (I write the code on both end of the cable) to abort the action. I'm sending a home-made control transfert SET_FEATURE ENDPOINT_HALT to the endpoint and when the abort is complete, I follow up with a CLEAR_FEATURE ENDPOINT_HALT to recover the endpoint and use it again. In the embedded debugger I can confirm it has been cleared in the device. But in the browser, any subsequent transfer on the endpoint will end up with the very unhelpful "Transfer failed" message (code 1).</p> <pre><code>if (errorCode == 4) { var ENDPOINT_HALT = 0; var CLEAR_FEATURE = 0x01; controlTransfer(currentDevice, {direction: 'out', recipient: 'endpoint', requestType: 'standard', request: CLEAR_FEATURE, value: ENDPOINT_HALT, index: 1, data: new ArrayBuffer(0)}, genericErrorFilter()); } </code></pre> <p>From what I found on the Internet, <a href="http://en.wikipedia.org/wiki/Libusb" rel="nofollow noreferrer">libusb</a> has a special function for clearing a stall on the host side, to tell the kernel that the endpoint has been recovered, and it should reflect that in its internal structures. This function is not exposed in chrome.usb.</p> <p>Is there a way to recover from a stall in Chrome? Or is there an alternative recoverable way from the device to stop an ongoing out bulk transfer?</p> <p>I'm using Mac&nbsp;OS&nbsp;X and <a href="https://en.wikipedia.org/wiki/Google_Chrome#Release_channels_and_updates" rel="nofollow noreferrer">Chrome Canary</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload