Arduino projects

Flash firmware on HM-10 BLE module using Arduino Uno

You may encounter some very frustrating problems when using the BLE HM-10 module, such as you cannot send or receive AT commands, or you cannot pair the HM-10 with your smartphone. If you encounter these problems, then your BLE HM-10 module is definitely a clone version of the HM-10 module. However, after flashing a new firmware, it acts like a real BLE HM10 module and can be used as an original Bluetooth module.

What is a cloned HM-10 module?

The cloned HM-10 module is similar to the genuine HM-10 module. But in order to save extra cost in the manufacturing process, the manufacturer removed the external oscillator and made space for an external oscillator. The manufacturer uses the internal crystal of the HM-10 module to save cost. Also, the firmware is different from the genuine HM-10 module.

Flash firmware on HM-10 BLE module using Arduino Uno

The BLE HM-10 module is a Bluetooth Low Energy (BLE) module built on the basis of Texas Instrument’s CC2540 or CC2541. The Chinese manufacturer Jinan Huamao Technology is the developer of the development board and firmware. The manufacturer has stated in the official documentation that there are several clones on the market.

How to distinguish between Genuine and Clone HM10 BLE modules

There are two types of BLE HM-10 modules, genuine and clone. To identify the differences between genuine and clone HM-10 modules, there are some points to do so.

1.The first point is by observing the HM-10 module. If there is a 32KHz crystal oscillator on the HM-10 board, then it is the real one and the other one is a cloned HM10.

Flash firmware on HM-10 BLE module using Arduino Uno

2. The second method is to connect HM10 with any serial module and send AT commands. If HM-10 does not reply to AT commands, it is a cloned HM-10 module.

How to change or flash the firmware of a cloned HM-10 BLE module

In order to change the firmware, we really need some soldering. After changing the firmware of the HM10 module. You will be able to access all its features. There are two ways to flash a cloned HM10 module:

1. The first method uses the Texas Instruments SmartRF Flash Programmer.

2. The second method uses Arduino as the programmer of HM-10.

In this tutorial, we will use the second method of burning the firmware of HM-10 module i.e. Arduino as a programmer for HM-10. So, let’s start the steps to burn the HM-10 module using Arduino UNO as a programmer. As mentioned earlier, soldering is required to connect the HM-10 to Arduino. We need to solder wires to the DEBUG_CLOCK, DEBUG_DATA, RESET_N pins of HM-10. The complete process is explained in the next section.

Required Components

● Arduino (UNO, Pro Mini)

● USB to TTL converter for connecting Arduino to PC

● CC2541 board: HM-10, CC41

● Some jumpers

● Arduino IDE

● CCLoader Arduino Sketch

● HM-10 firmware (extract the Zip file)

HM-10 pinout

Flash firmware on HM-10 BLE module using Arduino Uno

Circuit Schematic

First, solder jumper wires on the pins of the HM-10 board and then connect the circuit to the Arduino to burn the firmware inside the HM10 BLE module.

Flash firmware on HM-10 BLE module using Arduino Uno

Flash firmware on HM-10 BLE module using Arduino Uno

Steps to Update Firmware in HM10 Bluetooth Module using Arduino Uno

1. First, download and upload the CCloader Sketch on your Arduino Uno using the Arduino IDE. This zip file contains all the files related to flashing the firmware (.bin file, CCloaderArduino.ino, CCLoader.exe).

> Open the sketch using the Arduino IDE

> Set up baud rate, board, COM port, programmer, etc.

> Compile and upload the sketch to the UNO Board.

2. After soldering the wires on the HM-10 board, connect the HM-10/CC2541 board to the Arduino:

3. Now that the circuit connections are ready, the next step is to burn the HM-10 firmware using Windows CCloader.exe. Save all the files in the same folder i.e. CCloader.exe, CC2541hm10v540.bin (In this case, I have saved it in Users > Desktop > HM10). The CC2541hm10v540.bin file needs to be extracted as it will be downloaded in Zip format.

4. Now, open the command prompt and navigate to the folder where “CCloader.exe” is located. In my case it is C:\Users\Abhiemanyu Pandit\Desktop\HM10

5. Write and execute commands in the following format

  1. CCLoader.exe <COM Port> <Firmware.bin> 0

Copy code

NOTE: Replace COM port with your COM port number (eg 2,3,4,5). Do not write COM5 or COM4 just the port number. Also replace the Firmware.bin file without the <> symbols with your file name. Please note that if you are using Arduino Uno then use “0”, if you are using other Arduino such as Micro then change 0 to 1

In this case, the command would look like:

  1. C:\Users\Abhiemanyu Pandit\Desktop\HM10>CCloader.exe 4 CC2541hm10v540.bin 0

Copy code

You can also change the firmware name and CCloader name. If you change the name of CCloader.exe -> CCloader123.exe and CC2541hm10v540.bin -> CC2541.bin with COM port 5, the command will look like this:

  1. C:\Users\Abhiemanyu Pandit\Desktop\HM10>CCloader123.exe 5 CC2541.bin 0

Copy code

You have to place the Firmware.bin file in the same folder where CCloader is located.

6. After executing the above command, the firmware will start uploading, wait for it to complete. Once completed, the command prompt will look like this.

Now it is all done and the new firmware has been successfully installed, the CC2541 now has the genuine HM-10 firmware.

7. Now, if you want to upgrade or downgrade the firmware, you don’t need to do the same steps again. Just connect the HM-10 module with the USB to TTL converter with Rx, Tx, Vcc, GND and do the normal steps to upgrade the firmware.

That’s it for changing and burning the HM-10 module with firmware. Please note that after burning the firmware, the HM-10’s onboard LED will stop glowing, but this does not mean your HM-10 will not work properly. The firmware may not have the LED code, or the pin number may be different. If you have any questions or suggestions, please reply below this post.

Check Also
Close
Back to top button