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

Hi !

As many user ask me how to burn a genuine firmware of HM-10 on the CC41 board (which is a copy with less possibility), I have decided to write a tutorial.

Normally you must bought the “CC debugger” from TI for flash CC2541 chips, but it’s also possible to use an Arduino as a programmer !

- - Required - -

Hardware

  • Arduino (uno, pro mini…)
  • USB to TTL converter for connect Arduino to the PC (in case of arduino pro mini or similar)
  • CC2541 board: HM-10, CC41…
  • Some wire
  • Optionnaly a soldering iron

Software

  • Arduino’s IDE
  • CCLoader Arduino sketch: link
  • CCloader Windows programm: link
  • HM-10 Firmware*: See attachment

*You need the full firmware, not the firmware provided by the manufacturer as this firmware is only usefull for UPGRADE a genuine HM-10 wich have already a bootloader.

- - Step - -

  • You need to upload the CCloader sketch on your Arduino, using the Arduino’s IDE

  • Open the sketch with the IDE

  • Check if the parameters in Tool’s menu are correct: board, processor, com port

  • Upload the sketch to the Arduino’s board

  • Now you need to wiring the HM-10/CC41 board to the Arduino as follow

| Name | | CC2541 | | Arduino |
| - | - | - |
| DEBUG_CLOCK | | Pin 7 | | Pin 5 |
| DEBUG_DATA | | Pin 8 | | Pin 6 |
| RESET_N | | Pin 11 | | Pin 4 |

And also provide Vcc and GND to the CC2541.

  • Be carreful, the standalone CC2541 board is not 5V tolerant ! Vcc is 3.3V and digital pin is also 3.3V.*
  • Some HM-10 breakout have 5V/3.3V regulator, so you can use the 5V of the Arduino for supply the board. If you use 5V arduino (uno and similar) you need a voltage converter (not a voltage divider with some resistors) for digital pin)*

Pinout of HM-10 standalone: see attachment

For the wiring you can solder wire to the pins or harder, you can use dupont wire and manually hold the wires on the pads (At the beginning it’s difficult but is doable :smiling_imp: )

  • Now all is ready, you can burn the HM-10 firmware using Windows’s CCloader.exe

  • Open a command prompt and navigate to the folder where CCloader.exe are located (cd /d C:\the\directory)

  • Write and execute this command: CCLoader.exe <Firmware.bin> 0
    (You must put the .bin firmware file in the same directory as CCloader.exe

  • Wait … :slight_smile:

All is done ! your CC2541 board have now a genuine HM-10 firmware !
For future update, the procedure are easier as you can now update the HM-10 via an USB to Serial converter, the firmware and the procedure are on the manufacturer website: www.jnhuamao.cn

Important: The hardware between an HM-10 and a CC41 are not the same, on CC41’s boards, an externel crystal is missing. Normaly no problem with the HM-10 firmware, as the manufacturer say, the firmware check if the crystal is missing or not and use internal crystal instead.

Some links:
CC2541 Datasheet
Manufacturer’s website

Thanks to:

And a German man for the firmware.

(Sorry for my english… I’m French and doesn’t speak English every day :confused:)

hm10_pins.png

CC2541hm10v540.zip (75.8 KB)

Great tuto! I don't understand why you need a "USB to TTL converter for connect Arduino to the PC"? Arduinos can connect directly no?

In case of Arduino UNO, just need an USB cable, yes, but for Arduino pro mini (This is the one that I used) you need an USB to TTL converter, also know under the name "FTDI" ;)

You rocks! :-)

For information I use a arduino micro but to make it work you need to tell CCLoader that it's a leonardo by using this command : "CCLoader.exe 1" instead of a 0

Also with a voltage divider with resistor I couldn't make it works. So in last chance I tried by directly connecting the wires to the arduino pins and it works at first try :)

For the missing crystal by now I don't see any problem, I even try to discover ibeacon in ROLE1 with the AT+DISI command and it works!

Does anybody with the full HM-10 firmware (including the bootloader) please get in touch with me, I'm pretty keen to reflash a couple of the CC41 devices I have been sent in error.

Hi all,

I have contacted the manufacturer of the HM-10 module, and the missing crystal is not a problem, as the manufacturer say:

Our firmware could check 32K and choose if use this when module is power on.

Good news !

@ArthurDented, check your PM ;)

Hello,

Thanks Hexor for this tutorial and for sending me the firmware!

But sadly i can´t get it to work. I did everything like in your tutorial but when i start flashing the firmware it´s not responding....but when i press ctrl & c and startover again sometimes it´s starting. but only 1 apears than it´s over. Do you got me an idea what is wrong? The connections on the cc2541 are soldered correctly and i got 2 modules which act the same way.

Thank you!

regards Ed

Do you use resistor to divide the voltage? For me it didn't work with that.

No, i used an arduino pro mini with an ftdi converter running at 3.3V. What setup did you use when it worked?

I used an arduino micro with nothing else. It means that I put 5v in the cc41 wich is not recommended but it worked

Thank you! I did it with my uno and it worked without a resistor.

But i got another problem...which code to connect on my phone? I tried 0000 and 1234 but both didn´t worked.

Hi,

I had also an issue with an Arduino pro mini 3.3V, don't know why... Perheaps try to change the parameter '0' to '1' (I haven't try): CCLoader.exe 0 1

For the BLE password, if you read the datasheet from the manufacturer, it's 000000 (6 x zero).

I tried it but it didn´t helped.

Thanks for the password.

Great tutorial, thanks!

Thank you for this tutorial and firmware!

THank you for your Job !

Hi Hexor, thanks for the valuable information and also thanks to all collaborators.

My BT board is a CC41-A. It is soldered on top of another board that only has 4 pins (TX, RX, Vcc and Gnd).

After a couple of days researching in the internet, I was able make the board to answer AT commands thru my arduino.

However, no matter what i do, the board refuses to pair with my phone (sony Z Ultra) nor my 2nd gen nexus 7 tablet. Then i found this thread !!

By flashing a firmware there is a small chance that i may forever brick the BT board, so I just want to be sure that these CC41-A are actually useless with the factory firmware. Will it only work by replacing the firmware ? Is this the only way right ?

Thanks a lot.

I'm trying to flash this firmware using an Arduino UNO and a CC2541 chip.

I have the CC2541 chip assembled the same way as demonstrated in this schematic.

The only difference is the Antenna, which at the moment is merely a wire, connected to the pins 25 and 26 and also to the ground. I have also connected the pins 7, 8 and 11 to the arduino Uno's D4, D5, D6, as required by this guide.

I have tried to connect these pins in a variety of ways:

  1. Using a voltage divider (with resistors) before connecting arduino's pins to the CC2541
  2. Using voltage regulators (78L33A) for each arduino output pin
  3. Connecting the wires directly to CC2541 pins

In all of these, it waited for Arduino to respond, which never happened.

The CC2541 was fed with 3.3V from the Arduino UNO, and its GND pin was connected to UNO's GND pin.

Is anyone have made this trick work with an arduino nano ? thanks

Hi!

@myokomizo what do you mean by "pair to your phone". BLE HM modules can't be paired like any other BT module. You need to use special BLE serial application like "HMBLE Terminal".

@danielnora if I follow your schematic it seems that it's not the pin 7, 8 and 11 that have to be used but the 34 (P2_2), 35 (P2_1) and 20 (RESET_N).

@songotag I used an arduino micro, I had to use "CCLoader.exe 1" instead of a 0