© 2016 Tobias Trumm licensed under MIT license
Use your Android device as an USB keyboard on your Raspberry Pi (or other Linux devices).
I wrote this app mainly because I wanted to learn how to communicate between Android and other devices over USB. Do not expect it to work flawlessly, not all keys will work. If you are looking for a simple way to control your Raspberry Pi from your Android device there are probably better solutions out there. Depending on the software keyboard on your Android device this app will work better or worse. I have got the best results using Hacker's Keyboard.
- Install the app on your Android device and copy the python scripts from the
linux_client/
directory to your Raspberry Pi. - Attach your Android device to your Raspberry Pi with an USB cable.
- Get the vendor ID of your Android device. Open a terminal and execute
lsusb
. You will see a list of USB devices with their vendor and product ID. The first 4 characters are the vendor ID. - Start the
accessory.py
script withsudo python accessory.py xxxx
. Replacexxxx
with your vendor ID. - A message asking for permission to use the USB connection should have appeared on your Android device. Accept it. Now you should be able to use your Android device as a keyboard.
- To exit the python script, use
Ctrl
+c