Wednesday, 9 January 2013

Introduction

Hello everyone!

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:
  1. Plug InputStick into USB port. Nothing happens... for now.
  2. Start application. Application connects to InputStick and sends configuration data.
  3. System recognises new USB device (for example: USB keyboard).
  4. Application can now act as an USB keyboard: press and release keys.
  
Why would anyone want to use InputStick? Just a few examples:
  • 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 :)

15 comments:

  1. I think this is a really neat thing. I am not a programmer, but have always wanted to turn my phone into a USB keyboard. I was hoping it could be done simply with an app and the charging cable, but it seems this is a much more plausible method. Hope it works out for you!

    ReplyDelete
    Replies
    1. Thanks, I'm glad that you like it :) At first I have considered using USB cable or wired version of InputStick, but after all Bluetooth seems way better. It solves range problem, also there is no need to root your Android device and install custom roms.

      Delete
  2. This is a great idea. I work in education and I think that it would be ideal for pupils with physical difficulties. How far away is this device from marketing? Best wishes Paul Bonsor

    ReplyDelete
    Replies
    1. At this time it's really difficult to say anything about production/marketing, but I'm spending a lot of time working on this project, so I hope it should happen sooner rather than later. Is there any specific functionality that you think about? At this time I can think of speech to text (Android 4.1 provides offline speech recognition) and some keyboard macros.

      Delete
  3. This is f****** genius. Seriously. I came here from another thread looking for a way to use my phone as a USB keyboard - your idea is the next best thing to the wired solution I was looking for and as you say it definitely has even some advantages compared to wired. So my point: Ineedonerightnaaaaao.... ;) Seriously, are you planning on open-sourcing it? Selling it? Either way, you might consider launching a Kickstarter - I'd be very, very surprised if it didn't take off in a major way - at least major enough for a small factory production run.

    ReplyDelete
    Replies
    1. I actually think about crowdfunding campaign (probably indiegogo.com as Kickstarter is only for US/UK), maybe even by the end of this month. That depends on many things, I already have 100% working prototype, now I mainly fix bugs/improve software. Anyway, it looks like I will need at least 100-250 units for a small production run.

      Delete
    2. You may be somewhat late with that: http://www.indiegogo.com/projects/add-new-usage-cases-to-your-android-device?c=home Also, Indiegogo is for fools - nothing ever gets funded, because of lack of exposure. Anyway, is the project dead, or did it just get delayed because of "real-life" issues (which is actually the same thing)...?

      Delete
    3. Well, since I live in Poland I don't have much of a choice and Indiegogo seems to be the best one. Project is definitely not dead, it's just that some things are taking a little bit more time that I have initially assumed. However at this point, I'm really close to finally releasing it. There are still some things on my todo list, like recording a HQ promotional video (I did my youtube videos with cheap digital camera, making some images and that kind of stuff. That shouldn't take too long :)

      Now, regarding hiDBLUE:
      1)49€?! That's a rip-off! At this point I consider offering InputStick at 39$ (approx 29€), which is 40% less.
      2)hiDBLUE is a USB keyboard+mouse+custom_hid, while InputStick can be dynamically configured to be any kind of USB device (so you can also use it as a game controller, MIDI instrument, sensors etc)
      3)InputStick is a little bit smaller, what can be important if you want to carry the device with you, all the time (I've attached mine to my keyring)

      Delete
    4. I understand that - I brought up the hiDBLUE more like a cautionary tale of what happens when things take too long, and more importantly, on how things work on IGG: I'm convinced that the hiDBLUE is condemned to fail not because of its price point or (missing) features, but because practically nobody saw it... other than that, I absolutely agree with you on 1/2/3, and I'm glad the project is still on track.

      If you know ANYBODY in the UK who can be trusted with a small-ish amount of money, it's worth considering asking him/her to front the campaign (UK is now eligible on KS too). Alternatively, I'd consider writing to Adafruit Industries (US) for advice - I wouldn't expect Ladyada herself to help with the campaign, but your idea is just too good - she might know someone else who might be willing to help with this, as she's probably quite sympathetic to what is means to start up something form zero.

      If all else fails, I'd still try the "Propagate" service from Seeed (http://www.seeedstudio.com/wiki/index.php?title=Propagate_Manual) - I don't pretend to be familiar with it, but basically it looks like an offer to manufacture and sell a design on your behalf, even in small quantities; and Seeed seem to be fairly OK folks, I've ordered both products and prototype PCBs from them (they definitely are the cheapest for that, worldwide) and they delivered absolutely impeccably.

      Anyway, sorry to meddle in all that - it's none of my business of course, I'm just an interested party...

      Delete
    5. I've considered KS/KS UK, but in the end I think there would be too many complications with that. If someone is really interested in this project there should be no big difference if it is hosted on IGG/KS. I totally agree with you, that for the project to be successful, people have to know about it. I'll be starting threads on Android/hardware related forums. Also, I won't be making the same mistakes that they did with hiDBLUE, where google search returns 0 results unless you put the name in quotes. Anyway, if everything goes as planned (well, sometimes there's a problem with that...) I should be starting my campaign in next few days.

      Delete
  4. I have an Android device that was built before MTP was supported for transferring file but, with recent upgrades, now supports it. Based on this, the USB class that it claims to be can't be hardware defined and must be defined in software.

    IIRC, this project has Android devices (with what I think is a stock kernel) talking as some USB class that was definitively not built in. This indicate to me that you might be able to control what USB classes it support without kernel work but I don't know for sure.

    As for the Host side (i.e. the PC), I've never seen a PC, Mac or Linux box need special drives for keyboards, even for some rather esoteric devices that claim to be keyboards (bar-code scanners, credit card and smart card readers, etc.) so the generic drivers should be good enough for what I'm wanting.

    All that argues that what I'm looking for can be done from a hardware point of view, but says very little about what software support exists and nothing about if there is an app for it.

    Is there a way to make the device claim to be a keyboard/HID when plugged into a USB port and "type in" the contents of the clipboard? More accurately; What would it take to make it happen?
    .net barcode recognition

    ReplyDelete
    Replies
    1. I don't know of any software only method to use Android as USB HID device, that will work without root, custom ROM or with most available devices.

      As for your question: do you need to type contents of Android device's clipboard? If that is the case, then you can use InputStick + USB Remote app (http://inputstick.com/index.php/applications/remote-control).

      Delete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Hello.
    Congratulations for your great work. I'm designing a way to provide remote technical support by taking advantage of your invention. But I would like to know if there is an app for windows? Thanks in advance for your reply

    ReplyDelete
    Replies
    1. Hi,
      please contact me by email, it will be easier to discuss details:
      http://inputstick.com/contact/

      Delete