ESP32-S3, problem with usb_host_interface_claim() - ESP_ERR_NOT_SUPPORTED
Posted: Tue Nov 15, 2022 3:36 pm
Hi,
I have a custom board with ESP32-S3. It is working as USB host for USB POS printers. Everything is working fine for most of the printers I used but I have a problem with only one but have node idea why. Everything is working fine, until I'm trying to call usb_host_interface_claim, and this function returns error 0x0106 ESP_ERR_NOT_SUPPORTED.
Does anyone have an idea why this can happened? I need to send data to one of the endpoints of this printer but can't sort out this problem.
I tested on ESP-IDF 4.4 and 5.0 and it the same problem. Just to test on the 5.0 I used example usb_host_lib with few lines added to action_get_str_desc() function:
And the output is like this for this printer:
I have a custom board with ESP32-S3. It is working as USB host for USB POS printers. Everything is working fine for most of the printers I used but I have a problem with only one but have node idea why. Everything is working fine, until I'm trying to call usb_host_interface_claim, and this function returns error 0x0106 ESP_ERR_NOT_SUPPORTED.
Does anyone have an idea why this can happened? I need to send data to one of the endpoints of this printer but can't sort out this problem.
I tested on ESP-IDF 4.4 and 5.0 and it the same problem. Just to test on the 5.0 I used example usb_host_lib with few lines added to action_get_str_desc() function:
Code: Select all
err = usb_host_interface_claim(driver_obj->client_hdl,
driver_obj->dev_hdl,
0, 0);
if (err != ESP_OK)
{
ESP_LOGE(TAG, "usb_host_interface_claim(): 0x%04X", err);
}
else
{
ESP_LOGI(TAG, "usb_host_interface_claim(): OK");
}
Code: Select all
I (313) DAEMON: Installing USB Host Library
I (353) CLASS: Registering Client
I (823) CLASS: Opening device at address 1
I (823) CLASS: Getting device information
I (823) CLASS: Full speed
I (823) CLASS: bConfigurationValue 1
I (823) CLASS: Getting device descriptor
*** Device descriptor ***
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0x0
bDeviceSubClass 0x0
bDeviceProtocol 0x0
bMaxPacketSize0 64
idVendor 0x403
idProduct 0x6001
bcdDevice 6.00
iManufacturer 1
iProduct 2
iSerialNumber 3
bNumConfigurations 1
I (853) CLASS: Getting config descriptor
*** Configuration descriptor ***
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
bMaxPower 0mA
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 0xff
bInterfaceSubClass 0xff
bInterfaceProtocol 0xff
iInterface 2
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 0x2 BULK
wMaxPacketSize 512
bInterval 0
*** Endpoint descriptor ***
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x2 EP 2 OUT
bmAttributes 0x2 BULK
wMaxPacketSize 512
bInterval 0
I (923) CLASS: Getting Manufacturer string descriptor
OXHOO
I (92
I (923) CLASS: Getting Product string descriptor
TP90
I (933) CLASS: Getting Serial Number string descriptor
FT9MNX5O
E (943) CLASS: usb_host_interface_claim(): 0x0106