mik3y / usb-serial-for-android

Android USB host serial driver library for CDC, FTDI, Arduino and other devices.
MIT License
4.82k stars 1.58k forks source link

"Queueing USB request failed" in Realme C11 running android 11. #452

Closed yureka closed 1 year ago

yureka commented 1 year ago

When try to queue the reading request, UsbRequest is throwing following error

W/SerialInputOutputManager: Run ending due to exception: Queueing USB request failed java.io.IOException: Queueing USB request failed at com.hoho.android.usbserial.driver.CommonUsbSerialPort.read(CommonUsbSerialPort.java:200) at com.hoho.android.usbserial.driver.CommonUsbSerialPort.read(CommonUsbSerialPort.java:169) at com.hoho.android.usbserial.util.SerialInputOutputManager.step(SerialInputOutputManager.java:225) at com.hoho.android.usbserial.util.SerialInputOutputManager.run(SerialInputOutputManager.java:203) at java.lang.Thread.run(Thread.java:923)

caoluming commented 1 year ago

I have the same problem, how did you solve it? thanks

yureka commented 1 year ago

When the USB Device has hub, UsbRequest is throwing the above error. Without hub, able to read properly.

caoluming commented 1 year ago

Thank you for your suggestion, I also show that it is related to the hardware here.

caoluming commented 1 year ago

This is the case with some devices I've detected here, and the frequency of that device's appearance is uncertain. That device, which had never appeared before, appeared suddenly, and the frequency gradually increased. After restarting the MCU, the situation improved, but the device still had this situation, it felt like the cause of the MCU.

kai-morich commented 1 year ago

I mentioned some reasons here: https://github.com/mik3y/usb-serial-for-android/wiki/FAQ#My_device_sporadically_disconnects_with_codeQueueing_USB_request_failedcode

caoluming commented 1 year ago

Yes, it is indeed a hardware problem on my side