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

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

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

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

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

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

Thanks a lot.

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

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

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

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

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

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

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

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

Hi!

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

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

@songotag I used an arduino micro, I had to use “CCLoader.exe <Firmware.bin> 1” instead of a 0

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

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

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

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)

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

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?

danielnora: 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!

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

danielnora: 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!

danielnora: 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!

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.

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.

  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

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

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

  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), 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!

jps1: 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!

Hi,

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

Thanks in advance.

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