Skills

Bluetooth SMD Module - RN-42-HID

Description: This is the same Roving Networks Bluetooth module that you already know and love, but it comes firmware-configured for the HID protocol. HID, or “Human Interface Device,” is the communication protocol used for computer peripherals such as keyboards, mice and joysticks. This makes the RN-42-HID a simple and powerful tool for creating wireless peripheral devices which can be universally recognized and used without the installation of special drivers. The manual included in the documentation below goes into more detail about the Bluetooth HID profile.

The RN-42 is perfect for short range, battery powered applications. The RN-42 uses only 26uA in sleep mode while still being discoverable and connectable. Multiple user configurable power modes allow the user to dial in the lowest power profile for a given application.The RN-42 is even FCC and Bluetooth SIG certified making it a complete embedded Bluetooth solution.

Customer Comments

I’m really glad to see a HID BT module finally for sale! It’s also nice that you can (apparently) use UART commands to swap back and forth between HID and SPP profiles, depending on your needs.
I’m curious though, why not use the Bluegiga WT12 instead?WT12 Manufacturer Page
It’s absolutely awesome for microcontrollers, has ample free documentation, and has great user-upgradable (free) iWRAP firmware that can do all kinds of profiles, including HID, simultaneously. The company has great support and customer service, and you can buy the modules in small quantities easily from Mouser or SemiconductorStore.

I think they may have changed their page structure a bit. However, the WT12 page says this:

Up to 14 supported Bluetooth profiles in iWRAP firmware

…which links to this page. The profiles supported out of the box by the iWRAP5 firmware running on the WT12 are these:

Serial Port Profile (SPP): DevA and DevB

Bluetooth Health Device Profile (HDP): Sink and source modes

Dial-up Networking Profile (DUN): Terminal emulation

Object Push Profile (OPP): OPP server and client

File Transfer Profile (FTP): FTP client

Human Interface Device (HID): HID device

Hands-Free Profile (HFP) v1.6: HPF mode

Headset Profile v1.2 (HSP): HSP mode

Phone Book Access Profile (PBAP): PBAP client

Message Access Profile (MAP): Client

Device Identification Profile (DI)

The WT32 (not WT12) additionally supports these:

Advanced Audio Distribution Profile (A2DP): Sink and source modes

A/V Remote Control Profile (AVRCP): AVRCP controller and target

Hands-Free Profile (HFP) v1.6: HFP-AG (audio gateway) mode

Headset Profile v1.2 (HSP): HSP-AG (audio gateway) mode

…and all WT* modules can support the Apple iAP profile with special firmware available free upon providing proof of MFI program membership. It isn’t the cheapest module out there, admittedly, but you’ll be hard-pressed to find one that can do as much.

Thanks Jeff, I did see the stuff about the iWRAP, but the list of protocols for the WT12 itself didn’t mention HID whereas the WT32 page did, so I figured it likely didn’t do it. I’d be interested to know if anybody has actually used it for HID.

They are more expensive, but you can get them for $25 from Mouser if you buy 100+ of them. Mouser’s single-quantity price is only $26.66, actually.
For the added functionality and open, supportive nature of Bluegiga, I know the premium would be worth it to some people (especially if it was on a breakout board).

I gotta say, I concur with Jeff.
If all I want to do over the bluetooth link is serial data, (via SPP) I’ll use an RN-41.
If I just want to build a bluetooth HID device, this’ll probably be the module I look at.
But after reading about the WT12, I’ve just added another handful of projects to my todo list which would have been impossible without support for the other profiles.

What is the current firmware version on these modules? It would be nice if you showed this in the description so we know what we are getting as the firmware cannot be upgraded.
The last few i bought (only a few months ago) had firmware version 6.03 whereas the latest firmware is 6.15. The previous release to 6.15 was version 6.11 and this was in 2011. There are features missing in the 6.03 release.

Here is another library for this module with the arduino leonardo.. It does everything from switching between HID/SPP to HID reports .. If you’ve used the arduino leonardo USB HID then this library won’t be strange for you.. Here is the link: https://github.com/baselsw/BPLib

While in RadioShack recently, I noticed they had a product called SchmartBoard which allows hand soldering SMD. Does anyone here know if something like this would work with this part? (www.schmartboard.com) – their demo video does make me think I could do this.

Hi,
I have been trying to use this module and I want to save power when I am not transmitting.
Here is the user manual - http://www.sparkfun.com/datasheets/Wireless/Bluetooth/rn-bluetooth-um.pdf

Now My requirements are these
1. keep the module connected to my pc
2. transmit “Hello” to pc when a button pin 12 goes high on the arduino, this will happen by button press

So when I am not transmitting, I want to be able to keep the device in sleep mode. The command for that is SW,8000
However my module is still consuming 25 miliamps when not transmitting. Has anyone tried this?

Hi,
Would we require anything at the laptop end like a dongle?
Or would we have to install something on the laptop to be able to send keystrokes?
My question is if I want to send UP, DOWN, LEFT, RIGHT to the laptop to play a game, how would I do it?

Kind of a newbie question -
In order to create an HID device that would connect to my PC, I would like to connect one of these to a USB connector.
How exactly do I do this?
Which additional parts do I need?

Kind of. We’ve got the BlueSMiRF HID, which breaks out the commonly used pins, and is breadboard friendly. It should have everything you’d need to interface with this module (power and serial communication pins).

A true “breakout board” - something that breaks out every single pin on the module - we don’t have.

Everything works fine with the default configuration, I can discover, pair, and send data to my android 2.3 phone. The UART port also works and I can enter command mode using arduino with a 9600 baud setting. The problem comes when I want to use the SPP profile (S~,0 followed by R,1), I can discover the device but can’t pair with it anymore.

Hardware settings:
VCC/GND connected to arduino 3.3 VCC
RX,TX connected to arduino ports (5v) using a voltage divider with 20k and 10k resistors for the RX pin as suggested in the documentation pdf.
PIO7 set to HIGH (to force 9600 baud rate)
PIO8,PIO5,PIO2, connected to several leds.

LEDS: when in HID mode the status led blinks at 1Hz at power up, 10Hz in command mode, and gets disconnected when paired (the other led lights up). when in SPP mode it blinks at 2hz forever except in command mode (10hz). When I change the configuration timer to 60s it does blink at 2hz for 60 seconds and then 1Hz. The rx/tx led seems to work right.

I can connect from windows 7 with a virtual COM port, but I can’t do anything with android, I tried with two different phones, one is rooted , the other isn’t, and neither works, you can see my data in another comment below. I already filled a report in roving networks tech support page.. I’m waiting for them to answer. This is really annoying, considering that I managed to get everything working, but not with Android+SPP which was my original goal.. I just bought the HID version to have more flexibility.

I purchased this module for a school project and have been having some trouble getting it connected. I can pair with it, but I havenn’t had any success at getting it to enter command mode to adjust any of the settings. I have read the data sheets and I believe that I have everything configured appropriately. I have tried doing this both over the Bluetooth connection and through the UART interface sending ASCII codes through a terminal connection with the connection settings provided in the data sheet. I didn’t have much hope for trying it through the Bluetooth connection since by default the module is not configured for SPP. Any information or assistance in this matter would be greatly appreciated.

Since these are a special firmware, if they go out of stock, will they be replaced? Thinking of making multiple copies of a project down the line.

I can’t figure out from the documentation if i can use any of the available HID profiles to get data from 10 analog sensors (8 or 10-bit) and 4 switches to a computer at once. The profiles they show in the docs don’t look capable of having that many independently labeled parameters. Has anyone done something like this? Thanks!

Edit #

I’ve tried a couple of programs but the PDF doesn’t display in any of them (most of the text is replaced by fuzzy black bars).
Could someone who can read the file tell me what kind of protocol the module communicates with the host with? Does it take BT-HID messages as they’d be transmitted on the bluetooth channel, or is it restricted to some subset of the protocol?

The documentation seems a bit light. You program the device to be one of a set of predefined HID device types…
0000 = Keyboard
0001 = Game Pad
0010 = Mouse
0011 = COMBO
0100 = JOYSTICK
0101 = DIGITIZER
0110 = SENSOR
0111 = USE CFG
1XXX = reserved
The document displays the report format for Keyboard, Mouse and Joystick, as well as an additional Consumer report. The rest of the document describes an example of creating a keyboard.
Eg The report for Joystick mode…
0xFD | 6 | Not used | Buttons | X1 | Y1 | X2 | Y2
No documentation on the other device types. Is “USE CFG” a custom user device and report descriptor? I’m guessing the device using the RN-42-HID talks to it via the serial port.

Yes and no. Yes, it can, but they don’t give out the firmware.
So, the hardware is identical, but the firmware is not, and there’s not real easy way to get the firmware changed, so yes, you would need to buy this module if that’s what you wanted to use it for.

…What?
That doesn’t really make any sense. They advertise it as HID compliant… Do they only give it out to companies? I’d rather not pay a $5 premium on software.
Is it just me, or is Roving Networks nowhere near open enough for hobbyist use? Their website lacks downloads, proper/complete documentation, etc.
Thanks Sparkfun for making this option available!

I just contacted Roving Networks… They said they’re planning on implementing field programming in the future, with no time frame. Shame.
Oh well, thank you, Sparkfun, for being the only provider of this part I can find!

Customer Reviews

SparkFun is an online retail store that sells the bits and pieces to
make your electronics projects possible. Whether it's a robot that can
cook your breakfast or a GPS cat tracking device, our products and
resources are designed to make the world of electronics more accessible.

In addition to products, SparkFun also offers
classes and online tutorials to help educate
individuals in the wonderful world of embedded electronics.