Due as USBHost for Midikeyboard

Hi,
I'm looking for a way to connect my Midikeyboard (MAudio Oxygen 61) to my Arduino Due via USB. This could end up in an extremly cheap and flexible way to access analog audio gear without the need of expensive analog keyboards.
I already digged into some interesting links i found on the forum and the web, i like to share with you.

http://makezine.com/2010/11/30/usbhacking/ - he already did it! - but i can't access his code.
http://www.beyondlogic.org/usbnutshell/usb1.shtml - how usb works in a nutshell
Getting Arduino Due's Native USB Port Descriptors - Arduino Due - Arduino Forum - this code gives me quite realistic values.
http://www.usb.org/developers/devclass_docs/midi10.pdf - midi standard explained

Now i have to establish the connection between the due and the keyboard. I already read through the library files of USBHost (Usb.cpp, Usb.h) and tried to understand the magic going on in the MouseController.h / .cpp
I got quite stuck here. What are basically the next steps to go, to access the data from the keyboard?
I experimented a little bit with accessing the endpoints in my device, but i can only configure the standard endpoint 0.

Anyone out there already tried something similar?
Thanks a lot!

[EDIT]
Today i stumbled upon a very interesting link

Still some help appreciated :wink:

Hi.

About i can only configure the standard endpoint 0.
It was expected.
Because USB-MIDI device is one of USB -Audio device, not USB-HID device.
The USB keyboard/mouse are belong USB-HID and use the interrupt transfer of USB.
But the USB Audio device used the isochronous transfer of USB, normally.
USB MIDI device 1.0 http://www.usb.org/developers/devclass_docs/midi10.pdf

I haven't completed to study above document.
But I guess if you want to port it from USB Keyboard/Mouse drvier,
You should do something as below.
1.change the class id, subclass id, protocol id.
2.You should remove useless setup transfer that USB-HID have in enumeration stage
3.you should add specific setup transfer if it was mentioned in above document
before enumeration completed
4. register the isochronous transfer into host that will help you to complete the transfer that you want.

You can not do that. You need a USB host shield - that contains another processor that acts as a USB host, the Arduino only has a USB client on it and that is a different thing.

Grumpy_Mike:
You can not do that. You need a USB host shield - that contains another processor that acts as a USB host, the Arduino only has a USB client on it and that is a different thing.

So why is there a Library called "USBHost" for the Arduino Due, which lets it act as a USB host to connect USB mouse and keyboard?

i dont think he got that we were talking about DUE. btw how did you go with this ?

Has there been any progress with this? I'm very interested for similar reasons. I'd like to add USB connectivity to a Due synth project I found online. Also, the link to the USB standard document doesn't work. The site reports "Resource not found".

Anybody figure out how to make a DUE act as a USB midi host?

I guess nobody has gotten the Due to act as Midi host yet? I'm very interested too!

Hopefully this isn't too off-topic... I partially implemented MIDI usb host on Teensy 3.6 recently.

It's able to receive MIDI messages from whatever devices you plug in, but (at least so far) it lacks the ability to send message to the devices. I've personally tested it with two commercial MIDI controllers, and at least 1 other person has confirmed it worked. Still needs more people to help test on more types of MIDI devices...

Here's the code if anyone's interested.