Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usb_host_interface_claim throw error when connect a special tsc printer on esp32-s3 #9

Open
yourchanges opened this issue Dec 8, 2022 · 0 comments

Comments

@yourchanges
Copy link

yourchanges commented Dec 8, 2022

esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40376c54
SPIWP:0xee
mode:DOUT, clock div:1
load:0x3fce3808,len:0x39c
load:0x403c9700,len:0x9bc
load:0x403cc700,len:0x2900
entry 0x403c98c0
[    86][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[   133][I][usbhhelp.hpp:79] usbh_setup(): [] usb_host_install: 0
[   133][I][usbhhelp.hpp:90] usbh_setup(): [] usb_host_client_register: 0
[   518][I][usbhhelp.hpp:40] _client_event_callback(): [] New device address: 1
[   518][I][usbhhelp.hpp:49] _client_event_callback(): [] speed: 1 dev_addr 1 vMaxPacketSize0 64 bConfigurationValue 1
[   524][I][show_desc.hpp:44] show_dev_desc(): [] bLength: 18
[   529][I][show_desc.hpp:45] show_dev_desc(): [] bDescriptorType(device): 1
[   536][I][show_desc.hpp:46] show_dev_desc(): [] bcdUSB: 0x110
[   542][I][show_desc.hpp:47] show_dev_desc(): [] bDeviceClass: 0x00
[   548][I][show_desc.hpp:48] show_dev_desc(): [] bDeviceSubClass: 0x00
[   554][I][show_desc.hpp:49] show_dev_desc(): [] bDeviceProtocol: 0x00
[   561][I][show_desc.hpp:50] show_dev_desc(): [] bMaxPacketSize0: 64
[   567][I][show_desc.hpp:51] show_dev_desc(): [] idVendor: 0x483
[   573][I][show_desc.hpp:52] show_dev_desc(): [] idProduct: 0x5720
[   579][I][show_desc.hpp:53] show_dev_desc(): [] bcdDevice: 0x0
[   584][I][show_desc.hpp:54] show_dev_desc(): [] iManufacturer: 1
[   590][I][show_desc.hpp:55] show_dev_desc(): [] iProduct: 2
[   596][I][show_desc.hpp:56] show_dev_desc(): [] iSerialNumber: 1
[   602][I][show_desc.hpp:57] show_dev_desc(): [] bNumConfigurations: 1
[   608][I][show_desc.hpp:64] show_config_desc(): [] bLength: 9
[   614][I][show_desc.hpp:65] show_config_desc(): [] bDescriptorType(config): 2
[   621][I][show_desc.hpp:66] show_config_desc(): [] wTotalLength: 32
[   627][I][show_desc.hpp:67] show_config_desc(): [] bNumInterfaces: 1
[   633][I][show_desc.hpp:68] show_config_desc(): [] bConfigurationValue: 1
[   640][I][show_desc.hpp:69] show_config_desc(): [] iConfiguration: 0
[   646][I][show_desc.hpp:74] show_config_desc(): [] bmAttributes(Self Powered): 0xc0
[   653][I][show_desc.hpp:75] show_config_desc(): [] bMaxPower: 50 = 100 mA
[   660][I][show_desc.hpp:82] show_interface_desc(): [] bLength: 9
[   666][I][show_desc.hpp:83] show_interface_desc(): [] bDescriptorType (interface): 4
[   674][I][show_desc.hpp:84] show_interface_desc(): [] bInterfaceNumber: 1
[   680][I][show_desc.hpp:85] show_interface_desc(): [] bAlternateSetting: 0
[   687][I][show_desc.hpp:86] show_interface_desc(): [] bNumEndpoints: 2
[   694][I][show_desc.hpp:87] show_interface_desc(): [] bInterfaceClass: 0x07
[   700][I][show_desc.hpp:88] show_interface_desc(): [] bInterfaceSubClass: 0x01
[   708][I][show_desc.hpp:89] show_interface_desc(): [] bInterfaceProtocol: 0x02
[   715][I][show_desc.hpp:90] show_interface_desc(): [] iInterface: 0
[   721][I][usbhprinter.ino:67] check_interface_desc_printer(): [] Claiming a bi-directional printer!
[   730][I][usbhprinter.ino:70] check_interface_desc_printer(): [] usb_host_interface_claim failed: 105
[   739][I][show_desc.hpp:100] show_endpoint_desc(): [] bLength: 7
[   745][I][show_desc.hpp:101] show_endpoint_desc(): [] bDescriptorType (endpoint): 5
[   752][I][show_desc.hpp:104] show_endpoint_desc(): [] bEndpointAddress(In): 0x81
[   760][I][show_desc.hpp:107] show_endpoint_desc(): [] bmAttributes(Bulk): 0x02
[   767][I][show_desc.hpp:108] show_endpoint_desc(): [] wMaxPacketSize: 64
[   773][I][show_desc.hpp:109] show_endpoint_desc(): [] bInterval: 0
[   779][I][usbhprinter.ino:99] prepare_endpoints(): [] usb_host_transfer_submit In fail: 105
[   788][I][show_desc.hpp:100] show_endpoint_desc(): [] bLength: 7
[   794][I][show_desc.hpp:101] show_endpoint_desc(): [] bDescriptorType (endpoint): 5
[   801][I][show_desc.hpp:104] show_endpoint_desc(): [] bEndpointAddress(Out): 0x03
[   809][I][show_desc.hpp:107] show_endpoint_desc(): [] bmAttributes(Bulk): 0x02
[   816][I][show_desc.hpp:108] show_endpoint_desc(): [] wMaxPacketSize: 64
[   822][I][show_desc.hpp:109] show_endpoint_desc(): [] bInterval: 0
[   828][I][usbhprinter.ino:109] prepare_endpoints(): [] Out data_buffer_size: 512
[257770][I][usbhprinter.ino:179] loop(): [] usb_host_transfer_submit Out fail: 105

here is the related code:

esp_err_t err = usb_host_interface_claim(gUsbClientHandle(), gUsbDeviceHandle(),
        intf->bInterfaceNumber, intf->bAlternateSetting);

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?

@yourchanges yourchanges changed the title usb_host_interface_claim throw error when connect a special tsc printer on esp32-收 usb_host_interface_claim throw error when connect a special tsc printer on esp32-s3 Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant