Open yourchanges opened 1 year ago
@yourchanges Could you post a copy of the tsc printer's full-speed configuration descriptor?
follow the https://www.beyondlogic.org/usbnutshell/usb5.shtml I think mostly info is included in the pre-post logs, and here is the info when the printer connected a linux machine:
[2022-12 14 11:19:14 2022] usb 1-2.2: new full-speed USB device number 20 using xhci_hcd
[2022-12 14 11:19:14 2022] usb 1-2.2: config 1 has an invalid interface number: 1 but max is 0
[2022-12 14 11:19:14 2022] usb 1-2.2: config 1 has no interface number 0
[2022-12 14 11:19:14 2022] usb 1-2.2: New USB device found, idVendor=0483, idProduct=5720, bcdDevice= 0.00
[2022-12 14 11:19:14 2022] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=1
[2022-12 14 11:19:14 2022] usb 1-2.2: Product: Datong Printer
[2022-12 14 11:19:14 2022] usb 1-2.2: Manufacturer: Datongsmart
[2022-12 14 11:19:14 2022] usb 1-2.2: SerialNumber: Datongsmart
[2022-12 14 11:19:14 2022] usblp 1-2.2:1.1: usblp2: USB Bidirectional printer dev 20 if 1 alt 0 proto 2 vid 0x0483 pid 0x5720
@yourchanges
[ 674][I][show_desc.hpp:84] show_interface_desc(): [] bInterfaceNumber: 1
[2022-12 14 11:19:14 2022] usb 1-2.2: config 1 has no interface number 0
From your log, it looks like the interface's number (i.e., bInterfaceNumber
is 1
) but you're attempting to claim interface number 0
.
Our code already use what we just got:
esp_err_t err = usb_host_interface_claim(gUsbClientHandle(), gUsbDeviceHandle(),
intf->bInterfaceNumber, intf->bAlternateSetting);
and I also tried following cases:
esp_err_t err = usb_host_interface_claim(Client_Handle, Device_Handle, 1, intf->bAlternateSetting);
esp_err_t err = usb_host_interface_claim(Client_Handle, Device_Handle, 0, intf->bAlternateSetting);
I got error too:
[ 722][I][usbhprinter.ino:67] check_interface_desc_printer(): [] Claiming a bi-directional printer!
[ 731][I][usbhprinter.ino:70] check_interface_desc_printer(): [] usb_host_interface_claim failed: 105
It seems the not working printer is a full-speed printer, but the worked printer is just the high usb printer, it related or not?
Answers checklist.
General issue report
here is the test code:
here is output
here is the related code:
so when we call usb write, there also be an error "[257770][I][usbhprinter.ino:179] loop(): [] usb_host_transfer_submit Out fail: 105"
any ideas about this problem?