esp32-usb-host-demos
esp32-usb-host-demos copied to clipboard
Problem with printer demo.
Hi,
I'm testing your demos with ESP32-S3 and some POS printers. Two printers are working fine, but I'm not able to make one Oxhoo printer work. The problem is a function usb_host_interface_claim - fails with error 0x106 ESP_ERR_NOT_SUPPORTED.
On Windows, this device has a description like in the file attached. What I found it has two Configuration Descriptor sections??
I've also attached Wireshark capture file where the last lines show how the device is recognized and also demo print to the printer from the windows app - it should be useful. Do you have any ideas on how to initialize this printer to make it work?
Marcin.
USB descriptors are very confusing when captured on Windows or anything with high speed or super speed USB ports. Some USB devices report different descriptors depending the USB speed: full (12Mbits/s), high (480Mbits/s), and super speed (I don't remember). The ESP32 can only do full and low speed.
To see the USB descriptors the ESP32 sees, set "Tools | Core Debug Level" to "Verbose". This will show the USB descriptors on the Serial monitor window.
In the first "Interface Descriptor" the Class, SubClass, and Protocol are (7,1,2) which is what the print demo is looking for. It might be useful to post the entire output to the Serial monitor with Verbose debug level. If this descriptor is what the ESP32 receives, I am not sure why the claim would fail.