Metal_Muffin
Posts: 1
Joined: Sun Oct 15, 2017 6:24 pm

RPi 3 as Windows 10 HID?

Sun Oct 15, 2017 6:41 pm

Ok, let me see if I can explain:

I have a Pi3 with the Pi 7 inch capacitive touch screen. I am using Python and Kivy to create a GUI that I would like to send key-presses to a windows machine as a keyboard and/or game controller. I would also like to incorporate real-world hardware (encoders, switches, LEDs) thru the GPIO. I would like this to happen via USB. I do not want to use wifi (VNC). Bluetooth would be ok if it would be the only and/or best way, but really I'd like to keep things wired for my application.

I am aware that I can not use the USB ports due to the architecture of the USB BUS, but is there some way to use the GPIO?

Should I use, say, I2C with an Arduino nano which can be loaded to act as an USB HID?

I've been struggling with this for a minute and any advice would be helpful.

drgeoff
Posts: 11122
Joined: Wed Jan 25, 2012 6:39 pm

Re: RPi 3 as Windows 10 HID?

Sun Oct 15, 2017 9:44 pm

The voltage levels of RPi GPIOs are not directly compatible with USB even if you had software to bit bang the waveforms, decode the responses and implement a USB stack.

A more promising approach might be to get a USB to 3.3 volt serial converter. Plug the USB into the PC and connect the serial side to serial on the RPi GPIO. Agreed not HID.
Quis custodiet ipsos custodes?

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: RPi 3 as Windows 10 HID?

Mon Oct 16, 2017 1:34 pm

Using an arduino is indeed a good approach as you need an usb client device. If you use something like a leonardo, it can appear to the host as hid keyboard, mouse or gamepad. It can also appear as serial device. Some chinese clones are even cheaper than a ftdi serial cable. Just be carefull with the voltage levels. Most arduino's use 5V and the pi gpio's are 3V3 only.

fredoll
Posts: 228
Joined: Thu Jan 10, 2013 10:30 am

Re: RPi 3 as Windows 10 HID?

Mon Oct 16, 2017 1:42 pm

Why not use a Pi Zero: it can be used as a USB gadget, I suppose HID is not too far away ?

DirkS
Posts: 10419
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: RPi 3 as Windows 10 HID?

Mon Oct 16, 2017 5:44 pm

fredoll wrote:
Mon Oct 16, 2017 1:42 pm
Why not use a Pi Zero: it can be used as a USB gadget, I suppose HID is not too far away ?
Indeed. I'm currently playing with a Zero in Gadget mode, using both ethernet and HID gadgets at the same time (keyword: libcomposite).
Good documentation (meaning something that I can understand ;) )is not easy to come by. though.

Return to “Advanced users”