loading

Bluetooth HID (human interface device) modules will let you create bluetooth peripherals that can pair with mobile devices out-of-the-box (like bluetooth keyboards, gamepads, mice, etc.).

If we're looking to build our own bluetooth HID device, the hefty price of a single HID module can spike the budget of a project (like the BlueSMiRF HID for $40 USD, or the BlueFruit EZ-KEY HID for $20 USD).

An inexpensive bluetooth serial module commonly used by hobbyists, the HC-05, sells for $3 USD, but is not HID capable by default. With a bit of a firmware hack though, we can turn this cheaper module into a bluetooth HID module.

It may look like there's a lot of steps below, but it's actually just a very thorough guide. The flashing process of the HC-05 itself takes no longer than a minute after we have extracted the firmware from the RN-42 once.

Step 1: Watch the Video!

Check out this quick video, for a run-through all the steps below from start to finish.

Click here to watch on YouTube

Step 2: A Comparison of the Two Modules

This cheaper module is the HC-05 and sells for around $3 on ebay.

By itself, this module isn't HID capable. But luckily, this module actually uses the same chip (the BC417) as the RN-42 bluetooth module, which also powers the $40 BlueSMiRF HID modules.

The only differences between these modules are the firmware and the location of the pin outs.

So here's the plan - to make our $3 module HID enabled, we'll just have to copy over the firmware from the RN-42 chip to the HC-05.

It's as simple as that!

Where to buy

SOLDERING GEAR:

TEST GEAR:

Step 3: Get the BlueSuite Tools

The chip manufacturer, CSR, has made their tools publicly available.

Head over to this link:

https://www.csrsupport.com/document.php?did=31600

to download the manufacturer's BlueSuite toolset, which is what we'll be using to dump the module's firmware using the parallel port of a PC.

The download will require a quick, free of charge registration.

Step 4: Building the Programmer

For the chip to communicate with our PC, we'll need to connect the SPI pins into these pins of the parallel port.

We'll need use a few resistors to create voltage dividers that will step down the parallel port's 5v transmission levels to the chip's 3.3v levels.

The MISO pin will transmit to the parallel port at 3.3v, which the PC will still recognize.

We'll simply add an 100ohm resistor here to prevent the the module from being overloaded.

We'll also need an external 3.3v power source to power the chip.

Step 5: Get a Parallel Cable

Here's the parallel cable I'll be using, the male end will connect to the PC and the female end will connect to the chip.

Paper clips will fit snugly inside the slots of the female end, so we'll cut up a few pieces and solder them to some loose wires so that we can connect it to our breadboard.

Step 6: Put Together the Voltage Dividers

Here are the voltage dividers I made from salvaged resistors, as per the schematic in step 4.

The values of the resistors used in the voltage dividers don't have to be the same, as long as the two resistors in each voltage divider has a 2:1 ratio.

Step 7: Connect the RN-42 Pins

Here is the RN-42 module that we'll need to extract the firmware from.

We'll need to access the SPI (MOSI,CLOCK,MISO,CSB) pins, as well as the VDD and GND pins.

If you want to make your life easier, you could get a breakout board instead of actually soldering wires to the pins.

If you do solder the pins directly, make sure you keep the wires separated with a bit of tape so nothing shorts unintentionally.

Step 8: Power Up the Chip

Now we're going to plug everything into our breadboard, and power up the chip.

I'll be using my regulator to output a 3.3V supply to the chip.

If you hook up an LED on PIO5, you can check the status of the module. When the chip is just turned on, you should see the LED blink.

Step 9: Install BlueSuite

On the PC side, the BlueSuite tools have been reported to work best on a Windows XP machine, so that's what I'm using here.

Install the package we downloaded earlier - and check the box in the installation dialog to install the LPT device driver and also set the debug transport to LPT.

Reboot when prompted, then head into the BIOS to make sure that the Parallel port mode is set to ECP.

Step 10: Some Possible BlueSuite Errors

I've seen two errors from BlueSuite before, and they're not very descriptive as to what's actually wrong.

Here's how I solved both these errors:

1) Legacy Plug and Play detection not enabled (first picture)

  • Go to System Properties (right-click My Computer)
  • Under the Hardware tab, go to the Device Manager
  • ECP Printer Port, go to its properties
  • Under port settings, check Enable legacy Plug and Play detection
  • Hit OK and reboot

2) Chip not detected (second picture)

  • Either the chip is not powered, under powered, or there's a faulty connection
  • Check the wiring and try again

Step 11: Dump the RN-42 Firmware

If everything went well, then you should be access to access this dialog.

If you hit Stop Processor, you'll get an acknowledgement that the chip is recognized.

The Firmware ID button will let you see what firmware version your chip currently has.

But for now, we'll hit Dump and choose a location to save our firmware.

Fortunately, we only ever have to do this once. As long as you keep this dump, you'll be able to flash any HC-05 chip with this HID firmware.

When that's done, you'll have two files. Tuck them away, and fire up PSTool.

Step 12: Dump the RN-42 Config

PSTool will let us manage the settings of the chip, like bluetooth address, baud rate, etc.

We'll need to make a dump of all these settings too. Goto File > Dump, then choose a location to save the config file.

Once we have the three files (two from the firmware dump, one config file), we're done with the RN-42 chip.

Step 13: Prepare the HC-05

Here's our $3 module, the HC-05.

This one comes with a breakout board for some of the pins. We'll need to cut away the shrink wrapped housing to access the SPI pins.

If we look at the pin out of the HC-05, we'll notice that the pin placement is different from the RN-42. For the HC-05, the SPI pins are conveniently grouped together on the bottom.

Step 14: Make a Clothespin Programmer

We'll want an easier way to flash these chips in the future so we don't want to be soldering wires to the pins directly.

And here's what I came up with - a clothespin with pins and wires attached. All we need to do is clamp it onto the chip and plug it into our breadboard.

Step 15: Prepare to Flash the HC-05

First, make a dump of the HC-05 following the exact same steps as we did with the RN-42 module, for safe-keeping.

When we flash the HC-05, all the settings of the chip will be overwritten by the RN-42 settings.

We need to preserve the bluetooth address and antenna settings of the HC-05, so open up the HC-05 config file in a text editor, and preserve the three entries: PSKEY_BDADDR, PSKEY_ANA_FTRIM, PSKEY_ANA_FREQ. Save this config file as another file.

Step 16: Flash the HC-05

Now we're going to flash the chip.

Run BlueFlash, stop the processor, hit Choose File, select the RN-42 dump, and hit Download.

Step 17: Revert a Few HC-05 Configs

We'll need to revert the bluetooth address and antenna settings of the HC-05.

So open up PSTool, go to File > Merge, and select the config file containing the three entries, PSKEY_BDADDR, PSKEY_ANA_FTRIM, PSKEY_ANA_FREQ, that we saved from step 15.

That's it! We're done!

Step 18: Conclusion

This might seem like a long process, but after doing it once, it'll take you no longer than a minute to flash a chip.

I'd like to thank Robin Gross (and his blog, Byron's blog) for being one of the first to document how to build a programmer for the BC417 chip.

You can check out his blog here: http://byron76.blogspot.ca/

---

That's all I have for you today!

In an upcoming project, I'll be showing you how to build an actual device with this chip, so come back and don't miss it!

If you liked this Instructable, then perhaps you'll like some of my other projects!

You can check them out over at my YouTube channel.

Thanks guys! I'll see you next week!

I don't have RN-42 but my friend sent me the firmware. the problem is despite all my efforts i could't start the blueflash (No SPI Trasnports found! ), Fixed legacy mode too.<br>is it possible to start the program without connecting the actual RN-42?<br>I tried both Win XP and 10 RS2 pro. im pretty sure my connections are OK.<br>can anyone help me with that?
<p>hello, i'm trying to flash the firmware...</p><p>i could not get the LPT port connection to work so i tried the FTDI<br>connection with the custom drivers but now when it is connected the blueflash is not openning</p>
<p>Hi, first of all thank you so much for the tutorial, but I have a question. The ground of the voltage divider and the ground of the 3.3v source have to be connected together? Thanks</p>
<p>yess</p>
thanks
<p>Dump files here <a href="http://pastebin.com/V91PZBnJ" rel="nofollow">http://pastebin.com/V91PZBnJ</a></p>
<p>Just wanted to say that I appreciate you sharing this, Thank you. Will test it out once i'm done using my BT module for a school project. </p>
<p>Good work, BUT, a lot of work to save 17 dollars. And the firmware on the RN-42 may be copyrighted, and that could lead to legal issues.</p>
How is there a copyright infringement? From what I can tell the firmware comes from Qualcomm directly and is being flashed right back on an identical Qualcomm chip. On top of that the CSR's motto is &quot;Push every boundary&quot;. I think this instructable is fallowing the manufactures motto
<p>If you or anyone uses code they did not write to make a new chip, a duplicate of the chip written by another person or company, it's copyright infringement.</p>
Thats the thing; the modules are different manufactures but the chips sets are the same and the firmware comes from the chip manufacture (which is patented) not the module manufactue from what I can tell. My understanding is firmware is not covered under copyright laws. It would be covered under patents and trade secret laws to protect an embedded algorithm. And with the firmware publicly available from the chip manufacture.... I dont think think the firmware is protected by either. Even If it is protected some how the firmware was still writen by the chip manufacture for that chip set. If anyone was infringing on a patent it would be the module manufacture of the HC-05. Right?
<p>Firmware is just software. Software can be copyrighted. This software *IS* copyrighted.</p>
<p>Funny, that's what I've been saying all all along. Thanks russnelson1</p>
<p>What you call &quot;firmware&quot; is software written to an EEPROM. If you &quot;vampire&quot; that software, then write it to a chip, you've circumvented the company that makes the written chip their rights to make a profit from writing the software to a chip and selling it. It <u><strong>is</strong></u> a copyright violation. And possibly a patent violation (if the company filed one).<br><br>The HC-05 maker is merely providing a blank programmable EEPROM on a board that can be incorporated into projects where you write your own software if you're so inclined. The person copying someone else's work and re-writing it to a blank EEPROM is the person who could have trouble.</p>
That's silly. Besides, who cares.
<p>The US Federal Code of Laws does not see it as &quot;Silly&quot;, nor does the manufacturer of the chip being copied.</p>
<p>as I told you - the firmware is designed by Roving Networks.... NOT Qualcomm...</p><p>How do I know?.... Look me up on LinkedIn </p>
<p>it is - looks at the RN42 datasheet</p>
<p>A lot of comments about copyrights. For the firmware to be protected by copyright, there must be a copyright notice within the firmware binary. If it's a proper notice, then it can be protected, otherwise not.</p><p>This same issue enabled AMD to create a multibillion dollar company when Intel made some of it's work product available without such copyright notice.</p>
<p>Uh, no. Under the Berne convention, everything is copyrighted as soon as you put pen to paper or hands to keyboard. Just google &quot;Russ Nelson&quot; if you doubt me.</p>
??
<p>I do not have a parallel device or port on my computer. Is there another way to flash the device?</p><p>If you already answered this I apologize.</p><p>[Had trouble getting through all the flamers].</p><p>VERY nice job by the way :)</p><p>Thank you :)</p>
<p>Could you please share this firmware?</p>
<p>Hello there, help me to program the module using another programmer rather than parallel port...... i dont have one.... please help</p>
<p>I started in computers back when we used &quot;reel to reel&quot; tape and &quot;punch cards&quot;. I understood about 65% of what your video said. BUT, fortunately you did a great job of explaining things (calling your friend a nimnule for buying the expensive chip, breaking in all down, the nomenclature of the parts, where to get software, etc.). Great job.</p>
<p>This young man is obviously very bright. His video is very informative, with nice delivery and more entertaining than most. Folks, settle down and learn! Way too much chatter about everything, but the intent to share knowledge. Pay attention and there is plenty of knowledge to use in the future. Very well done, you can do what you want with this new skill or let your verbal output block your brains input. :-)</p>
Yes. Well said, sir.
<p>and do i need a rn42 first to port the firmware ? or just i need an hc 05 module , that's it..... all pics connections are of rn42 i am not able to find hc 05 connection, please help</p>
<p>i dont have a parallel port....... what to do ?</p>
<p>Hello, can not get the Bluesuite prggie</p><p>Do i have to make a account on that csr site? Or na!</p><p>Great ible btw</p>
<p>Because its not Qualcomm's code... Its Roving Networks' (now Microchip)</p><p>It is certianly copyright infringement.</p>
<p>I really enjoyed your $3 Bluetooth HID Module video. It was funny in places and good info. Thanks.</p>
<p>pretty much what i was thinking -- here's an easy way to spend $23 to &quot;save&quot; $17. It seems that there is something lacking in the description. otherwise it is a very thorough 'ible.</p>
<p>Whoa! =O</p><p>Great project! =D</p>
<p>useful info on upgrading yr bluetooth firmware also here <a href="http://elasticsheep.com/2012/06/bluetooth-module-parallel-spi-interface/">http://elasticsheep.com/2012/06/bluetooth-module-p...</a></p><p>and here <a href="http://byron76.blogspot.nl/2011/09/upgrade-your-bluetooth-module.html">http://byron76.blogspot.nl/2011/09/upgrade-your-bl...</a></p>
<p>Very interesting, but do i understand correct one also needs the RN42 model to pull the firmware off? Hmm, not that convenient if u only want one HID enabled module</p>
This is awesome! I have been looking for details on how to go about doing this for ages. Thanks!
<p>Now, where did I put that old desktop that still had a parallel port....</p><p>awesome project! :-)</p>
<p>I haven't tried it with this firmware, but you can use an FTDI USB adapter to flash the HC-05 as well. (I know it works when flashing HC-05 firmware to HC-06 modules.) You have to install the DLL in the BlueSuite directory and make a few other changes, but it works just as well as the Parallel Port solution. (Still get the same error sometimes.)</p><p><a href="https://github.com/lorf/csr-spi-ftdi" rel="nofollow">https://github.com/lorf/csr-spi-ftdi</a></p>
Nice that you also talk about the errors :)
You are a genius.
Nice! I like your yt channel as well, especially the midi drums!!!
This is really in depth for a quick bios flash for a chip, thanks!!

About This Instructable

75,295views

688favorites

License:

Bio: www.youtube.com/EvanKale91 === www.facebook.com/EvanKale91 === www.twitter.com/EvanKale91 === www.evankale.blogspot.ca
More by EvanKale:Pokemon Card Door Guitar Cajon Mod (Internal Snare) Ratchet Knob (Unidirectional mechanism) 
Add instructable to: