user939: I am starting simple, but for some reason I cannot find any examples online and I stuck with my task.
I have a usb midi keyboard, Arduino Yun, and a synthesiser that can accept midi via usb. The problem is that the synth doesn't send a voltage through its usb and the keyboard has only one usb that is used to send midi data and it's powered via it at the same time.
My idea is to use my Yun's USB host (which sends voltage too) to power my midi keyboard and grab all incoming midi data from the keyboard, then simply pass it unchanged through to my synth.
Where do I start? Do I need some python code for it or everything can be done with sketch code? I've done few arduino projects but I am new to usb host functionality  . This is my first step, later I would like to also convert usb-midi to 5-din-midi (old school connection), but that's different story.
Can you guys help me and point into the right direction? Anyone done something similar on Yun? I've seen some examples done on different boards, but it's all overcomplicated, I need simple read/pass usb solution. Thanks!

user6802: You need the USB Audio kernel driver and the aconnect utility:
$ opkg update
$ opkg install kmod-usb-audio
$ opkg install alsa-utils-aconnect

Then just connect the ports:
$ aconnect -lio
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 40: 'SC-8820' [type=kernel]
    0 'SC-8820 Part A  '
    1 'SC-8820 Part B  '
    2 'SC-8820 MIDI    '
client 44: 'My Little Keyboard' [type=kernel]
    0 'My Little Keyboard MIDI 1'
$ aconnect "My Little Keyboard" SC-8820
$

(This is plain Linux and does not need to run anything on the ATmega.)

939: <p>I am starting simple, but for some reason I cannot find any examples online and I stuck with my task.</p>

<p>I have a usb midi keyboard, Arduino Yun, and a synthesiser that can accept midi via usb. The problem is that the synth doesn't send a voltage through its usb and the keyboard has only one usb that is used to send midi data and it's powered via it at the same time.</p>

<p>My idea is to use my Yun's USB host (which sends voltage too) to power my midi keyboard and grab all incoming midi data from the keyboard, then simply pass it unchanged through to my synth.</p>

<p>Where do I start? Do I need some python code for it or everything can be done with sketch code? I've done few arduino projects but I am new to usb host functionality  . This is my first step, later I would like to also convert usb-midi to 5-din-midi (old school connection), but that's different story.</p>

<p>Can you guys help me and point into the right direction? Anyone done something similar on Yun? I've seen some examples done on different boards, but it's all overcomplicated, I need simple read/pass usb solution. Thanks!</p>
 6802: <p>You need the USB Audio kernel driver and the <code>aconnect</code> utility:</p>

<pre><code>$ opkg update
$ opkg install kmod-usb-audio
$ opkg install alsa-utils-aconnect
</code></pre>

<p>Then just connect the ports:</p>

<pre><code>$ aconnect -lio
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 40: 'SC-8820' [type=kernel]
    0 'SC-8820 Part A  '
    1 'SC-8820 Part B  '
    2 'SC-8820 MIDI    '
client 44: 'My Little Keyboard' [type=kernel]
    0 'My Little Keyboard MIDI 1'
$ aconnect "My Little Keyboard" SC-8820
$
</code></pre>

<p>(This is plain Linux and does not need to run anything on the ATmega.)</p>
