Arduino Forum

Using Arduino => Networking, Protocols, and Devices => Topic started by: Hexor on Apr 13, 2016, 12:19 pm

Title: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Hexor on Apr 13, 2016, 12:19 pm
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


Software

*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 - -



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 (http://www.jnhuamao.cn/download_rom_en.asp?id=66#)

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 (http://www.ti.com/lit/ds/symlink/cc2541.pdf)
Manufacturer's website (http://www.jnhuamao.cn/download_rom_en.asp?id=66#)

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:)
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Flagada15 on Apr 13, 2016, 01:08 pm
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?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Hexor on Apr 13, 2016, 01:12 pm
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" ;)
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Flagada15 on Apr 14, 2016, 07:51 pm
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!
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: ArthurDented on Apr 19, 2016, 02:43 am
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.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Hexor on Apr 19, 2016, 09:32 am
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 ;)
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Ed_Dude on Apr 23, 2016, 05:11 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
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Flagada15 on Apr 23, 2016, 05:17 pm
Do you use resistor to divide the voltage? For me it didn't work with that.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Ed_Dude on Apr 23, 2016, 08:54 pm
No, i used an arduino pro mini with an ftdi converter running at 3.3V. What setup did you use when it worked?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Flagada15 on Apr 23, 2016, 09:28 pm
I used an arduino micro with nothing else. It means that I put 5v in the cc41 wich is not recommended but it worked
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Ed_Dude on Apr 23, 2016, 10:58 pm
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.

Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Hexor on Apr 24, 2016, 09:37 am
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).
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Ed_Dude on Apr 24, 2016, 09:31 pm
I tried it but it didn´t helped.

Thanks for the password.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Shiesa on Apr 27, 2016, 09:12 am
Great tutorial, thanks!
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Bender84 on May 05, 2016, 09:32 am
Thank you for this tutorial and firmware!
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: songotag on May 23, 2016, 03:55 pm
THank you for your Job !
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: myokomizo on May 24, 2016, 03:21 am
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.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: danielnora on May 24, 2016, 09:15 pm
I'm trying to flash this firmware using an Arduino UNO (https://www.arduino.cc/en/main/arduinoBoardUno) and a CC2541 chip (http://www.ti.com/product/CC2541).

I have the CC2541 chip assembled the same way as demonstrated in this schematic (https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/538/3010.CC2541example.JPG).

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.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: songotag on May 25, 2016, 04:34 pm
Is anyone have made this trick work with an arduino nano ?
thanks
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Flagada15 on May 25, 2016, 04:44 pm
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 <COM Port> <Firmware.bin> 1" instead of a 0
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: danielnora on May 25, 2016, 11:02 pm
Flagada15,

Thank you for your input. I did notice what you said, but I had no different outcome when using the 20, 34 and 35 pins.

Daniel
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: myokomizo on May 30, 2016, 03:33 am
Hi Flagada15,
I have no idea that BLE could no pair with smartphones (and i was blaming the ebay guy that sold it me)
I have unsuccessfully tried it with my sony z ultra and tablet nexus 7 (2nd gen).

I wanted to implement those projects that you can use the smartphone to remotely control the arduino.
So to do it, should I use another kind of BT boards like the HC-05 ?

Thanks and regards,
Mauricio
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Hexor on May 30, 2016, 08:07 am
Hi,

For activate pairing you must send "AT+TYPE3" (AT+TYPE0 is the default).
An example of a program with a phone that interact with an Arduino via an HM-10 module: http://www.instructables.com/id/Control-RGB-lights-from-Android-with-Arduino-Bluet/?ALLSTEPS
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: bloodycrow on May 31, 2016, 10:02 am
I struggled a lot to find the right AT commands for this version and, since the official website has been blocked by both Chrome & Firefox for security issues, here's where they still can be found :

https://www.seeedstudio.com/wiki/images/c/cd/Bluetooth4_en.pdf

(this is the complete datasheet ; AT commands are listed in details from page 18 & further on)
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: danielnora on Jun 03, 2016, 03:51 pm
Hello,

I have successfully burnt the firmware to a CC2541F256 without voltage converters or any resistors, by directly connecting the DC, DD and RESET pins to an Arduino UNO with the sketch.

I didn't have success previously, I assume, because I had a bad CC2541 chip. When I switched it to a new chip, the upload worked. I don't know if it didn't work because I flashed the HostTest application (from the HostTestRelease), which might have resulted in the chip becoming non-functional.

I am still unable to use the AT commands on the CC2541, even though it is assembled as in the schematic in my previous post. I'm using P1_6 as TX and P1_7 as RX, which I suppose are the TX and RX pins in HM-10.

Daniel
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: nicky1finn on Jun 06, 2016, 12:13 am
Thank you!! I successfully loaded the HM-10 firmware on a CC2541 chip previously running the bolutek firmware and it is running flawlessly. Just one issue I ran into: Malwarebytes flagged CCLoader.exe as a backdoor. Has anyone else ran a malware scan?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: nicky1finn on Jun 06, 2016, 12:23 am
Hello,

I have successfully burnt the firmware to a CC2541F256 without voltage converters or any resistors, by directly connecting the DC, DD and RESET pins to an Arduino UNO with the sketch.

I didn't have success previously, I assume, because I had a bad CC2541 chip. When I switched it to a new chip, the upload worked. I don't know if it didn't work because I flashed the HostTest application (from the HostTestRelease), which might have resulted in the chip becoming non-functional.

I am still unable to use the AT commands on the CC2541, even though it is assembled as in the schematic in my previous post. I'm using P1_6 as TX and P1_7 as RX, which I suppose are the TX and RX pins in HM-10.

Daniel
Make sure you aren't sending a carriage return and line feed after the AT commands. The bolutek firmware required "\r\n" after the AT commands but the HM-10 firmware must not have these for it to accept them as commands. If the commands are sent with a carriage return and line feed, they are simply sent over Bluetooth and aren't treated as commands. When you get an "OK" back from sending "AT" it's a good idea to issue the "AT+RENEW" command to reset all the settings. In my case, the Bluetooth module did not even broadcast its name until I issued that command. Good luck!
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: danielnora on Jun 06, 2016, 07:44 pm
Hello nicky1finn,

I have verified that I'm not sending \r\n after the AT commands. Still, I receive nothing when I send the AT command.

I'm using the default BAUD rate (9600), but I have tried others and no result.

I have connected an LED to P1_2 and, instead of blinking as the HM-10, it is permanently lit.

Daniel
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: nicky1finn on Jun 07, 2016, 06:19 am
Hello nicky1finn,

I have verified that I'm not sending \r\n after the AT commands. Still, I receive nothing when I send the AT command.

I'm using the default BAUD rate (9600), but I have tried others and no result.

I have connected an LED to P1_2 and, instead of blinking as the HM-10, it is permanently lit.

Daniel
How odd.. Are you able to see the Bluetooth module using something like LightBlue? I just checked the HM-10 data sheet and it looks like the LED should be attached to PIO1. It could also just be some weird issue after loading the new firmware and not issuing the renew command. As far as communicating to it over serial, just make sure RX/TX are connected properly and aren't swapped or anything. Although I implemented logic shifting circuitry, the chip seemed to run fine at 5v. If I think of anything else it could be, I'll be sure to let you know!
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: nicky1finn on Jun 07, 2016, 06:25 am
Hello,

I have successfully burnt the firmware to a CC2541F256 without voltage converters or any resistors, by directly connecting the DC, DD and RESET pins to an Arduino UNO with the sketch.

I didn't have success previously, I assume, because I had a bad CC2541 chip. When I switched it to a new chip, the upload worked. I don't know if it didn't work because I flashed the HostTest application (from the HostTestRelease), which might have resulted in the chip becoming non-functional.

I am still unable to use the AT commands on the CC2541, even though it is assembled as in the schematic in my previous post. I'm using P1_6 as TX and P1_7 as RX, which I suppose are the TX and RX pins in HM-10.

Daniel
Oohhhh, I missed it the first time I read your post. The HM-10 TX pin is pin 1 (top most pin on the left of the board) and the RX pin is the one just below it. Good luck!
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: jps1 on Jun 07, 2016, 09:51 am
My cc2541 receives AT commands and returns answers, but it is impossible to connect with Android.

I asked Hexor for firmware by PM but I have not had any response.

Is it possible to download the firmware HM-10 otherwise?

Thanks in advance.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: danielnora on Jun 08, 2016, 02:44 am
Hello nicky1finn,

First of all, thank you for your willingness to help.

I believe I have flooded my posts with dispersed information which may have confused you at some point.

My intention is to replicate the exact behavior of a HM-10 module on a CC2541 circuit on a breadboard.
This is because the HM-10 module is too big for my purposes: I intend to use the BLE circuit in a smartband, so I need to have it as a SMD.

In order to do this, I have:

1. Flashed the CC Loader sketch available in this topic to an Arduino Uno.

2. Assembled the CC2541 chip the same way as demonstrated in this schematic (https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/538/3010.CC2541example.JPG).

3. Connected RESET_N (pin 20), DC (pin 34 or P2_2), DD (pin 35 or P2_1) to the Arduino Uno's digital pins 4, 5, 6, respectively. I have also powered the CC2541 with Arduino Uno's GND and 3.3V.

4. Flashed the firmware received from Hexor using CCLoader.exe with the command

Quote
CCLoader.exe COM_NUMBER firmware-file.bin 0
After these steps, I have successfully managed to make the CC2541 circuit execute AT commands!  :D

Unlike the HM-10 module, however, the CC2541 circuit wasn't advertising (meaning I couldn't see the bluetooth module on my Android phone when searching for devices, not even with specific BLE apps).

If you have read my previous posts, I stated that I was using a mere wire as the Antenna, which was short-circuited between the pins 25 and 26, and also connected to the GND, which I believed was the reason why I couldn't see it from my phone. The Antenna wasn't exactly that which was specified in the schematic I provided.

Well, I saw on the schematic that the Antenna had a 50Ω resistance, so I also tried to replace the wire that connected pin 25 to pin 26 and pin 26 directly to GND with a resistor, and it made no difference.

Then I decided to make an antenna on a PCB following this reference (page 4) (http://www.ti.com/lit/an/swra117d/swra117d.pdf), and connected one of the wires to pins 25 and 26 and the other to GND. Still, no difference. I'm starting to wonder if it's an Antenna issue or something else.

Daniel
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: nicky1finn on Jun 08, 2016, 04:57 am
Hello nicky1finn,

First of all, thank you for your willingness to help.

I believe I have flooded my posts with dispersed information which may have confused you at some point.

My intention is to replicate the exact behavior of a HM-10 module on a CC2541 circuit on a breadboard.
This is because the HM-10 module is too big for my purposes: I intend to use the BLE circuit in a smartband, so I need to have it as a SMD.

In order to do this, I have:

1. Flashed the CC Loader sketch available in this topic to an Arduino Uno.

2. Assembled the CC2541 chip the same way as demonstrated in this schematic (https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/538/3010.CC2541example.JPG).

3. Connected RESET_N (pin 20), DC (pin 34 or P2_2), DD (pin 35 or P2_1) to the Arduino Uno's digital pins 4, 5, 6, respectively. I have also powered the CC2541 with Arduino Uno's GND and 3.3V.

4. Flashed the firmware received from Hexor using CCLoader.exe with the command

After these steps, I have successfully managed to make the CC2541 circuit execute AT commands!  :D

Unlike the HM-10 module, however, the CC2541 circuit wasn't advertising (meaning I couldn't see the bluetooth module on my Android phone when searching for devices, not even with specific BLE apps).

If you have read my previous posts, I stated that I was using a mere wire as the Antenna, which was short-circuited between the pins 25 and 26, and also connected to the GND, which I believed was the reason why I couldn't see it from my phone. The Antenna wasn't exactly that which was specified in the schematic I provided.

Well, I saw on the schematic that the Antenna had a 50Ω resistance, so I also tried to replace the wire that connected pin 25 to pin 26 and pin 26 directly to GND with a resistor, and it made no difference.

Then I decided to make an antenna on a PCB following this reference (page 4) (http://www.ti.com/lit/an/swra117d/swra117d.pdf), and connected one of the wires to pins 25 and 26 and the other to GND. Still, no difference. I'm starting to wonder if it's an Antenna issue or something else.

Daniel
I just skimmed the thread and obviously missed some crucial information on your setup. At least you got the AT commands working! Did you run the AT+RENEW command? After I flashed the HM-10 firmware my module was not advertising either. After issuing that command, however, it immediately started working as expected. By the way, did you run a virus/malware scan on your computer? I'm a bit thrown off that Malwarebytes flagged CCLoader.exe as a backdoor. Hope this helps!
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: nicky1finn on Jun 08, 2016, 05:08 am
My cc2541 receives AT commands and returns answers, but it is impossible to connect with Android.

I asked Hexor for firmware by PM but I have not had any response.

Is it possible to download the firmware HM-10 otherwise?

Thanks in advance.
This Bluetooth low energy module does not pair to devices like classic Bluetooth. In order to pair within settings (I can confirm this works for Apple devices, but am unsure of devices running android), you must send AT+TYPE3. The default passcode is 000000 but if you want to change it send AT+PASSXXXXXX where the Xs represent your 6 digit passcode. The data sheet has all of these commands explained in it as well as many others. You can even read the temperature of the IC! It's definitely worth a read. Good luck!
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: stubb1976 on Jun 13, 2016, 09:04 am
Hi,

Could anyone forward me the hex file that should be flashed, Hexor doesn't seem to respond anymore...

Thanks in advance.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: jchidalgo on Jun 14, 2016, 06:41 am
Dear Hexor and DanielNora,
I need your help to clear how the wiring should be.
According with HM-10 datasheet (JNHuaMao Technology Company Bluetooth 4.0 BLE module Datasheet), the CC2541 pinout and Hexor´s information, the wiring between the arduino board and the HM-10 must be:

          arduino       HM-10          CC2541
DC          5      23 (PIO0)   7 (P1_3)
DD          6      24 (PIO1)   8 (P1_2)
RESET      4      26 (PIO3)   11 (P1_0)

is it correct?
I´m a little confuse about the pin number in the HM-10 board
Please confirm
Thanks in advance...
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: jchidalgo on Jun 15, 2016, 05:40 am
sorry for the last dumb question ....
I´ve  used the pinout in the HM-10 board (pins 7,8,11) and connected to an arduino compatible board (seeduino Ver3.0) powered at  3.3v  and now I have a "real" HM-10 board (Version: HMSoft V540)
Thanks Hexor for the firmware and your great job!!
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: akashboghani on Jun 16, 2016, 12:50 pm
I seem to have bricked my ble module. Additionally, it seems to have been a fake since it didn't respond to many simple AT commands, and even seemed to recognize lowercase AT commands.

Would really appreciate it if someone could provide the bin file with the bootloader so that I can resurrect this chip.

Thanks in advance!
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: kacna on Jun 17, 2016, 12:53 am
Hi Guys,

A followed Hexor's HOWTO (thanks for it) and I was able to successfully burn new firmware. From CCLoader I got :

Code: [Select]
... 510  511  512  Upload successfully!
File closed!
Comport closed!


Now I am able to send AT and got OK as response. But problem is that I got OK on every AT command:

AT+HELP? -> OK
AT+RENEW -> OK
AT+ADDR? -> OK

I am able to detect flashed module using another CC41a so I think that is working.

Did anybody observed similar behavior of flashed module?

Thank for help!
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: kacna on Jun 17, 2016, 01:00 am
Hi,

Could anyone forward me the hex file that should be flashed, Hexor doesn't seem to respond anymore...

Thanks in advance.
Hexor's link to firmware download working well. Just click on big green button (try it few times): http://uptobox.com/l8vivxdf2qev (http://uptobox.com/l8vivxdf2qev)
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: zital on Jun 25, 2016, 09:02 pm
Freezed while upgrading firmware :(

(http://img.imgur.com/0zEoRml.jpg)

(http://img.imgur.com/G6sh9dr.png)
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: qboney on Jun 29, 2016, 01:48 am
I have an AT-09 (HM-10 copy..) that shows up as name BT05.
I can connect with my iPhone app "Bluetooth Serial" and comm via terminal, so i know it works.

I have identified it as AT-09 through this website: http://www.martyncurrey.com/bluetooth-modules/

There is no joy with this thing. Seems it can not be flashed.
It has never responded to AT commands. This thing is a piece of junk.

Does anyone know how to buy HM-10 direct from manufacturer?

Thanks,
Quint
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: jzawadzk on Jun 29, 2016, 12:33 pm
I have the same module (also shows as BT05) and have successfully flashed it with Hexor's firmware (after converting .bin file to .hex) using CC-debugger (bought it for something like 15 USD some time ago).

BTW: when using CC-debugger + SmartRF I had to perform full flash erase before I could do anything with the chip. Not sure if this can also be the case with CCloader.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: zital on Jun 29, 2016, 08:06 pm
I have an AT-09 (HM-10 copy..) that shows up as name BT05.
I can connect with my iPhone app "Bluetooth Serial" and comm via terminal, so i know it works.

I have identified it as AT-09 through this website: http://www.martyncurrey.com/bluetooth-modules/

There is no joy with this thing. Seems it can not be flashed.
It has never responded to AT commands. This thing is a piece of junk.

Does anyone know how to buy HM-10 direct from manufacturer?

Thanks,
Quint

you can check it watching this image:

(https://images.duckduckgo.com/iu/?u=http%3A%2F%2Fwiki.makespacemadrid.org%2Fimages%2F7%2F72%2FHM-10-fake.jpg&f=1)

check it in amazon
Title: Help please....
Post by: kaav102 on Aug 01, 2016, 11:15 am
Hi,
I have the cc2541 and I tried to follow the steps but for some reson it didn't work and now the module is not responding, the led always on (low light) and it not respond to AT commands as it did before.
I tried reset with the PIO0 pin, didn't help.. :(
Any idea? :smiley-roll:
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: AbuFaisal on Aug 13, 2016, 12:22 am
Hi,
I have the cc2541 and I tried to follow the steps but for some reson it didn't work and now the module is not responding, the led always on (low light) and it not respond to AT commands as it did before.
I tried reset with the PIO0 pin, didn't help.. :(
Any idea? :smiley-roll:
Me too, only low led ON without any response, I don't know if because I used arduino pins without logic converter? Or something else?

Is there is a way to know if it is firmware problem or hardware problem?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: AbuFaisal on Aug 13, 2016, 01:31 am
Me too, only low led ON without any response, I don't know if because I used arduino pins without logic converter? Or something else?

Is there is a way to know if it is firmware problem or hardware problem?
It is works now fine, I really don't know how the problem solved I tried to upload the firmware again desperately hoping it work but the problem still not solved then I start trying other firmwares and before I start upload any firmware I was holding the wires in their pins and run CCLoader command but the command failed, however in same time the module worked fine.

Maybe the problem was related to reset module (pin11) after upload  the firmware ???
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: antonio1989 on Sep 15, 2016, 02:57 pm
Hello, i bought some BT cc41-a and would convert their firmware to get the BT HM-10. I don't have arduino but i own a CC Debugger and i already made the hardware connection to the BT. I would like to have some suggestion for the firmware to be used and for the software for to convert the source code and to flash it. Thanks
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: mrchen on Sep 27, 2016, 06:59 pm
Is anyone have made this trick work with an arduino nano ?
thanks
For those trying to flash hm10 using Arduino Nano clones - it is important to connect a 10uF capacitor between RESET and GND pins of Nano - see the photo.
(https://s10.postimg.org/s235uv0c9/nano_to_hm10_wiring_for_flashing.jpg)

For those trying to flash using Linux:
1/ compile ccloader ( /CCLoader-master/SourceCode/Linux/main.c from the zip archive):
gcc main.c -o ccloader
2/ run it:
./ccloader /dev/ttyUSB0 CC2541hm10v540_from_hexor.bin 0

The flashing is quite slow, takes about 5min and pauses couple of times in the process. But it worked for me - many kudos to Hexor!!! I did not use 5v->3.3v level shifting - connected the 5v nano pins directly to DD and DC pins of CC2541.

After flashing the HM10 module announces itself as HMSoft (used to be BT05) and paired with android easily using pin 000000.

Hexor - you are the Man!

Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: mrchen on Sep 27, 2016, 09:22 pm
I have an AT-09 (HM-10 copy..) that shows up as name BT05.
I can connect with my iPhone app "Bluetooth Serial" and comm via terminal, so i know it works.

I have identified it as AT-09 through this website: http://www.martyncurrey.com/bluetooth-modules/

There is no joy with this thing. Seems it can not be flashed.
It has never responded to AT commands. This thing is a piece of junk.

Does anyone know how to buy HM-10 direct from manufacturer?

Thanks,
Quint

Don't give up too soon. I have exactly the same module and I flashed it successfully. See my other post. For AT commands use Arduino serial monitor at 9600, no CR, no LF.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Titooo1990 on Sep 29, 2016, 08:48 pm
Somehow i'ts not working for me. Using an Arduino Uno.

The prompt keeps telling me "illegal comport number"

The IDE sees the arduino as COM4 and I close the IDE afterwards so it can never interrupt with the comport.

Using the line: CCLoader.exe COM4 CC2541hm10v540.bin 0


At first I thought maybe a virtual machine problem but its not.... Can anyone help me?


Edit: yeah... I'm stupid. Just needed to enter "4" instead of "com4"... lol. Thanks for the sharing! Going to test them out now!
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: EndLessMind on Oct 02, 2016, 12:17 am
For me, it says "Uploading firmware" and then it gets stuck somewhere between 1 and 4. I've tried this on a Mini Pro (3v3) and a Mega2560. The mega told me that the serial communication stops. My guess is that the Arduino is waiting for data and gets stuck in the "while (!done)" loop.


Anyone got any idea?
Currently installing Cygwin and the required GCC-packages to be able to recompile the Windows application and debug it. So frustrating.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: EndLessMind on Oct 02, 2016, 03:57 am
Never mind that issue. The Arduino wasn't 3v3, it was actually 5v but the usb-to-TTL was set to 3v3 volt. After changing that, it flashed just fine. But it won't respond to any AT-commands now :/ Tried reflashing the firmware but did no good.


EDIT: Ops, missed the reset pin. It's now responding to AT-commands.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: wanek on Oct 05, 2016, 10:10 am
hello!

for me it keeps saying "illegal comport number"

my arduino uno com port number is 19 (i've checked in the ide), but when i opened the ccloader source code, the com ports are just up to 16:

HANDLE Cport[16];
char comports[16][10]={"\\\\.\\COM1",  "\\\\.\\COM2",  "\\\\.\\COM3",  "\\\\.\\COM4",
                       "\\\\.\\COM5",  "\\\\.\\COM6",  "\\\\.\\COM7",  "\\\\.\\COM8",
                       "\\\\.\\COM9",  "\\\\.\\COM10", "\\\\.\\COM11", "\\\\.\\COM12",
                       "\\\\.\\COM13", "\\\\.\\COM14", "\\\\.\\COM15", "\\\\.\\COM16"};

what should i do?
thanks!
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: jleed on Oct 08, 2016, 01:12 am
Also have AT-09 CC2541, module was working fine at first, but I have sent AT+RULE2 and now I cant get it back to 0.

Tried burn firmware using Arduino Zero but I stuck on

$ CCLoader /dev/tty.usbserial Firmware.bin
Opening comport...
Comport open!
Read portsettings...
Changing portsettings...
Baud:115200 data:8 parity:none stopbit:1 DTR:off RTS:off
File open success!
Block total: 512
Waiting for Arduino setup...
Remain: 5
Remain: 4
Remain: 3
Remain: 2
Remain: 1
Enable transmission...
Request sent already!Waiting for respond...

have tried Pro Micro and Windows version of CCLoader, still nothing :|


After couple retries to burn firmware, device seems to be die, Power led is always on, no activity at all :(
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Prithiviraj_pandian on Oct 13, 2016, 09:29 am
firmware link is not working only.. Can anyone tell me the way for get into the link
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: wanek on Oct 19, 2016, 01:44 pm
@Prithiviraj_pandian

hello!

checked today, and is working:  https://forum.arduino.cc/index.php?action=dlattach;topic=393655.0;attach=183702
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: kuan215 on Oct 20, 2016, 01:55 pm
I got the firmware to work on my AT-09 board(pin 7,8 and 11) with direct connections to Uno. After more than 10 tries, the board finally responded to AT command without CR and LF. However, the LED on the breakout board does not work any more. Anyone has ideas?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Steveiboy on Oct 20, 2016, 07:20 pm
I've gone through the steps and it tells me its completed and I can send the AT command and response comes back OK, How can I confirm the new firmware is installed ?

thanks
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: kuan215 on Oct 21, 2016, 01:50 pm
The AT+NAME? should respond default name "HMSoft".
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Steveiboy on Oct 22, 2016, 12:09 am
Thanks for that first time I used a voltage converter and it did not work connected direct to the uno and it worked. It now show HMSoft
Great tutorial glad I found the topic
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Solariseir on Nov 02, 2016, 12:33 pm
Hi, great tutorial. thanks.
how can I flash cc2541 with cc debugger ? it only accept hex file.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: joric on Nov 10, 2016, 12:24 pm
I have a reverse question: how to flash hex file (HM-10_CC2541_Experimental.hex) with CCLoader? Bytes in the beginning don't seem to match at all.

Upd: used http://hex2bin.sourceforge.net (http://hex2bin.sourceforge.net) for converting intel hex format to binary, binaries look similar now (though the latter is smaller). Haven't tried to flash it yet.

Upd2: flashed HM-10, works fine. Tried to flash HID firmware, it won't pair for some reason https://geekhack.org/index.php?topic=62236.msg2300518#msg2300518 (https://geekhack.org/index.php?topic=62236.msg2300518#msg2300518)

Upd3: it works fine now http://imgur.com/a/KWmz6 (http://imgur.com/a/KWmz6)
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: hotforms on Nov 13, 2016, 10:25 pm
Hi, I make the update to HM-10 firmware using the main tutorial, now I connect using Android, that now show the name "HMSoft", but for some reason that I don't know, is very hard to make "AT" command work, before a lot of trying sometimes this work, but just respond with OK for all command i try to send.
For sample, if I send "AT+NAMETest" they return "OK" but don't change de name and nothing change.
If I try another commands, the same result, just return "OK".

Someone have the same problem?
What can I do to fix it?

I will try re-flashing to see if this work well.

UPD: I try again re-flashing and nothing, the same situation my Android connect but I can't send or receive commands and any "AT" command work. Now I don't receive any OK.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Netoperz on Dec 08, 2016, 12:02 am
Normally you must bought the "CC debugger" from TI for flash CC2541 chips, but it's also possible to use an
Hello and what about CC2540 firmware files ?

Many "fake" HM-10 clones especialy those from HC especially HC-08 (they are stated that HM-10 is clone of their HC-08 ROTFL) does have CC2540 instead of CC2541, so i would be glad if someone would post firmware for that rev.

HM-10 were also sold with CC2540 IC onboard so firmware should exist. but there is none on the net as far as i was searching for it.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: kashtanoff on Dec 18, 2016, 08:52 pm
I upgrade my cc2141(hc05) firmware to hm-10. My board (https://ae01.alicdn.com/kf/HTB1lQ7gJFXXXXbiaXXXq6xXFXXX8/CC2541-Bluetooth-4-0-BLE-%D0%B4%D0%BB%D1%8F-UART-GFSK-%D0%9F%D1%80%D0%B8%D0%B5%D0%BC%D0%BE%D0%BF%D0%B5%D1%80%D0%B5%D0%B4%D0%B0%D1%82%D1%87%D0%B8%D0%BA-%D0%91%D0%B5%D1%81%D0%BF%D1%80%D0%BE%D0%B2%D0%BE%D0%B4%D0%BD%D0%BE%D0%B9-%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C-%D0%9F%D0%BE%D1%81%D0%BB%D0%B5%D0%B4%D0%BE%D0%B2%D0%B0%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D0%BE%D0%B3%D0%BE-%D0%9F%D0%BE%D1%80%D1%82%D0%B0-DC-3-3.jpg_640x640.jpg)

1. I see my board on my android phone. It name "Hmsoft".
2. I can connect to device with 000000 pin in android bluetooth device manager.
3. I cant't connect to device in any bt serial program on my phone
4. I can't receve any answer on AT commands. Before firmware upgrade I have answer on AT commands, and see bolutek link on AT+HELP command.

How I ca send AT commands on new firmware?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: ratchet64 on Dec 18, 2016, 09:34 pm
ani idea what I do wrong ?
Pins 7,8,11 soldered on CC2541
I try 5v, 3,3v with and without resistor on pin 12 always same response.
NO CHIP DETECTED !
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: simsas18 on Dec 28, 2016, 06:13 pm
Hello,
I tried flashing the firmware on my CC2541 but no success. CCLoader was stuck on "Waiting for respond from Arduino". I tried using both Arduino Mega and Arduino Nano. I was using level converter to connect module and Arduino.
What am I doing wrong?

EDIT
It seems I have figured it out. I have a HM10 clone which has 6 pins. I was originally powering the module through those pins (5V and ground). Now I tried powering the module directly using 3.3V (on pin 12, right below reset) and it worked perfectly.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: caiusm on Jan 03, 2017, 02:20 pm
Hi  simsas18:

I also have a HM10 BLE 6pins clone which may be seen by BLE smartphone applications but does not respond to AT cmd:
Question: how do you connected the CC2541 pins to Arduino?
I tried like that: GND<->GND  , Tx<->Rx, Rx<->Tx and Bluetooth module Vcc to arduino 3.3v as well as 5v and not work

What it is wrong?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: simsas18 on Jan 03, 2017, 02:59 pm
I tried sending AT commands from smartphone to module but the module was sending them to arduino, not responding to them. I only got responses to AT commands if I sent them from arduino.

I connected them just like you did. I used 5v for Vcc.
Also, you should use logic level converter or resistor divider to connect arduino's TX and module's RX because  module's tx and rx are 3.3v level (if you use 5v arduino).
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: HungLamCandy on Jan 04, 2017, 04:52 pm
I used to get stuck with flashing firmware HMSoft to CC41-A (ZS-040) by ATMega168 Nano V3 with CH340 USB. No further respond on "Waiting for respond from Arduino ..." when running ccloader.exe in Windows 8.1

After a lot of time to debug the problem, I detect the exact reason is ccloader.ino cannot go over this statement on loop() function

  if (Serial.available()==2) {.....}

because Windows serial sends two bytes too fast, the Nano can only catch one byte Serial.available()

I modified the loop() function

.........
 while(!Continue)     // Wait for starting
 {  
   digitalWrite(LED, HIGH);
   delay(1000);  
   digitalWrite(LED, LOW);
   delay(1000);  
   if(Serial.available())
   {      
      if(Serial.read() == SBEGIN) // check only 1 byte
     {
      digitalWrite(LED, HIGH);
       Verify = Serial.read();
       Continue = 1;
       Verify = 0;  // no verify
     }
     else
     {
       Serial.read(); // Clear RX buffer
     }
   }
 }
...


I flash successfully the clone HM-10 with new HMsoft firmware without neither voltage divider resistor nor any capacitors on Reset pin.   :)  :)  :)

The clone HM-10 maybe not same LED pin so there is no blinking LED to indicate paired status, but you can query it with AT command or pairing.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: davegsm82 on Jan 08, 2017, 12:28 am
I'm very new to Bluetooth BLE, I have a JDY-08 and I'm trying to use it the same way that you would use a HC-05/06.

Is it possible to use one this way? if so, does it support the standard SPP?

Any advice is appreciated.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Thierryev on Jan 20, 2017, 04:20 pm
Hi,
I'm able to connect 2 MiniPro using CC2541 / HM-10 fake BLE module once firmware updated.
I'm able to run AT commands, at 9600 and 57600 bps
But I can't succeed running this BLE module at 115220 bps with correct data transfer : it's quite unstable :-(
Even trying to add some delays for example...
Did anybody tried to run the CC2541 at this rate (updated HM-10 firmware or original CC2541 firmware) ?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: peekpt on Feb 04, 2017, 01:20 pm
 :)  After some days of struggling I switched from pro/mini 3.3v/8MHz(w/ serial dongle cp2102) to Uno(ch340) w/ direct connection and it worked out fine! FML!! :-\   

I'm on mac I needed to compile it from source with
Code: [Select]
gcc -o ccloader main.c.


Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Shalinivit on Feb 09, 2017, 12:23 pm
THE ONBOARD led IN hm10 cc41a  BLUETOOTH MODULE IS NOT WORKING. IT IS NOT SHOWN IN MOBILE TOO. AT+DISC IS ALSO NOT WORKING PLEASE HELP ME OUT IN THIS REGARD.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: hoechin on Feb 10, 2017, 09:32 am
Hello all,

I've managed to successfully updated my CC41-A chip on a ZS-040 board with the guide. It is now discovered on my iphone with Bluelight as HMSoft.

However, i can only send limited AT command. When i send in AT, i'll get a OK reply. Anything else would also just get a single OK. if i send AT+NAME? i get an OK as well.

This is my code which sends the AT command over serial

Code: [Select]
/************************************************************
BLE CC41A Bluetooth
This is a clone of the HM10 BLE board
In the Serial Monitor ensure that 'Both NL and CR' is selected
Select a Baud Rate of 9600
********************************************************/
#include <SoftwareSerial.h>
SoftwareSerial bluetooth(9, 10); // RX, TX

void setup()
{
// Start the hardware serial port
Serial.begin(9600);
pinMode(13, OUTPUT); // onboard LED
digitalWrite(13, LOW); // switch OFF LED
bluetooth.begin(9600);
}

void loop()
{
bluetooth.listen();
// while there is data coming in, read it
// and send to the hardware serial port:
while (bluetooth.available() > 0) {
char inByte = bluetooth.read();
Serial.write(inByte);
}

// Read user input if available.
if (Serial.available()){
delay(10); // The DELAY!
bluetooth.write(Serial.read());
}
}

My serial monitor is running at 9600 baud and has no line ending.

Please help.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: hoechin on Feb 10, 2017, 11:23 am
Problem is solved. I realised that the serial code i was using was not working. I used the SoftwareSerialExample program to end the AT commands. I had to change both baud rates to 9600. But other than that, i dont have to edit much of the code.

Code: [Select]
/*
  Software serial multple serial test

 Receives from the hardware serial, sends to software serial.
 Receives from software serial, sends to hardware serial.

 The circuit:
 * RX is digital pin 10 (connect to TX of other device)
 * TX is digital pin 11 (connect to RX of other device)

 Note:
 Not all pins on the Mega and Mega 2560 support change interrupts,
 so only the following can be used for RX:
 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69

 Not all pins on the Leonardo and Micro support change interrupts,
 so only the following can be used for RX:
 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).

 created back in the mists of time
 modified 25 May 2012
 by Tom Igoe
 based on Mikal Hart's example

 This example code is in the public domain.

 */
#include <SoftwareSerial.h>

SoftwareSerial bluetooth(10, 11); // RX, TX

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }


  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  bluetooth.begin(9600);
  bluetooth.println("Hello, world?");
}

void loop() { // run over and over
  if (bluetooth.available()) {
    Serial.write(bluetooth.read());
  }
  if (Serial.available()) {
    bluetooth.write(Serial.read());
  }
}


Anyone has the latest Version 546 working? I downloaded the official firmware from the china website but the AT commands did not work. End up, i had to flash it back to V540. If anyone is keen to try, i've uploaded the official firmware and the release note for reference. Please take not that it DID NOT work for me.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: hammer5858 on Feb 15, 2017, 11:21 pm
There is an app for iOS that makes using the HM-10 easy to use. It is for a single pin output. There is also a link the sketch for it. I used it with Arduino Nano, HM-10, a Relay, junction box, and an outlet to turn my room light off at night without getting out of my bed. The app is FatBeard HM10 here https://itunes.apple.com/us/app/fatbeard-hm10/id1198432512?mt=8
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: kutysam on Feb 18, 2017, 10:00 am
Hi guys, i managed to flash HM10 onto my AT09 [Same chip as https://www.youtube.com/watch?v=ez3491-v8Og ]

I realized, LEDs do NOT work. but there is a fix.
Furthermore, the firmware messes with your pins and at
5V - Max current --> 55mA
3.3V - Max current --> 28mA

Activate mode is supposed to be 9mA but this is definetly way toooo high!

Here is a fix.
AT+BEFC080
AT+AFTC088

Enter these two commands.
After powering up, PIO4 will be 1. Don't ask me why, but this greatly decreases power!

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

Also, please do ensure that your BLE is under sleep mode always! AT+PWRM0

Findings after this fix,
After connecting to phone --> 8.7mA
After disconnecting, immediately goes to sleep --> 0.5mA (500 nano Amps!)

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

EDIT: Also run a AT+RENEW command after every flash. To revert back to factory settings!
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: songotag on Feb 23, 2017, 07:05 pm
For those trying to flash hm10 using Arduino Nano clones - it is important to connect a 10uF capacitor between RESET and GND pins of Nano - see the photo.
(https://s10.postimg.org/s235uv0c9/nano_to_hm10_wiring_for_flashing.jpg)

For those trying to flash using Linux:
1/ compile ccloader ( /CCLoader-master/SourceCode/Linux/main.c from the zip archive):
gcc main.c -o ccloader
2/ run it:
./ccloader /dev/ttyUSB0 CC2541hm10v540_from_hexor.bin 0

The flashing is quite slow, takes about 5min and pauses couple of times in the process. But it worked for me - many kudos to Hexor!!! I did not use 5v->3.3v level shifting - connected the 5v nano pins directly to DD and DC pins of CC2541.

After flashing the HM10 module announces itself as HMSoft (used to be BT05) and paired with android easily using pin 000000.

Hexor - you are the Man!


Thanks to Hexor and to you, don't work with the 5v-> 3.3V adaptor.

Now my clone will have a new life !    ;-)
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: bIG_dEAL on Feb 28, 2017, 02:43 am
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 (http://www.instructables.com/id/make-iBeacon/?ALLSTEPS) 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.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: jaykup on Mar 05, 2017, 03:08 am
I was able to get mine working from the original post and this post:

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?

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.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: marco_c on Mar 07, 2017, 08:26 am
Thanks very much. Great tutorial and worked first time.

My setup with a Uno and no voltage dividers.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: kutysam on Mar 10, 2017, 01:22 pm
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.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: bilekj on Mar 21, 2017, 09:17 pm
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.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: alto777 on Mar 31, 2017, 05:56 pm
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:

0. 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.

1. 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:

2. 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!

3. 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
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: CrossRoads on Mar 31, 2017, 06:26 pm
"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.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: alto777 on Apr 01, 2017, 01:43 am
"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
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Marco_Segato on Apr 12, 2017, 07:45 pm
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?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Anton_Zeppelin on Apr 17, 2017, 07:16 pm
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)
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: TheJHumphr on Apr 20, 2017, 04:24 pm
AT Commands no longer work after upgrade. Any reason for this?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: mihaitintea on Apr 25, 2017, 09:57 am
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 http://forum.arduino.cc/index.php?topic=393655.0

I.e., load CCLoader sketch into Arduino UNO

2. Execute Hexor step 2:

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


3. 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
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: jagung on May 04, 2017, 11:54 am
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
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: mczubel on May 09, 2017, 11:12 pm
Hi all
Sorry my ignorance
It's possible this way upload a custom firmware to 8051 MCU in 2251 ble?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: dev_filipe on Aug 14, 2017, 09:02 pm
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):


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 (http://www.jnhuamao.cn/download_rom_en.asp?id=1) the following kit:


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).


Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: mihaitintea on Aug 15, 2017, 06:37 am
Hi

The website  jnhuamao download center  seems to be nonfunctional.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: startQ on Nov 01, 2017, 08:28 pm
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
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: quichedood on Dec 03, 2017, 07:54 pm
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 ;)

Just add this line in the beginning of the Arduino project :
Code: [Select]
#define DEBUG_PORT SERIAL_PORT_USBVIRTUAL
and replace all "serial" strings by "DEBUG_PORT"

Run this CCLoader command :
Code: [Select]
CCLoader_x86_64.exe 7 CC2541hm10v540.bin 1

Looks fine ...
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: someuser on Mar 08, 2018, 10:55 pm
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.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Siki on Apr 03, 2018, 06:30 pm
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...
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: andrejd on Apr 09, 2018, 09:09 pm
After long searching, I have found newer firmware with bootloader for the HM-10 (v550).

https://www.iot-experiments.com/jdy-08/
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Siki on Apr 12, 2018, 02:41 pm
Hi there,

I've allready had flashed two fake HM-10 successfully, but this time I tried it with some out of the same lot again and the only thing that show's up in the cmd is "Waiting for respond form Arduino..." if I disconnect the HM-10 from the arduino then it knows nothing is there, any advise from you guys? The LED of the fake HM-10 which normaly blinked is now steady on and the AT commands do not work after the unsuccessfull flash  :smiley-confuse:


I'm using:
- Arduino UNO
- Levelshifter
- Win7 Pro

I haven't changed any of my equipment in comparison to the last time...

Greets Simon
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Torsten85 on Apr 12, 2018, 04:53 pm
I've successfully flashed the firmware, thank you!

But now it seems like the state pin isn't working anymore. Is there a way to bring this function back? Which pin on the chip (not the daughter board) should indicate an active connection?

(Also the onboard led is always off...)

Thanks in advance
Torsten
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: KentR on May 09, 2018, 09:00 pm
After long searching, I have found newer firmware with bootloader for the HM-10 (v550).

https://www.iot-experiments.com/jdy-08/
Thank you so much for posting this.  It really helped me out of a jam.

I needed to get a demo up and running quickly on a BLE113 surface-mount module (which also uses the CC2541).  I was able to successfully load and run the v550 firmware on the BLE113 module!

For anyone else that needs to know, the v550 firmware uses the following pins of the CC2541 for Txd and Rxd:

- P1_6 (UART1 TxD)
- P1_7 (UART1 RxD)
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: rey8801 on May 26, 2018, 01:40 am
Guys! I really need your help! I was trying for the whole evening to flash a clone HM-10 module (https://www.aliexpress.com/item/Bluetooth-4-0-For-Arduino-Android-IOS-HM-10-BLE-CC2540-CC2541-Serial-Wireless-Module/32659958252.html?spm=a2g0s.9042311.0.0.27424c4daBAUBc) with the original HM-10 firmware since the lack in connectivity with Oreo devices. I have to say that I am new to arduino world. I only used it few times. So I apologise if I say something really stupid.
Basically I follow the different step but I get stock at the point when in the promt window the update should start. Below the pictures. I used an arduino uno and connected it following the scheme reported in the tutorial CC2541  /   Arduino Uno
PIN                7         /         5
                    8           /       6 
                    11       /         4

Does someone know how can I do it to make it work with windows 7 and an arduino uno?

Thank you very much.

Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: rey8801 on May 26, 2018, 01:57 am
Here the rest of the pictures. Too many for a single post.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: rey8801 on May 26, 2018, 02:06 am
Last one I swear  :smiley-lol:
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: rey8801 on May 28, 2018, 11:52 am
Up...

If someone got it worked with my same hardware, please share the trick...

Thx!
Title: [1k resistor between] HM-10 HM-11 firmware V603 released <<< VIRUS? >>>
Post by: rtek1000 on Jun 17, 2018, 04:01 am
Hi, guys,

I was successful.

Thank you very much!

You who put 5V directly are very crazy! Or very brave!
I put a 1k resistor between the Arduino and the HM-10.

Now the site has firmware version 603, someone tried to upgrade?
[HM-10 HM-11 firmware V603 released (2017/11/14 10:44:51)]

My antivirus blocked the download:
http://www.jnhuamao.cn/rom/HMSoft-10-2541-V603.zip

---> HMSoft-10-2541-V603.zip\HMConfigAssistant.exe Win32:Malware-gen <---

Some online antivirus are reporting viruses as well:
https://www.virustotal.com
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: rtek1000 on Jun 17, 2018, 04:47 am
The v603 did not work here!  :'(

The CCLoader.exe program shows the CC2540 chip.

The PDF document provided by the manufacturer says that the CC2540 chip is not the same as the CC2541, maybe the v603 firmware is for the CC2541 chip.

Due to the problem with antivirus, I could not follow the method described by the manufacturer, I used CCLoader, and after v603 I turned the v540.

The strange thing is that the site shows the details of the board with the firmware: V605, and download has only v603.  ???

Note: When opening the port the Arduino Nano was reset, so I waited about 3 seconds and tried again (CTRL+C --> "^C"). In this way began the progressive counting of blocks, arrived at 512 for v540, and a little less for v603

For v540:
Quote
D:\Arduino\Bluetooth\Flash>CCLoader.exe 2 Firmware.bin 0
Copyright (c) 2013 RedBearLab.com
CCLoader.exe version 0.5
Comport : COM2
Bin file: Firmware.bin
Device  : Default (e.g. UNO)

Comport open!
<Baud:115200> <data:8> <parity:none> <stopbit:1> <DTR:off> <RTS:off>

File open!
Block total: 512

Enable transmission...
Request sent already!
/********************************************************************/
* If there is no respond last for 3s, please press "Ctrl+C" to exit!
* And pay attention to :
*   1. The connection between computer and Arduino;
*   2. The connection between Arduino and CC2540;
*   3. Whether the device you using is Leonardo or not;
*   4. Other unexpected errors.
/********************************************************************/

Waiting for respond from Arduino...

^C
D:\Arduino\Bluetooth\Flash>CCLoader.exe 2 Firmware.bin 0
Copyright (c) 2013 RedBearLab.com
CCLoader.exe version 0.5
Comport : COM2
Bin file: Firmware.bin
Device  : Default (e.g. UNO)

Comport open!
<Baud:115200> <data:8> <parity:none> <stopbit:1> <DTR:off> <RTS:off>

File open!
Block total: 512

Enable transmission...
Request sent already!
/********************************************************************/
* If there is no respond last for 3s, please press "Ctrl+C" to exit!
* And pay attention to :
*   1. The connection between computer and Arduino;
*   2. The connection between Arduino and CC2540;
*   3. Whether the device you using is Leonardo or not;
*   4. Other unexpected errors.
/********************************************************************/

Waiting for respond from Arduino...

Uploading firmware...

1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  2
3  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  4
3  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  6
3  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  8
3  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99  100  101  102
  103  104  105  106  107  108  109  110  111  112  113  114  115  116  117  118
  119  120  121  122  123  124  125  126  127  128  129  130  131  132  133  134
  135  136  137  138  139  140  141  142  143  144  145  146  147  148  149  150
  151  152  153  154  155  156  157  158  159  160  161  162  163  164  165  166
  167  168  169  170  171  172  173  174  175  176  177  178  179  180  181  182
  183  184  185  186  187  188  189  190  191  192  193  194  195  196  197  198
  199  200  201  202  203  204  205  206  207  208  209  210  211  212  213  214
  215  216  217  218  219  220  221  222  223  224  225  226  227  228  229  230
  231  232  233  234  235  236  237  238  239  240  241  242  243  244  245  246
  247  248  249  250  251  252  253  254  255  256  257  258  259  260  261  262
  263  264  265  266  267  268  269  270  271  272  273  274  275  276  277  278
  279  280  281  282  283  284  285  286  287  288  289  290  291  292  293  294
  295  296  297  298  299  300  301  302  303  304  305  306  307  308  309  310
  311  312  313  314  315  316  317  318  319  320  321  322  323  324  325  326
  327  328  329  330  331  332  333  334  335  336  337  338  339  340  341  342
  343  344  345  346  347  348  349  350  351  352  353  354  355  356  357  358
  359  360  361  362  363  364  365  366  367  368  369  370  371  372  373  374
  375  376  377  378  379  380  381  382  383  384  385  386  387  388  389  390
  391  392  393  394  395  396  397  398  399  400  401  402  403  404  405  406
  407  408  409  410  411  412  413  414  415  416  417  418  419  420  421  422
  423  424  425  426  427  428  429  430  431  432  433  434  435  436  437  438
  439  440  441  442  443  444  445  446  447  448  449  450  451  452  453  454
  455  456  457  458  459  460  461  462  463  464  465  466  467  468  469  470
  471  472  473  474  475  476  477  478  479  480  481  482  483  484  485  486
  487  488  489  490  491  492  493  494  495  496  497  498  499  500  501  502
  503  504  505  506  507  508  509  510  511  512  Upload successfully!
File closed!
Comport closed!


D:\Arduino\Bluetooth\Flash>
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: rtek1000 on Jun 17, 2018, 08:01 am
Now the Firm v603 has worked as IBEACON:

(P.S.: AT+VERR? and AT+VERS? shows HMSoft V604, Bug?)

1: Install the V540 with CCLoader.exe
2: Upgrade to V603 with HMSoft.exe

After upgrading the firmware, run the AT commands via serial port:
Quote
1. AT+RENEW Restores factory defaults

2. AT+RESET Reboot HM-10

3. AT Wait for OK

4. AT+MARJ0x1234 Set iBeacon Major number to 0x1234 (hexadecimal)

5. AT+MINO0xFA01 Set iBeacon Minor number to 0xFA01 (hexadecimal)

6. AT+ADVI5 Set advertising interval to 5 (546.25 milliseconds)

7. AT+NAMEDOPEY Set HM-10 module name to DOPEY. Make this unique.

8. AT+ADTY0 Advertising ScanResponse, Connectable

9. AT+IBEA1 Enable iBeacon mode

10.AT+DELO1 iBeacon Allowed to broadcast and scanning

11.AT+PWRM1 Don't auto sleep

12.AT+RESET Reboot
Look this:
http://www.instructables.com/id/make-iBeacon/ (http://www.instructables.com/id/make-iBeacon/)
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: rtek1000 on Jun 17, 2018, 06:42 pm
I tried slave mode and managed to pair with a smartphone, and I was able to send data through the UART serial port, but I could not make the system LED blink, does anyone know how to do it?

I already checked the LED with a multimeter, it turns on and is properly connected to the HM-10 pin

I already tried the command:
Quote
AT+PIO10 Set PIO1 output status (System LED)
Unconnected Output: 500ms High 500ms Low,
Connected output: High
To be able to pair with the smartphone:
(Of course the Smartphone must be compatible with Bluetooth LE [BLE: Low Energy])
Quote
AT+RENEW
AT+RESET

AT+TYPE3 Set Module Bond Mode: Auth with PIN
Default PIN: 000000
To monitor connections:
Quote
AT+NOTI1 Set notify information: Notify
Link ESTABLISHED:
OK+CONN string through UART
Link LOSTED:
OK+LOST string through UART

AT+NOTP1 Set notify mode with address
OK+CONN:001122334455 String "001122334455" is the MAC address string
Quote
It not works like other simple Bluetooth module like HC-05 and HC-06
Source: https://forum.arduino.cc/index.php?topic=377228.0
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: rtek1000 on Jun 17, 2018, 07:20 pm
I found out what happened that the system LED did not blink,

I made a big mistake,

I soldered all the pins of the HM-10 on the daughter board.  :-[

The daughter board has pin connection 24 and 31, so when I soldered, these pins stayed connected, as the pin 31 should be pulling down, the LED does not light up.

I realized this after monitoring the voltage the LED was receiving, it was only 0.006V (6mV), so I tested the continuity.

Fortunately on the daughter board has a track under the board, which makes this connection of these pins, so I had to cut it, and the LED came back to flash.  :smiley-sweat:

Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: gta12027 on Jun 21, 2018, 10:12 am
I Followed this routine that make cc-41A(Fake board) to HM-10.
but I have a problem with AT command....
it doesn't work....
before I upload the binary file cc2541hm10v540, the AT commands worked
Now the Led on the board is blinking faster than before.
I have many fake board so I tried to upload by CCLoader.exe several times
How can I figure it out?....

I checked RX, TX Line swipping, and version 550 bin file....
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: mariocaptain on Jul 21, 2018, 05:36 am
This is the HM-10 v604 full firmware (with bootloader) in hex format: HM-10v604_full.hex (https://drive.google.com/open?id=11g56A06p0m8N2i4mRc_Wu96StFYNhlgA)
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: murcha on Sep 03, 2018, 04:30 am
BTW, the latest versions of the firmware can be downloaded here http://www.huamaosoft.com/download_rom.asp?id=
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: axizozuk on Sep 03, 2018, 08:34 am
What application should I use when connecting with my mobile phone? I do not accept 000000 as my PIN. 123456 accepts and connects. but the android applications do not connect properly? What is the reason?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: rsvsaha on Sep 10, 2018, 08:55 pm
Today at 06:49 pm
Hii... I faced a peculiar problem while trying to configure my AT-09 BLE Device's baud rate. I used the AT+BAUD2 which has set it to a baud rate of 2400 but now when I run any AT+ Command it prints ERROR twice on the console. But when I just use AT to check the connection the device returns ok. What might be the cause of this problem can anyone please help?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Jocoyo on Oct 02, 2018, 09:44 pm
Can you do this in a Mac?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Jocoyo on Oct 02, 2018, 10:07 pm
I have been trying to use your guide but I have not been able to do it on my Mac. Do you know what is the command in the terminal?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: iBuddy85 on Oct 17, 2018, 03:14 pm
Hi all,

First of all, thanks for the instructions for flashing the modules.

Unfortunately, I had several issues with flashing the firmware on a module and, too sad, jailed one of mine... but finally, I was successful!
Perhabs my solution is helpful for someone.

My configuration:
Win 7 64-bit
USB-UART CP2104 converter
Arduino Pro Mini 3V3 8MHz


First, I was not able to run CCLoader.exe nor CCLoader_x86_64.exe. Windows responds with a compatibility issue.
> Solved by using DevC++ and recompiled the source code from github. This was easier than it sounds!

Second, the CCLoader was not able to comunicate with the Arduino properly. Waiting for respond from Arduino...
> I assumed, that the issue is the serial baud rate. I reduced the speed in the C source code and the Arduino source code to 19200. Unfortunately, this did not solve the issue.
> Checked the connection and found, that I did not disconnect the DSR pin from the Serial converter to the Arduino (it resets the arduino to upload the sketch). Ich checked the C code and believed, it is disabled. However, I disconnected it and this did the trick.
Well, when checking the Arduino code, I also commented the line required for Leonardo boards. I was wondering, why this is not the default.

I checked, if the Pro Mini 3V3 is able to run at 115200 baud and it looks like, this is indeed too fast for it. Well, upload is slow, but for one or two modules it is fine.

I attach my files and hope, it helps. Good luck!

Cheers,
iBuddy
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: smerrett79 on Oct 20, 2018, 12:54 am
Hi all,

First of all, thanks for the instructions for flashing the modules.

Unfortunately, I had several issues with flashing the firmware on a module and, too sad, jailed one of mine... but finally, I was successful!
Perhabs my solution is helpful for someone.

@iBuddy85, thank you so much - this has been driving me crazy but your method worked for me! Windows 10 Pro, Arduino IDE 1.8.7, Pro Mini 3.3V with FTDI clone USB-Serial. Had already tried Uno direct and the modified Serial sketch further back in this thread. Didn't use capacitor on reset. Did follow ALL the steps in your method. Thanks again.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: zincaandrei on Nov 15, 2018, 06:34 pm
I have also a clone module, connect the pins from arduino 4,5,6 to 7,8 and 11 to BT module and nothing. no update for the firmware. What can i do? Hope somebody will help me
With the actual firmware, my S7 oreo said" pairing rejected to BT05"
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: mrives on Nov 23, 2018, 02:53 pm
Hi guys, i managed to flash HM10 onto my AT09 [...]

After powering up, PIO4 will be 1. Don't ask me why, but this greatly decreases power!

Thanks for your help! I did some digging on my AT-09 board.
On right side, only PIO1 to PIO4 are really connected to the inner module.
PIO4 is linked to ... 3v3! So it helps to keep it on.

Here is a fix.
AT+BEFC080
AT+AFTC088
PIO2 is connected to State pin.
PI08 is connected to LED (but not connected to the castellated module).
PI09 is connected to State pin (but not connected to the castellated module).

I modified the fix :
AT+BEFC080
AT+AFTC28C
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: pol0815 on Feb 04, 2019, 10:49 am

I need a HEX file for the CC debugger.
Version v540 runs but no AT commands via terminal possible.
I work directly with a CC2541 chip
Maybe then it goes with AT over terminal
Please Help me
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: GreenSpike on Feb 12, 2019, 02:33 pm
Hi all,

First of all, thanks for the instructions for flashing the modules.

Unfortunately, I had several issues with flashing the firmware on a module and, too sad, jailed one of mine... but finally, I was successful!
Perhabs my solution is helpful for someone.

My configuration:
Win 7 64-bit
USB-UART CP2104 converter
Arduino Pro Mini 3V3 8MHz


First, I was not able to run CCLoader.exe nor CCLoader_x86_64.exe. Windows responds with a compatibility issue.
> Solved by using DevC++ and recompiled the source code from github. This was easier than it sounds!

Second, the CCLoader was not able to comunicate with the Arduino properly. Waiting for respond from Arduino...
> I assumed, that the issue is the serial baud rate. I reduced the speed in the C source code and the Arduino source code to 19200. Unfortunately, this did not solve the issue.
> Checked the connection and found, that I did not disconnect the DSR pin from the Serial converter to the Arduino (it resets the arduino to upload the sketch). Ich checked the C code and believed, it is disabled. However, I disconnected it and this did the trick.
Well, when checking the Arduino code, I also commented the line required for Leonardo boards. I was wondering, why this is not the default.

I checked, if the Pro Mini 3V3 is able to run at 115200 baud and it looks like, this is indeed too fast for it. Well, upload is slow, but for one or two modules it is fine.

I attach my files and hope, it helps. Good luck!

Cheers,
iBuddy
This was a awesome find and ty for the recomplie :)
Works perfectly on win 10 64 bit.
I however was using a UNO to update and had to add a 10uf capacitor between gnd and reset to avoid resets of the UNO. Hope this helps someone else trying to flash :)
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Gwe89 on Feb 17, 2019, 01:48 pm
Hi Iv just done this too my module and I think it's bricked it
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Gwe89 on Feb 17, 2019, 04:37 pm
I have just noticed my phone is picking the bluetooth module up but it's not responding to any AT commands
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: xCrash00 on Mar 16, 2019, 10:27 pm
Hi,

I have followed all the steps from original post with my AT-09 clones. My modules look like this (https://cdn-images-1.medium.com/max/1600/1*GqRnmlHrN6_VuYWLAYI4wg.png).

When powered on, the led is always on - is this a problem? I have two other problems - the module does not appear in any other device (several phones, RPi3) - before the update I was able to connect to the module out-of-box.

Is there any change in pins? I cant get the serial communication to work. One of the bottom right-angle pins is for TX, other for RX - should these still work? VCC and GND right-angle pins seem to work. I am not able to use any AT commands or connect to the module.

I used Arduino Nano clone for the process of flashing, it finished succesfully without any complications.

Thanks for help.
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: Ostpopcorn on Mar 18, 2019, 09:55 pm
Hi,

I've also got a HM-10 clone from Alibaba and went through with this guide and the update process was a breeze. Connecting with the module from the phone was easy after, but I among many other can't get AT commands at all to work. While using a FTDI converter can't get the updated module to respond to AT commands, it just send them as text to the Bluetooth console on my phone. I can send text both ways without any problems. I have two modules and only one is updated so I've confirmed what worked before and after that way.

Has anyone figured out how to get it to work? :) 
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: johweb on Apr 17, 2019, 01:35 pm
Hello everyone,

I'm having the same problem as some of you... I've got a cheap clone with cc2541. I struggled to update the firmware following this subject, and finally succeded. Module is now seen with "HMSoft" name on my phone. But now, every command I send just answer OK... I tried AT+HELP, AT+NAME? but I only receive OK as an answer...

Anyone can help me ?
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: johweb on Apr 17, 2019, 03:52 pm
Hello everyone,

I'm having the same problem as some of you... I've got a cheap clone with cc2541. I struggled to update the firmware following this subject, and finally succeded. Module is now seen with "HMSoft" name on my phone. But now, every command I send just answer OK... I tried AT+HELP, AT+NAME? but I only receive OK as an answer...

Anyone can help me ?
Hey ! I found the answer... :)

Step 1 : upload an empty sketch to arduino
Step 2 : module connected to arduino, RX to RX, TX to TX (and of course, ground and 3.3V)
Step 3 : launch arduino ide
Step 4 : plug arduino to computer WITH the module button pressed
Step 5 : launch serial monitor and send AT commands !
Step 6 : enjoy !
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: samtree on Jun 19, 2019, 10:48 pm
But now it seems like the state pin isn't working anymore. Is there a way to bring this function back? Which pin on the chip (not the daughter board) should indicate an active connection?

(Also the onboard led is always off...)

See #78 from kutysam. He has a fix for the LED. Worked on my clone.

Also this link tells you how to fix the STATUS pin. I didn't try but seems reasonably easy : https://blog.yavilevich.com/2018/04/should-you-throw-away-your-cc41-hm-10-clones-now-that-android-8-is-here/

Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: tordu77 on Jun 21, 2019, 10:11 am
Hi,
thank you for this tread  :)
i update firmware of a cc41a (zs-040 board) with hm10 firmware with bootloader V540 with ccloader
and i upadte with last firmware of hm10 V704 with hmsoft.

to fix the led blinking before connect and fix after connect (i have a zs040 board):

AT+BEFC008
AT+AFTC088

Now all is ok
i don't need state pin... then i don't search an issue for it
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: WhiteO on Jul 03, 2019, 08:32 am
flash the clone successfully, the AT+DISK did not work, use AT+RENEW. The module was reset to the factory settings, but does not respond to commands, tried to flash the error "no chip detected"
Title: Re: How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41)
Post by: matthijs490 on Jul 03, 2019, 09:27 pm
To all those Who believe their AT-09 clone doesn't work after this upgrade:

Simply change the serial setting to 9600 Baud (default) and "no line break"