In my earlier post I mentioned about how to configure HM-10. My HM-10 by default has name BT05. I want to change it. But how ? That's not hard as long you have necessary tools to do it. In my case I setup it using breadboard and use Arduino 5v as power supply. To configure HM-10 you need to issue AT command. For that purpose you need to use serial communication between computer and the module. Here are tools that I use:
After you finished all wiring, you are ready to go.
- HM-10 BLE
- USB to Serial/TTL adapter or cable I use FT232RL USB to TTL adapter
- Arduino and Arduino IDE
- Male to male jumpers
- USB to mini usb cable data (for serial connection)
Here is HM-10 and FT232RL side by side.
For pinout for HM-10 and FT232RL based on above picture are below.
HM-10 (From left to right)
- STATE
- RXD
- TXD
- GND
- VCC
- EN
FT232RL (From left to right)
- DTR
- RX
- TX
- VCC
- CTS
- GND
The pin we will use for serial communication are below.
HM-10 TXD <-------> FT232RL RX------->
HM-10 RXD <-------> FT232RL TX------->
Since we use Arduino power for this purpose, make sure the jumper on FT232RL is on 5v voltage or it could burn the adapter.
After you finished all wiring, you are ready to go.
- Connect Arduino USB to your laptop/PC
- Connect USB data cable from FT232RL to computer
- Run Arduino IDE, and select serial port from Tools > Serial in my Arduino IDE detected as /dev/cu.usbserial-xxxxx
- Open Serial Monitor
- Set 9600 baud Newline and Carriage Return
Here the screenshot from serial monitor.
Command explanations.
- AT : check terminal command, all good if return OK
- AT+NAME: get device name
- AT+NAMESARANG MACAN: set device name to SARANG MACAN
- AT+NAME: get modified device name
- AT+RESET: reboot device/software
Now you can test it by scan the bluetooth from your smartphone. Here what I get when using my HM-10 BLE app.
For more command list supported by device you can type AT+HELP on terminal. Here the list.
I have mentioned that my HM-10 was cloned version. Turn out the module built by Bolutek. I am in process getting the original one. Will update it later. Next post I'll try to configure it as iBeacon. Happy hacking :)
Comments