1

Is it possible to create an IP-to-USB HID (keyboard) using Arduino?

I'd like to connect an Arduino to my network using Ethernet, and then send it commands using TCP/IP and have those commands translated to USB HID and sent as keystrokes to the connected PC.

I've found a few articles discussing USB HID emulation using the Arduino Uno (see http://mitchtech.net/arduino-usb-hid-keyboard) but it refers to using GPIO pins as buttons.

Am I correct that this might work if I use an Arduino Uno and then purchase an Arduino Shield Ethernet? (seems a bit expensive, but is this the cheapest option?)

Thanks in advance!

  • And it's not the cheapest option. You might want to check Arduino HID first, to see which type of Arduino can handle HID. You could also buy an Arduino Nano and arduino ethernet module on eBay (which should be around $10) but might take a 15-30days shipping. – Paul Mar 31 '16 at 10:50
1

Yes, it is perfectly possible.

You ideally need an Arduino with a direct USB interface, such as the Leonardo. Then you can just access the Keyboard object to send the keystrokes to the PC. How your receive the data through Ethernet is entirely up to you. A simple TCP interface may be easiest - open the connection with whatever telnet-like client and whatever you type gets sent through. The trick will be getting it into character-at-a-time mode.

  • Thanks for the information! So I would need a Leonardo and then connect my own USB connector to the I/O pins? Also, what would be the cheapest way to add the Ethernet connection? – SofaKng Mar 28 '16 at 16:10
  • No, with the Leonardo you just plug the USB cable into the on-board USB socket. No need to do anything dodgy with GPIO pins. The cheapest ethernet is probably using WiFi with the ESP8266. – Majenko Mar 28 '16 at 16:12
  • What about the Leonardo ETH version? (I'm not too found of wireless, usually) – SofaKng Mar 28 '16 at 16:13
  • 1
    Perfect board. Has everything you need. Just plug in the USB and Ethernet cables and write a sketch. Nothing else needed. – Majenko Mar 28 '16 at 16:14
  • Thank you so much! Any recommends for a case? – SofaKng Mar 28 '16 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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