How would one go about using an arduino mega ADK to emulate a USB hub with a mouse and keyboard attached? I found oodles of information from vusb and this related project, but nothing about emulating a USB hub.
\$\begingroup\$
\$\endgroup\$
3
-
1\$\begingroup\$ out of curiousity, why do you want to do this? \$\endgroup\$– vicatcuCommented Nov 30, 2011 at 4:46
-
\$\begingroup\$ I haven't seen it done before but should be possible as long you keep it low-speed. Just read USB spec about protocol diffrences between host and hub and modify vusb or any other stack based on that. I do not see any reason why it shouldn't be possible. \$\endgroup\$– CougarCommented Nov 30, 2011 at 16:29
-
\$\begingroup\$ @vicatcu I'm using a smartphone as a keyboard and mouse using an arduino as an intermediary \$\endgroup\$– JeffreyCommented Nov 30, 2011 at 16:38
Add a comment
|
1 Answer
\$\begingroup\$
\$\endgroup\$
2
If you realy want to emulate a hub with two devices I don't thin an AVR is up to that task. Maybe take an off-the-shelve USB hub chip.
But I think you can emulate a composite device (mouse and keyboard in one device).
-
1\$\begingroup\$ +1 for this. If the requirement is "emulate 1 keyboard and 1 mouse via 1 USB cable" then this is the way to go. For a quick solution Jeffrey might also consider to wire two arduinos to an actual hub and programm 1 arduino as a mouse and the other as a keyboard. That might simplify the software development. \$\endgroup\$– 0x6d64Commented Nov 30, 2011 at 11:03
-
\$\begingroup\$ I wasn't aware of composite devices, I'll look more into that. \$\endgroup\$– JeffreyCommented Nov 30, 2011 at 16:39