Go Down

Topic: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41) (Read 38095 times) previous topic - next topic

Hexor

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  :smiley-twist: )

  • 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 <COM Port> <Firmware.bin> 0
      (You must put the .bin firmware file in the same directory as CCloader.exe
    • Wait ...  :)



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:
https://github.com/bjoerke/HM-10-Firmware/wiki/flash-firmware
https://github.com/RedBearLab/CCLoader
And a German man for the firmware.

(Sorry for my english.... I'm French and doesn't speak English every day  :smiley-confuse:)

Flagada15

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?

Hexor

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" ;)

Flagada15

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 <COM Port> <Firmware.bin> 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!

ArthurDented

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.

Hexor

Hi all,

I have contacted the manufacturer of the HM-10 module, and the missing crystal is not a problem, as the manufacturer say:
Quote
Our firmware could check 32K and choose if use this when module is power on.
Good news !


@ArthurDented, check your PM ;)

Ed_Dude

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

Flagada15

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

Ed_Dude

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

Flagada15

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

Ed_Dude

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.


Hexor

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 <COM Port> <Firmware.bin> 0 1


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

Ed_Dude



Bender84


Go Up