MAX3421E USB Host shiled with HID Interface

Dear Sir
My name jnut software house from Thailand.
Now I have some confuse about USB Host Shiled MAX3421E with HID Device interface
My detail

  1. After I read Device Description success
    Device Descriptor-----------------
    bLength :12
    bDescriptorType :01
    bcdUSB :0110
    bDeviceClass :00
    bDeviceSubClass :00
    bDeviceProtocol :00
    bMaxPacketSize0 :08
    idVendor :04D9
    idProduct :E000
    bcdDevice :0110
    iManufacturer :01
    iProduct :02
    iSerialNumber :03
    bNumConfigurations:01

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

09 02 29 00 01 01 00 80 32 09 04 00 00 02 03 00 | …)…2…
00 00 09 21 10 01 00 01 22 2F 00 07 05 81 03 20 | …!.."/…
00 01 07 05 02 03 08 00 01

Interface Description HID :
interface descriptor structure
bLength :09
bDescriptorType :04
bInterfaceNumber :00
bAlternateSetting :00
bNumEndpoints :02
bInterfaceClass :03
bInterfaceSubClass :00
bInterfaceProtocol :00
iInterface :00

End Point Descriptor 0x81 :
Endpoint descriptor structure
bLength :07
bDescriptorType :05
wTotalLength :81
bNumInterfaces :03
bConfigurationValue:0020
iConfiguration :01

End Point Descriptor 0x02 :
Endpoint descriptor structure
bLength :07
bDescriptorType :05
wTotalLength :02
bNumInterfaces :03
bConfigurationValue:0008
iConfiguration :01

Read Device info Success…

Step 1 Set Address -------------
WRITE PSUD (8): 00 05 01 00 00 00 00 00 addr = 00 Enpoint = 00
WRITE BUFF (0): Data Empty…

Step 2 Set Config --------------
WRITE PSUD (8): 00 09 01 00 00 00 00 00 addr = 01 Enpoint = 00
WRITE BUFF (0): Data Empty…

  1. I send Command for init USB Host it reurn Error
    Step 3
    WRITE PSUD (8): 22 09 00 03 00 00 08 00 addr = 01 Enpoint = 00
    WRITE BUFF (8): 43,01,07,00,00,00,00,00,
    This Out Transfer rHCTL = 40
    Step 4
    WRITE PSUD (8): 21 09 00 03 00 00 08 00 addr = 01 Enpoint = 00
    READ DATA From Device : >>>>> Error >>>>> FS Timeout

Question :
My process mistake ?

I am not sure mistake something
I’m sorry, my English is not good.
Best Regards
J.nut

2-19-2021 11-12-16 AM.jpg

@Jnut

Your topic was Moved to it's current location / section as it is more suitable.

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here. It will help you get the best out of the forum in the future.

There are library functions that do what you need to do such as setting address and config. Look it up in the library code.

If you are using an HID device, you should follow one of the HID example code that automatically sets address, config, and driver. Then you just read data. What HID device is it? You never mentioned.

I'm not familiar with the software you posted. If I understand correctly, even without using any HID drivers, UHS library WILL set the address of your device upon insertion. So your starting point should be to enumerate its descriptors and set configuration.

You posted a bunch of printouts but no code. I wonder how you got the printouts, with arduino code or other tools?

How much USB do you understand, for instance, if you have a USB keyboard, can you successfully enumerate it, set configuration, and start polling for data, without using the UHS HID driver? That's the starting point I would go with if I were to understand a custom HID device. I can also compare what I do and get vs what UHS HID driver does to the keyboard to see any flaws in my understanding. Good luck.

Dumping some log is no substitute for explaining what you want to do. I will ask you a simple question:

What is the last control transfer supposed to do? The fact that you received naks could be you issued the wrong request.

You can post the format of this request as a response to my question.