Skip to main content

Arduino: Configuring HM-10

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:
  1. HM-10 BLE
  2. USB to Serial/TTL adapter or cable I use FT232RL USB to TTL adapter
  3. Arduino and Arduino IDE
  4. Male to male jumpers
  5. 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.

  1. Connect Arduino USB to your laptop/PC
  2. Connect USB data cable from FT232RL to computer
  3. Run Arduino IDE, and select serial port from Tools > Serial in my Arduino IDE detected as /dev/cu.usbserial-xxxxx
  4. Open Serial Monitor
  5. Set 9600 baud Newline and Carriage Return
Here the screenshot from serial monitor.


Command explanations.
  1. AT : check terminal command, all good if return OK
  2. AT+NAME: get device name
  3. AT+NAMESARANG MACAN: set device name to SARANG MACAN
  4. AT+NAME: get modified device name
  5. 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

Popular posts from this blog

Using LCD 2004a I2C on project with Arduino

On previous post measurement sensor results displayed on serial monitor. This is good when we are on development stage. When we want something more independent we need external display. I have purchased a few type of display. For now we will use LCD 2004 for external display.

Arduino : Controlling PL9823-F8 RGB LED

I have great passion about electronics since I was in middle school then high school. With some of my school friend that has same passion in electronics, we built radio transmitter so we can communicate each other at anytime. It was so cool back then. Thats why I took study on electrical Engineering. Instead of working on Electrical engineering field, I end up become web programmer. Something I found interesting when i was in college. That's old story. But lately I get bored and try to get another hobby. I have many hobbies and creating electronics stuff is one of it. So I bought my self Arduino Uno and few electronic components to get started learning Arduino programming. So my first project is controlling RGB Led. Here what you need: Arduino Uno with usb data cable and Arduino IDE Install Adafruit Neopixel library 3 PL9823 RGB led Breadboard Jumper cables (mostly male to male) First you need to install Arduino IDE. You can download it here .  That would depend

Read temperature and barometric pressure from GY BMP 280 using Arduino

This sensor based on BMP 280 digital pressure sensor made by Bosch. You can find the complete datasheet here . This small sensor is quite impressive with it's accuracy. It claimed to be ±1 hPa in measuring barometric pressure, ±1.0°C in temperature measurement and ±1 meter in altitude accuracy. Pretty impressive right ?