How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)

Hi.

I seem to be able to flash everything correctly. All goes smooth as in the instructions.

BUT:

After successfully flashing the FW using the CCloader I can't get all related AT commands to work.
This was obviously the case before flashing, as this is a cloned module. I used AT+RENEW and +RESET and still the same.

One example of what is going on:
Before the flash AT+NAME would return HM-BL5 (not sure exactly) now the same command returns nothing at all. Even when I set it with AT+NAMEXXXXX. I get OK and when querying the name again, no reply.

I am trying to use this as an iBeacon.
All AT commands described here Instructables - make an iBeacon work and get confirmation, but the module still does not show up in ane iBeacon scan or before entering iBeacon mode as a btooth device.

also setting the name gets a confirmation but AT+NAME results in no reply at all, not showing up on any btooth scan either.

I even used the manufacturer's HMSoft updater and updated to the 540, 541 and 545 version and still getting the same. I tried different serial port comm apps too...

...just seems as if commands are received and set but for some reason it's not working and trying to query the settings returns nothing...

I do realize I have a clone of the original HM-10, but since the flashing went OK without a hitch, all the commands execute and get OK, my arduino uno works fine too, I am just stumped...

Do you guys think there's any point in trying a different approach or should I just give up and buy a new module from reputable seller?
(btw. I had no idea there was a whole clone industry for HM-10, only after it did not work I found out that it's actually pretty hard to find a genuine product... )

EDIT: After re re-flashing the latest fw ver. 546 from manufacturers website the module still soes not return any specific AT responses but it has for the first time showed up in an ibeacon scanner app. My iPhone also picked it up. Don't know how long it will last or if any reset later on will not break this again...

still... I would appreciate any help in figuring out this weird AT commands inconsistency.

I was able to get mine working from the original post and this post:

kutysam:
I realized, LEDs do NOT work. but there is a fix.
AT+BEFC080
AT+AFTC088

After connecting, light will turn on and its 9mA [PIO8]

How did you know to use those AT commands? What do they mean?

Is it possible for the LED light to flash when nothing is connected?

kutysam:
And, for the guy above, I managed to flash v546 without any issues! It's running that now!

How did you do this?

I tried flashing v546 using CCLoader, it loaded but the BLE module wouldn't work. Had to re-flash to V540. I don't think the V546 file has the bootloader with it.

I also tried with AT+SBLUP and the exe tool that was in the V546 zip, but it wouldn't connect. I also had to re-flash after running that command as it doesn't accept AT commands after that.

Thanks very much. Great tutorial and worked first time.

My setup with a Uno and no voltage dividers.

jaykup:
I was able to get mine working from the original post and this post:

How did you know to use those AT commands? What do they mean?

Is it possible for the LED light to flash when nothing is connected?

How did you do this?

I tried flashing v546 using CCLoader, it loaded but the BLE module wouldn't work. Had to re-flash to V540. I don't think the V546 file has the bootloader with it.

I also tried with AT+SBLUP and the exe tool that was in the V546 zip, but it wouldn't connect. I also had to re-flash after running that command as it doesn't accept AT commands after that.

Okay, I used the AT commands at bluetooth40_en.pdf (attached) or u can get it at
http://www.huamaosoft.com/bluetooth40_en.zip

Based on the guide,
3FF == 0011 1111 1111

Pin Order: XX23 4567 89AB
XX = 0 1 but you can't control it via here. so just leave it as 0.

AT+BEFC080
080 == 0000 1000 0000
Means, pin 4 is on by default!

AT+AFTC088
088 == 0000 1000 1000
Means, pin 4 and pin 8 are on.

BEFC = When you switch on the device it will immediately follow the order.
AFTC = AFTER bluetooth is connected, this pins will be followed in that order.

I hope this clears part 1 of your question.

Now for part 2,
Here is how i did it.

  1. Flashed the 1st page's firmware via ccloader.
  2. Did a AT+RENEW
  3. Did a AT+SBLUP
  4. Used HMSoft.exe and loaded 546 config file (http://www.huamaosoft.com/rom/HMSoft-10-2541-V546.zip)
  5. Did AT+RENEW

and done.

Take note, mine is originally an AT-09 chipset (as a bonus, I've attached AT-09 commands too*Strictly for AT-09)
If you use another 'fake' hm-10, you may run into issues as the PIOs may be different etc.

Even for AT-09, it was different and that's why I had to use the AT+BEFC080 AT+AFTC088 commands.

And MOST IMPORTANTLY! Remember, nowonwards, the commands will be without a newline!
Which means, AT+RENEW should not have an enter when you send the command etc.

Hope this helps.

AT指令集.pdf (110 KB)

bluetooth40_en.pdf (826 KB)

Hi,
thanks for the great tutorial.
I soldered the 3 wires, powered the HM-10 (counterfeit) from arduino and flashed it easily. I executed AT+RENEW then.

The HM-10 now responds to new AT-commands as expected but bluetooth connection is somewhat weird. Using BLE scanner on my Android phone I can see the device shortly after AT+RESET or AT+ROLE0 but then it disappears. So I am not able to connect nor read characteristics from the device.
The same misbehaviour I observe when I setup the HM-10 as iBeacon (according to another topic in this forum). Application in my phone (Beacon Scanner) finds the beacon but doesn't update the beacon information until AT+RESET on HM-10.
I'd say the HM-10 behaves like it is disconnecting the radio after a very short period of inactivity. The LED blinks all the time, though.

Does anybody have a tip how to get the HM-10 working?
Thanks.

I just flashed HMSoft V540 to the first of a few HM-10 modules. It needed it! The original firmware sorta worked, but not well enough to do simple examples.

The tips here were invaluable, here's what did and didn't:

  1. The original firmware (or something) did not like to be powered from the 3.3 volt FTDI I was using. I used a separate 3.3 volt power supply. This is a mystery, but it got me on the air w/ the original firmware. I'll try again now that I have the new firmware down on there.

  2. I thought I would be clever and use a 3.3 volt Pro Mini. CCLoader was unable to connect to it, and the modification to CCLoader outlined earlier on this thread did not help. Has nothing to do with the HM-10 - you can pre-test your CCLoader.ino <-> CCLoader.exe connection w/o hooking up the HM-10 at all. It will succeed in failing rather than fail to succeed.

No more Mr. Nice guy:

  1. I switched up to a real UNO and used a bi-directional level shifter on the data, clock and reset lines that CCLoader.exe and CCLoader.ino use. (I went back to the unmodified CCLoader.ino)

Successful upload!

  1. I forgot to remember (!) that with the "real" software, no line ending is needed. I used the Arduino Serial Monitor and set "No line ending" and now have a working HM-10.

I say working, I have only tried a few AT commands, but ones that didn't work with the original, so right now my confidence is high…

Here is a case if ever for saying YMMV, but the recipe does work.

Worst: very pesky soldering to the HM-10 module! If you think it might be a problem, get the ones that are slightly "broken out". Gee, maybe they'd even come from the source with V540 on 'em already.

That, of course, would be no fun at all.

alto777

"did not like to be powered from the 3.3 volt FTDI I was using"
Might have been current lacking - the FTDI chip creates just 50mA of 3.3V current from an on-chip regulator.

Uno has 150mA 3.3V regulator. As does the 3.3V Promini.

CrossRoads:
"did not like to be powered from the 3.3 volt FTDI I was using"
Might have been current lacking - the FTDI chip creates just 50mA of 3.3V current from an on-chip regulator.

Uno has 150mA 3.3V regulator. As does the 3.3V Promini.

Indeed. That explains why it also took down the serial connection. Hard.

I had thought of current draw and measured less than 10 mA drawn from the supplemental power supply. I did not even then put 2 + 3 together as you have!

Just now a glance at the datasheet looks like 50 mA would more than cover any max current the HM-10 would draw, but there is no arguing with failure as is said. I am maybe overlooking something HM-10ish or FTDIish.

I'm curious too about the 3.3 Pro Mini fail. Perhaps I can blame the FTDI necessary for that arrangement. I don't have any 3.3 Arduinos or clones thereof that have USB on board to try instead. I haven't pinned anything (else) on the FTDI…

alto777

guys i'm afraid i wasted my sh-hc 08

the flash of the firmware went well but now it doesn't turn on at all, the led stays off...

time to buy a new one?

1 Like

just for motivation. it works for "my" MLT-BT05-V4.0
but I had a hard time to discover that the serial communication is very sensitive to CR and LF.
For AT commands as well for transparent serial communication.
So not every app will work. (I did not find the right one for android, for iOS App named serial works)

AT Commands no longer work after upgrade. Any reason for this?

Hi everyone

The AT commands after 540 flash are not working. Please can you advise.

My CC2541 board is shown in the "20170425_061210.jpg" attachment.

To avoid frying the CC2541, I am using a TXB0108 board as seen in the attached Fritzing screenshot "full reflash CC2541hm10v540_bb.jpg".

Steps taken:

  1. Execute Hexor step 1 at How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41) - Networking, Protocols, and Devices - Arduino Forum

I.e., load CCLoader sketch into Arduino UNO

  1. Execute Hexor step 2:

a. Solder and check that there are no shortcircuits.
b. Connect pins as shown in "full reflash CC2541hm10v540_bb.jpg"

  1. Execute Hexor step 3 using Windows command prompt:

CCLoader.exe 10 CC2541hm10v540.bin 0

Failed.

Leave my board connected to Arduino but unplug Arduino from USB and close any Arduino IDE windows.

Leave the Windows command prompt on screen.

Plug Arduino back to the USB.

Reflash with CCLoader.exe using the command prompt as before.

Success !

So far, so good.

Now the problem: after reflashing, which wires on the CC2541 board must be used as TX/RX ?

Please look at the attached picture 20170425_061210.jpg which shows the board.

I tried the "new" RX TX pins but the AT commands do not work.

I tried the "old" RX TX pins but only garbage traffic is there, and the RX led on the Arduino is continuously lit, I suppose that after reflashing, those pins are really not RX TX any more.

So it'll have to be the "new" RX TX pins. But they do not work.

BTW, if I connect a LED to the new System LED on the CC2541 board, the LED is flashing once a second when Bluetooth is not connected, and it is continuously lit when Bluetooth is connected. I am using Windows 10 with an Asus Bluetooth 4.0 usb dongle to connect to the CC2541 via Bluetooth 4.0.

Any ideas ?

Regards
Mihai

Hello,

Thanks Hexor for this tutorial..
I have flashed my cc41 and everything work except the LED doesn't blink at all..
I tried to change PIO1 state but no effect. (it's change at serial monitor only)
does anyone can help..? thanks

Hi all
Sorry my ignorance
It's possible this way upload a custom firmware to 8051 MCU in 2251 ble?

Hi folks,

Let me share my experience updating a BOLUTEK breakout board version (CC41-A) to HM-10 original firmware.

I followed all steps described in HEXTOR's guide (well, let me remark some tips):

  • Breakout board was power supplied with 5V
  • I've set 3x voltage dividers for digital pins using 1k+2k combination. It gives ~3.33V from 5V.
  • Using my Arduino Nano (clone) as a programmer it didn't work! So, I decided to use my Arduino MEGA board (original). Et voilà, ça marche! -- Well, I guess it was a power supply problem.

To verify the serial interface I connected the module to a FTDI232 USB-TTL converter (use a voltage divider between Rx (BLE module) and Tx (FTDI board), if you are using 5V).

So I back to Arduino Serial Monitor to check the AT commands. What a surprise! AT commands were not being interpreted anymore. (but BLE worked fine!)

No panic! I downloaded from jnhuamao download center the following kit:

  • HowToUpgradeFirmware_en.pdf (please read this how to!)
  • HMComAssistant (a COM tool with some predefined AT commands)
  • HMSoft-10-2541-V550 (includes HMConfigAssistant, HMSoft.bin (the latest firmware) and the HMSoft.exe(the programmer))

By using HMComAssistant I could send AT+SBLUP to put the module in update mode.

Next step was to send the HMSoft.bin file through HMSoft.exe (be sure you have closed HMComAssistant COM connection, if necessary run it using admin privileges).

After updating the module, I got it working fine on Arduino Serial Monitor (No ending line, baud 9600).

Hi

The website jnhuamao download center seems to be nonfunctional.

Hello, i have small prolem with CCLoader.exe SW. I will put him in CMD( wich right parametrs) and nothing will happen. no text is written, I run under W7 x86. thanks for your advice

Thanks for the great job you do here !

Just for information I flash a HM-11 (less pins than HM-10) with an Arduino M0.
No need to add voltage converter as the Arduino M0 operates @3.3v :wink:

Just add this line in the beginning of the Arduino project :

#define DEBUG_PORT SERIAL_PORT_USBVIRTUAL

and replace all "serial" strings by "DEBUG_PORT"

Run this CCLoader command :

CCLoader_x86_64.exe 7 CC2541hm10v540.bin 1

Looks fine ...

I have same problem as everyone else here.

It looks that AT COMMANDS might not work after the flash on AT-09 devices. I wonder if this is a problem with flashing / with hardware difference (different pins) or hardware change.

If anyone comes up with an idea on how to do it, please update the thread.

Awesome! Flashed two of them successfully, for those who search the AT mode, choose "No line ending" and "9600" as Baud-rate. unfortunaley, the fake AT+HELP was more helpfull then the genuine one...