I've just start playing with the MKR USB host. I've read some general instructions about how to use the native USB as USB host and I added the GD Sports (GitHub - gdsports/USB_Host_Library_SAMD: USB host library 2.0 for Zero/M0/SAMD) library, since it is said to work correctly with the MKR and has Prolific / FTDI driver support.
So far I've been trying to run the basic examples but can't see anything working yet.
Have some of you already worked with USB host on this MKR boards? I tryed the keyboard and mouse examples, the usb.Init() returns normally and no errors are shown, but it also doesn't recognize the keyboard or mouse when plugged in.
Actaully, my results are (Using the KeyboardController or MouseController example):
- When nothing is connected:
Keyboard Controller Program started USB state changed: 0x0 -> 0x20 Device Attached USB state changed: 0x20 -> 0x30 Resetting Device USB state changed: 0x30 -> 0x40 Reset complete
-When a keyboard or a mouse is connected:
Keyboard Controller Program started USB state changed: 0x0 -> 0x12 Detached, waiting for Device
When nothing is attached on the USB port, the 3 states messages occurs instantly on start up.
The results are the same doesn't matter if I am using the GD Sports lib or not.
Well, I'm looking for more information on this feature and how can I debug and move further on it.