Turn your smartphone into a USB keyboard?

Hello guys,

I was wondering if you can help me in this, if possible.

What I am trying to do is:

  1. Connect my smartphone to a desktop through a USB cable (or OTG cable or anything that will do the job) and make the desktop think that a usb keyboard was connected to it and not a smartphone (hence no need for drivers installation).

  2. After usb cable connection, the smartphone will be able to send keystrokes to the desktop.

Points of consideration:

  • The desktop has no bluetooth nor wireless connections and nothing can be installed in it.
  • installing an app (downloaded from store) into the smartphone is possible, but with no kernel modifications or root, I mean out of the box solution.

From reading those two great links:
[1] Is it possible to program Android to act as physical USB keyboard? - Stack Overflow
[2] [Resolved] - Compiling Android USB Gadget drivers and insmod | XDA Forums

It appears my best option is to use a USB cable with a "special hardware level converter " and attache it both to the desktop and smartphone. It will tell the desktop it is a USB keyboard and receive keystrokes from the smartphone, before forwarding them to the desktop.

My question is:

Does such cable (or device) exist?

If yes, where can I find it?

If not, how can I make it using arduino, which I just discovered and think it is really cool? (any tips links)

Thanks!

The Arduino Leonardo or Micro has a keyboard driver. This allows it to appear to be a USB keyboard for a computer, so that is half your problem.

I would expect that you can add a Bluetooth module to the Arduino and have your phone talk to that.

I second Grumpu_mIke

Here >> https://www.sparkfun.com/products/10938 A HID compliant bluetooth may also be of your utmost concern.

Like Grumpy says: use a Leonardo as keyboard and add a bluetooth module. Make an app with for example MIT app inventor 2 that sends the character to your Aruino and just type the received char.

This appears to be a good direction to start with, thanks guys for the great tips!