USB MIDI support added for Arduino Due USB host native port

Tested with Korg nanoKontroller2 and OTG to host cable on native USB port.

WARNING: External power via barrel connector is required. I used a 12VDC 1.5A wall wart which is overkill but it was at the top of my junk box.

The Due USB host stack does not support hubs so only 1 device can be connected.

Sometimes after uploading, the MIDI device is not recognized. Press the Due reset button or unplug/plug the MIDI device to recover.

The library should still work with the USB host shield but I cannot confirm this because I do not have one.

bidrectional_converter is enable?

I cannot get this to work. I have verified all the hardware and can read descriptors from the keyboard using a different program. Nothing is happening on the USB cable according to my scope. Can I get some more information on what drivers to install?

Install the following using Library Manager.

  • USBHost by Arduino for Arduino Due. Do not install the USB Host Shield Library.
  • MIDI Library by Forty Seven Effects

Install the following library manually from Be sure to use the due branch.

The USBH_MIDI_dump example works. The USBH_MIDI_converter example compiles but I do not have time to test it. The other examples do not compile.

By the way, the Teensy 3.6 has better USB host drivers including MIDI for its native USB host port. And it is much faster than the Due.