I am using an Arduino Pro Mini connected to a M5Stack M020 USB Host Module. The M020 uses a MAX3421E which is the same chip as the genuine Arduino USB host shield uses.
I am trying to interface with a scientific datalogger. The only available interface on the datalogger is a USB port. The USB port exposes a serial console which I can connect to with Putty on Windows with no special drivers required. The device manager in Windows shows that the COM port is using the usbser.sys driver which tells me the device is detected as a CDC-ACM device.
I have tried using the acm_terminal example in the USB Host library but I cannot receive any data from the datalogger. I know my hardware is hooked up correctly and working as I have tested it with a PL2303 serial adapter and it works as expected. I am also able to send a "restart" command to the datalogger and I can see the status LEDs on the logger change, indicating it is restarting. So I am able to send commands to the datalogger, just not read data back.
In normal operation, the datalogger should echo back any sent characters over the serial port. However, I am getting nothing back. Using a logic analyzer on the USB data lines, I can see that the OUT tokens and data are being send from the host module to the datalogger. However, the logger responds with NAK to any IN tokens.
Repeating this same logic analyzer capture with the logger connected to a PC, the characters are echo'd back to the IN tokens. So the datalogger works as expected which means the problem is in the usb host library.
My question is what is the usbser.sys driver in Windows doing that allows me to communicate with the device that the USB host library is not doing? Is there something in the cdcacm library that needs to be changed to initialize the device properly?
Any help is appreciated and I can provide USB logic analyzer traces of specific tests if required.
Thanks