Thinking of building a device for sending text and probably mouse movement into a computer, but I want it to be wireless and compatible with many computers/PDAs/phones without a specialized dongle, etc. So I thought "Hey, Bluetooth is a standard for input devices and lots of computers/PDAs/phones have it built in!" But how to get the data into the Bluetooth on the other end?

  • I could buy a Bluetooth IC and build a PCB for it, but I can't even find a place to buy them in small quantities, or find documentation without being part of a company and signing NDAs, etc.
  • I could learn the very popular Arduino with the Bluetooth adapter, but this would cost $149.95, which is not what I had in mind, and I don't know if it can even act as a keyboard/mouse.
  • I could buy a cheap USB keyboard and take it apart, figure out how the keys map to the data lines, and just stimulate them appropriately. Mouse is not so easy, though.

The last seems like the best, but do you have any other ideas?

I do not want a generic serial-over-Bluetooth board, unless it can be configured to look like a standard Bluetooth keyboard/mouse at the other end.


3 Answers 3


You'll find this is often the case, when you try to build something from off the shelf parts that duplicates an existing product, almost always the parts alone will cost more than the existing product. The reason being that they can mass produce their product, buying parts in bulk cuts down on costs etc.

Look closely at the 'serial-over-Bluetooth boards', some of them do in fact support different profiles. What you are looking for is a module that supports the Bluetooth HID profile (Human Interface Device, aka mouse, keyboard, joystick, wii remote, etc).

Check out this previous question, it lists several bluetooth modules, which you can buy in single quantities for fairly reasonable prices, some or all of them should support HID.

  • \$\begingroup\$ Ok. But which ones, specifically, and how much work is involved to get them to support it? \$\endgroup\$
    – endolith
    Nov 17, 2009 at 19:34
  • 1
    \$\begingroup\$ To find which ones specifically: Click on each of them, and read the page and see if it says "HID" anywhere on it. Then if you want to know how much work it would be: read the datasheet for the module and see how much you have to do to initialize it, send events, etc. Many of the modules you can communicate with via UART, which is usually pretty simple from a microcontroller, with "AT" commands, similar to how modems worked in the olden days. Again the datasheet should list the available commands. \$\endgroup\$
    – davr
    Nov 18, 2009 at 1:32
  • 1
    \$\begingroup\$ So like this? sparkfun.com/products/10253 \$\endgroup\$
    – endolith
    Feb 18, 2011 at 22:55

Your best bet is to take apart a combination Bluetooth keyboard/mouse and reverse-engineer them as you described. Put a scope on the mouse lines before you destroy it so you can see what you need to do.

The problem with buying a module (most of which will do SPP/DUN profiles out of the box and act like a serial port) is that you can't get your hands on the SDKs needed to reprogram those chips to do something else. You need a module with an HCI ("Host Controller Interface") firmware. This will expose the Bluetooth stack to your microcontroller via a well-specified serial interface. You will need a good understanding of Bluetooth because getting the module to do anything will require interpreting the events received via HCI and moving the state machine forward by invoking the next step via HCI. The good news is that there are plenty of examples to look at because host-side Bluetooth interfaces expose this to the operating system.

An ideal module (if such a thing exists) would be a Bluetooth 4.1 module with BLE support that exposes HOGP (HID over GATT protocol) to a microcontroller. HOGP lets you use USB HID report descriptors and comes very close to being "wireless USB". Unfortunately, BT4.1/HOGP support isn't built-in until very recent Android and Windows 8. A module that talked to a microcontroller and let it set report descriptors and then send reports would be a very handy thing.


It is not likely the solution you are looking for, but I thought it was relevant to the question:



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.