8
\$\begingroup\$

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.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ out of curiousity, why do you want to do this? \$\endgroup\$
    – vicatcu
    Commented 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\$
    – Cougar
    Commented 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\$
    – Jeffrey
    Commented Nov 30, 2011 at 16:38

1 Answer 1

4
\$\begingroup\$

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).

\$\endgroup\$
2
  • 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\$
    – 0x6d64
    Commented Nov 30, 2011 at 11:03
  • \$\begingroup\$ I wasn't aware of composite devices, I'll look more into that. \$\endgroup\$
    – Jeffrey
    Commented Nov 30, 2011 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.