UPDATE: Lets Make Robots, my home digital hackerspace, was purchased by RobotShop. I don't want to go into, but the new owners banned myself and most of the veteran members. That stated, most of the links there will be broken. Luckily, I was able to make a copy of my content (the reason they banned me?) and moved it to a Github site.


For Windows users I wrote a GUI terminal app for changing the HM-1X's settings, you can find it here,

CoolKidsRobots.com (where some LMR folk live now)

UPDATE: Wrote an Instructable on Connecting an HM-10 to an iPhone

UPDATE: I published a free iOS serial terminal app for a client, but it works well for other applications.

I've also created a walkthrough on how to write an iOS app for the HM-10.

UPDATE: I had some people mention I screwed-up and posted the wrong breakout board. For that I'm sorry, please email me and we'll talk.

I have corrected the link with a new version of the breakout that should correct "all" issues (working RX/TX LEDs).

But I'll add, please use this Instructable at your own risk. I'm a Psychology major :P

I had been looking for a cheap alternative to some of the Arduino Bluetooth devices I'd seen, which in my opinion are overpriced.

Redbear's Mini: $39.95 (Note: This is a uC and BLE combo).
Redbear's Uno Shield: $29.95
BLEDuino: $19.95 (if part of Kickstarter)
Bluegiga Shield: $69.95

After seeing these, I thought I'd try to make one; this is my bumbling process for making an Arduino Bluetooth 4.0 device at home:

I highly recommend reading details about the HM-10 and interfacing with it:

Variants of the PCB can be found here; though, many are untested.

This is a fellow to keep an eye on. He is working on creating open-source firmware to replace the HM-10 firmware.

Step 1: How to Create an Arduino Compatible Bluetooth 4.0 Module

This guide is intended to show how to interface one of these HM-10 Bluetooth Low Energy modules to an Arduino.

I started working with these little Bluetooth modules in attempt to add Bluetooth 4.0 to my robot projects.

<p>Hi,</p><p>great work you did. I bought two HM-10 modules from China and I have problems to connect with. If I power the module the LED begins to blink. If I scan for bluetooth devices I can find it. If I try to connect, I got &quot;connection refused&quot;. I tried with my HTC M8 Android device and my laptop. On my laptop I got the device name &quot;BT05&quot;. </p><p>Could this be a problem with the firmware? Any suggestions how to solve it?</p><p>Thanks, Chris</p>
<p>Hey Webpicasso,</p><p>Do you have a link to the modules you purchased? Often, the issue is counterfeit modules which do not conform to the original HMSoft firmware.</p>
Here it is http://s.aliexpress.com/ZVFRBJFf
Any helpful suggestions?Thx Chris
<p>Most likely, they are counterfeit HM-10 modules, which means the firmware is your issue. If you looks at the comments below ours perrygarg and kcender discuss the matter.</p>
<p>just to let you know that Jeremy Prater's website is back online since a few days ago on this new address.. http://blog.dev-smart.net/ some of the links are broken because of the domain change, but you can manually change the domain in the URL's and get all the files, here's the firmware http://blog.dev-smart.net/wp-content/uploads/2014/03/Stock-HM-10-Firmware.zip</p>
<p>Hi,</p><p>I have <strong>Arduino Uno R3</strong> and <strong>BLE 4.0 module</strong>(<em>Please refer to Photos attached</em>) with breakout board attached. When powered and searched, it broadcasts its name as <strong>CC41-A</strong>. I am pretty new to hardware. What I am trying for now is to change any default properties (for example name) of this BLE module which this is broadcasting. I am also unable to execute any AT commands in serial monitor of Arduino IDE. No AT Command is responding anything. My connections are as follows:</p><p>Rx of BLE Module &lt;-&gt; Tx of Arduino (Pin 11 in my case)</p><p>Tx of BLE Module &lt;-&gt; Rx of Arduino (Pin 10 in my case)</p><p>GND of BLE Module &lt;-&gt; GND of Arduino</p><p>+5V of BLE Module &lt;-&gt; 5V of Arduino</p><p>(Left 2 pins of BLE Module unconnected - <strong>MCU-INT</strong> and <strong>CLEAR</strong>)</p><p>My code is as follows:</p><blockquote>#include &lt;SoftwareSerial.h&gt;</blockquote><blockquote>SoftwareSerial BLE_Serial(10, 11); // RX | TX</blockquote><blockquote>void setup()</blockquote><blockquote>{</blockquote><blockquote> pinMode(9, OUTPUT); // this pin will pull the Module pin 34 (key pin) HIGH to switch module to AT mode</blockquote><blockquote> digitalWrite(9, HIGH);</blockquote><blockquote> Serial.begin(9600);</blockquote><blockquote> Serial.println(&quot;Enter AT commands:&quot;);</blockquote><blockquote> BLE_Serial.begin(38400); // Module default speed in AT command more</blockquote><blockquote>}</blockquote><blockquote>void loop()</blockquote><blockquote>{</blockquote><blockquote> // Keep reading from Module and send to Arduino Serial Monitor</blockquote><blockquote> if (BLE_Serial.available())</blockquote><blockquote> Serial.write(BLE_Serial.read());</blockquote><blockquote> // Keep reading from Arduino Serial Monitor and send to Module</blockquote><blockquote> if (Serial.available())</blockquote><blockquote> BLE_Serial.write(Serial.read());</blockquote><blockquote>}</blockquote><p>I am getting &quot;Enter AT commands&quot; message, but not getting anything further when I enter AT commands. Please help. Its urgent. Please tell me whether there is something wrong in my code or in my connections. Thanks. :)</p><p>/perrygarg</p>
<p>Just following up on my preview reply. After searching Google and playing with it all day, I've found that you can flash the HM-10 firmware onto the fake CC41-A modules using an Arduino and a PC. The Arduino mimics a TI CCDebugger device, allowing you to flash the CC2541 chip on the board.</p><p>The following github has the Arduino sketch and Windows executable. *Note that Malwarebytes flags this program as a Trojan, but I didn't have any issues. There is also no source code or a way to dump the chip's current flash memory.</p><p><a href="https://github.com/RedBearLab/CCLoader" rel="nofollow">https://github.com/RedBearLab/CCLoader</a></p><p>Module Pinout: <a href="https://flashandrc.wordpress.com/2014/08/26/bluetooth-hid-firmware-tested-on-hm-10/" rel="nofollow"> https://flashandrc.wordpress.com/2014/08/26/bluet...</a></p><p></p><p>You also need to get a full dump of a HM-10 firmware. This isn't the firmware on the manufacture's site. That firmware doesn't have the bootloader/low level firmware code. I Google'd for HM-10 open source firmware and found a project by jeremy-prater. He has on his site the stock firmware in the downloads section. I didn't care if I broke this module, so I changed the download file from .hm1 to .bin and flashed it. The module then booted to HM-10 v520 firmware, which I was able to flash using the official tool to the newest v540 firmware. So far I haven't had any issues with the module after flashing, but i haven't tested it extensively.</p><p>If you try this, it's at your own risk. Only try it if you don't mind throwing away the module if it doesn't work. I haven't tested it on the CC2540 chip, and I think you would need different firmware for it to work.</p>
<p>just to let you know that Jeremy Prater's website is back online since a few days ago on this new address.. http://blog.dev-smart.net/ some of the links are broken because of the domain change, but you can manually change the domain in the URL's and get all the files, here's the firmware http://blog.dev-smart.net/wp-content/uploads/2014/03/Stock-HM-10-Firmware.zip</p>
<p>Hello. </p><p>I am in same situation as perrygarg.</p><p>It seems the jeremy-prater's firmware is no longer available in his blog. Is it possible to update firmware directly to HM-10 v540?</p>
<p>Hello!! i'm looking to do just that!! but the EXE just shows a cmd screen for a moment and then dissapears.. and i didn't find the .hm1 file in this project https://github.com/jeremy-prater/OS-CC2540 could you help me sending me the right file to burn?? and what's up with the .exe?? does it have to find the arduino with the sketch already connected or what?? thanks!!</p>
<p>aampudia,<br> The EXE program is a DOS based application. You need to run it from the command prompt in Windows. When you run it from the command prompt, you will need to put in the COM port for your Arduino, the location of the firmware to flash, and other information before it will connect and flash.<br> <br> It looks like that project was finished/abandoned and the .hm1 firmware file was deleted.</p>
<p>yup.. i figured the exe part out a little after posting this... thank you!! don't you have a copy of the bin file??? that would be really helpful!! or at least the original bolutek firmware? help!! xD</p>
<p>perryg1, it looks like you have is the CC41-A clone. (I just received two myself.) The clone board doesn't have all the AT commands that the HM-10 board has, doesn't seem to be updatable, and requires a \r\n (+CR +LF) after the AT command.</p><p>Company Site: <a href="http://www.bolutek.com/Products_info.asp?TypeID=109&SubTypeID=109001&id=290" rel="nofollow">http://www.bolutek.com/Products_info.asp?TypeID=10...</a></p><p>AT Commands: <a href="http://www.hangar42.nl/wp-content/uploads/2015/08/CC41-at-commands.pdf" rel="nofollow">http://www.hangar42.nl/wp-content/uploads/2015/08/...</a></p><p></p>
<p>hi, <br>In the schematic AIO0,AIO1 and SPI pins are directly connected <br>to breakout board, but HM-10 datasheet says NC for these pins. So I am a<br> little confused. Can you please help me about it.<br>Regards.</p>
<p>Hi Ladvien, I recently bought TinySine Bluetooth LE module ( supposed to be a HM-10, I guess) from http://www.tinyosshop.com/index.php?route=product/product&amp;path=65_110&amp;product_id=705<br><br>and it doesn't work with Arduino. Their support is not responding as well. I hope you could show some light on where to proceed. <br><br>Please check your Private Message. I sent you more details.<br><br>looking forward for you reply.<br><br>RK</p>
<p>Hi rshnk90, did you solve your problem? thanks </p>
<p>Datasheet has it that the CC2541 has a 8051 in it? Can we use it as a microcontroller in our projects? Is there any info about it ?</p>
It requires IAR tool chain. A very costly tool chain.
<p>What about TI's code composer Studio?</p>
<p>is this compatible with ccdebugger??? can i flash the firmware using cdebugger?</p>
<p>Yes, </p><p>You might find more info here: <a href="http://blog.p-dev.net/" rel="nofollow">Open-Source HM-10 Firmware</a></p>
<p>Thank you :) will try making this and get back</p>
<p>I'm missing some simple core understanding here. The HM-10 module sounds like it works similarly to the SPP serial data stream in conventional bluetooth - use AT commands to set things up, then pump bytes through the stream.<br><br>But when I read about BLE / BT4.0, it involves reading and writing from services, characteristics, and attributes. And that there is no standard serial port emulation.</p><p>Of course you could build your own custom service which sent packets of stream data to an attribute of a custom service - but nobody else would be using the same UUIDs and higher level protocol (eg: on iOS or Android apps).<br><br>So what's up? In what manner is a transparent byte stream implemented on top of services, characteristics and attributes? Is there some newer profile I can read about?</p>
<p>In short, the HM-10 firmware assigns characteristics for RX/TX--so, in essence, it is a simple serial stream. That stated, <a href="http://www.jnhuamao.cn/index_en.asp?ID=" rel="nofollow">Jnhuamoa</a> is on their way to adding a customizable characteristics. We'll see. The CC254X chip is more than capable.</p><p>Anyway, I'd suggest you read through the most recent datasheets to learn Jnhuamoa's latest implementations.</p>
Thanks.<br><br>So if the HM-10 defines a custom service and passes serial data (eg: around 20 bytes at a time) as attributes, then (1) it's probably incompatible with any (other) existing serial BLE implementation, and (2) given the service and attribute IDs one could perhaps communicate with it from other more general BLE interfaces.<br><br>Is there any doc for their protocol (atop GATT) for serial? Like the UUIDs they use, any framing or flow control headers used over the air, etc? I don't find those in the datasheets on the website.
<p>Thanks for this Instructable!</p>
<p>Hi. Item #5 in the BOM says 20k and the silkscreen on the PCB says 20k but the digikey link is to a 220k resistor. Which one is correct?</p>
<p>Addressed, my apologies.</p>
<p>Also, item #6 says 470 but the link is to a 220 ohm. Thanks.</p>
<p>Hi Ladvien ,</p><p>Thanks for posting your work .</p><p>I purchased 3 PCBs v0.93 but could not get them to work .</p><p>I wanted to bypass the regulator and some resistors - what I need is just a breakout to properly connect to the small pitch of the HM-10 .</p><p>Can you pls share the schematics of the breakout you made and mention the latest correct version ?</p><p>Thanks.</p><p>B.T.W - What Android SW did you use for the BLE ?</p>
<p>The v0.93 had some mistakes. I've a later version boards (v0.9.9) I'll send you if you like, but if you are looking to make a dead-simple breakout, my Eagle files can be found on my Github. The linik is above :)</p>
Hi Ladvein ,<br>I downloaded the PCB file but would like to better understand where and regulator is connected and which resistors I can short to work only with 3.3V .<br>I would appreciate if you can send me the schematics .<br>My email is moriszen[AT]gmail[DOT]com.<br>thanks<br>B.T.W - would you be interested to make a small PCB Arduino + BLE for a project I am working on (paid) ?<br>Thanks
<p>Has anyone at all gotten the commands &quot;AT+DISC?&quot; or &quot;AT+ALLO?&quot; to work? I've gotten almost every other command to work but those. I'm running v526 firmware and tried it both on an HM-10 and HM-11 module with CC2541 chips, but to no avail. I get no response with those commands (already switched to &quot;Master/Central&quot; role).</p>
<p>I've not played with either feature. I'm sure I'll get around to them, though.</p><p>But speaking from general experience, I'm guessing the firmware is incomplete; keep an on eye on future updates.</p>
<p>Thanks for letting me know. The firmware changelogs mentioned those commands being added around v523, so it wouldn't make sense to make such a bold statement and not implement them. Oh well.</p>
<p>Quick update. I spent some time tonight doing some basic tests of Thomas' latest board schematic and the latest version does light up the LED's fine. :-)</p>
<p>Good to hear. I'll have the next iteration tested and posted by Tuesday.</p>
<p>All of these tips were great! </p><p>One tip I have for the SM LEDs is to put a dab of of hot solder on one of the pads and while it is still hot carefully place the LED onto the pad with the tweezers, let it cool then solder the other side, once the other side is done come back and make sure the initial side is soldered well. Also be sure to note the polarity of the SM LED which is not as easy to determine as it is with their through hole counterparts. </p>
<p>When you post the update, be sure to update the BOM to reflect the single 20K resistor and the optional 2x 0.1uF caps as well. Good work!</p>
<p>I really enjoyed reading this project. I'm all about diy. I've worked with bluetooth serial projects in the past, and I figured this wouldn't be any different. I see there might have been a few board versions floating around. I was able to order the 0.9.3 before you took it off OSHPark (I assume because of the non-functional TX,RX lighting - which is fine, I don't need to see them.)</p><p>Do you happen to see anything wrong with the board? I bridged 1 joint, left one open, and soldered 4 10k resistors. I'm using an arduino with a 3.3v source (no need for a voltage divider)</p><p>It powers on OK, the IO1 LED flashes when not connected, and stays HIGH when connected, but I'm unable to send or receive any AT query or communicate at all. I use SoftwareSerial - HM-10 RX to Arduino TX, and HM-10 TX to Arduino RX. </p><p>Being unable to communicate seems to be a problem with the TX, RX. Do I have the resistors on the correct joint?</p><p>Any help would be greatly appreciated! Keep up the good work!</p>
<p>The reason I took the board down is because I had linked the wrong version. As dtrotzjr pointed out. The board version I linked still works as you have it soldered, except of course the RX/TX LEDs don't work. I'm currently working on corrections and will have new boards sent off by end of day. If you are able to Skype: thomas_ladvien. I would like to replace your boards for you :)</p>
<p>What a simple fix! I switched the RX and TX lines and now we're rolling. TY</p>
<p>Parts are starting to roll in, but I didn't realize that your latest boards do not properly light the TX/RX LEDs is that correct? Can you please update this instructable to reflect this? Can you update the board too?</p>
<p>Yes, yes, and yes.</p><p><br>I might need a day or two. I apologize, I thought I put a note in the Instructable stating they didn't work. I'll create a board with working TX/RX LEDs and post it, but I wont order myself. Sorry, too many irons in the fire right now.</p>
<p>I purchased a BLE module that is based off of the same TI CC2540 chip you used in your project, but has a different PCB package which I don't quite understand. Here is the thing I have bought: http://www.aliexpress.com/snapshot/310173495.html</p><p><br>I have a couple of questions if you don't mind answering. First, are ALL the pins on these modules needed? Can't I just solder some wires out of the pin slots that I will use and leave the rest alone? Secondly, the debugger pins on my module are listed as: GND, 3.3V, P2.2, P2.1, RESET<br>How do I interface this to the FTDI?</p>
This is awesome! Thank you for sharing! I ordered all my parts tonight. I'll let you know how it goes!

About This Instructable




Bio: I'm a homeless outreach worker in Fort Worth, Texas. I hack away on electronics as a way to deal with the stress; a type ... More »
More by Ladvien:IPhone to Arduino using Bluetooth 4.0  --UUEncoding in CHEX File to Array in C
Add instructable to: