Friday, February 27, 2015

Configuring HM-10 to Support Over-the-Air(OTA) Update

One of the key features of Ibeacons is the ability of apps to manage them remotely or via over-the-air update. This is true especially when maybe hundreds of ibeacons are deployed, there is just got a way to manage them remotely. HM-10 is surprisingly has this feature as well. Other advantage of OTA is that it will allow HM-10 to toggle between an Ibeacon and a regular Bluetooth module which can enable it to gather information on its surroundings and transmit it to a server without the need for an external microcontroller.

My previous post(The proper way of turning the HM-10 into Ibeacon) only dealt with(obviously from its title)how to configure HM-10 into ibeacon. But it did not mentioned about how to configure it to support Over-The-Air update which I still do not know during that time of writing. So now, I am willing to share with my readers and visitors how to really turn HM-10 into a real ibeacon.

Actually, it is very simple to do it, HM-10 should be connectable and be able to receive incoming data while broadcasting the ibeacon signal. By turning these off, we are sacrificing the few milliAmps of power consumption, but trade-off is really worth it. Here is the procedure:



I have proven this to work by modifying the source code of the android app that I used in my previous post(More Fun with HM-10). To describe in more detail the modification I made, I just replaced the following line(in bold letters)) in DeviceControlActivity.java:
private void makeChange()
{
string str=RGB[0] + "," + RGBFrame[1] + "," + RGBFrame[2] + "\n";
......
}
with this new code(in italics)to turn off the ibeacon:
private void makeChange()
{
string str="AT+IBEA0";
......
}

(credit to 

The effect of my change is that each time the value of any of the led dimmer slider control changes, the android app will send the command "AT+IBEA0".  

For security reasons, just enable password protection so that accessibility can controlled and restricted.


1 comment:

  1. Hi, I was wondering that whether I can use the OTA feature of HM-10 modules to update Arduino Uno or STM32(Blue-Pill Borad) firmware wirelessly. If not please show me the right path to achieve this.

    ReplyDelete