I've decided to start this blog to document process of developing InputStick. Have you ever wanted to make your smartphone a USB mouse, keyboard or maybe a gamepad? Now you can! And there is no need to install software or configure network.
First, let's start with some basic information. What exactly is the InputStick? Well, I guess that "Smartphone to USB Wireless Adapter" is most accurate description. InputStick is a small USB device, which together with smartphone (connected via Bluetooth), allows to emulate USB devices. InputStick takes care of handling USB protocol, while all logic and interaction with user is performed on a smartphone. Using Bluetooth as a communication link introduces latency and bandwidth limitations, so while keyboard can be emulated without any problems, don't expect much in case of mass storage class. At this time InputStick is able to work with Android/Java2ME devices.
Let's see how this really works:
- Plug InputStick into USB port. Nothing happens... for now.
- Start application. Application connects to InputStick and sends configuration data.
- System recognises new USB device (for example: USB keyboard).
- Application can now act as an USB keyboard: press and release keys.
- Password Manager application - use your phone to type your user name and password for you.
- Keyboard & mouse - control your PC, game console, smart TV.
- Gamepad - use your phone as a gamepad.
- Barcode scanner - use your phone as a barcode/QR code scanner (it can type scanned data!).
- RS-232 - use your phone as a virtual COM port.
- and many many more :)
Important thing is that InputStick is compatible with almost any USB host: PC (Windows, Linux, Mac), Android, game consoles, Smart TV etc. Of course, such host must be also able to work with device that is being emulated (every mentioned host will be able to work with USB keyboard, but don't expect Xbox 360 to make any use of USB thermometer).
How easy it is to add support for InputStick in Android application? If you want to implement emulation of a USB device all by yourself you need to have at least basic knowledge of how USB works (endpoints, descriptors, reports etc). If you just want to reuse already implemented device class (at this moment mouse/keyboard) it is as simple as:
additionally you may implement callback methods which will allow to receive notifications about current state of connection and receive USB reports (in case of keyboard: NumLock, CapsLock, ScrollLock status).
So, that's the general idea. In the near future I will include more technical details. Please let me know what do you think about this project. Comments and suggestions are welcome :)