I am trying to change the baud rate on my hm10 bluetooth low energy module using AT commands from the serial monitor. I have tried connecting a usb cable from the computer to my arduino uno and uploading many different programs, none of them work. Can someone please tell me exactly how to change the baud rate to 115200 and give me the correct code? The default baud rate of the hm10 module is 9600.
The sketch I use to communicate with my HM-10 is
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(11, 10); //RX|TX
void setup(){
Serial.begin(9600);
BTSerial.begin(9600); // default baud rate
while(!Serial); //if it is an Arduino Micro
Serial.println("AT commands: ");
}
void loop(){
//read from the HM-10 and print in the Serial
if(BTSerial.available())
Serial.write(BTSerial.read());
//read from the Serial and print to the HM-10
if(Serial.available())
BTSerial.write(Serial.read());
}
With this sketch you should get to send the AT commands, I think you also have to take out the carriage return and linde feed options in the Serial Terminal.
Send "AT", sometimes the first one does not work, send it again. You should recieve "OK" as a response.
To change the baud rate to 115200 send "AT+BAUD4" and the response should be "Set:OK4"
I recommend reading it's datasheet
http://www.seeedstudio.com/wiki/images/c/cd/Bluetooth4_en.pdf
Cheers
I tried uploading this sketch to my arduino at 9600 baud, no line ending. However, this did not work. I think the sketch is right, but my bluetooth device might be faulty.
Your bluetooth module works right? Can you tell me which bluetooth module you have(specifically because I want to buy the exact same one)?
You can wire TX0/RX0 with Uno f.e. and it works. Checkout Apploader iOS app that allows to use HM-10 for uploading over BLE. You can find schematics at the link too
I tried this sketch too but all it returns is AT Commands:
Where is the problem, please guide
Are you sure that you are using an HM-10 and not a copy like Bolutek CC-41A? I have also bought some BLE modules marketed as HM-10 on the ebay, but they turned out to be CC-41A.
Although both modules look very similar, CC-41A requires that AT commands are terminated by LF+CR and there are differences in the command set. I am not sure if there are any other differences in the hardware, but I experienced that I cannot turn CC-41A into iBeacon mode or at least I cannot see it on my iPhone iBeacon scanner app after running the HM-10 iBeacon initialization sequence.
I have written few posts on different forums and hope somebody will come with some more information on how this problem can be solved. If you have any experience with CC-41A please share...
Just curious, how did you figure out you had CC-41A?
Damn....I bought y couple of HM-10 on ebay....or better say CC41-A.
If you enter AT+VERSION you'll get something like:
+VERSION=Firmware V3.0.6,Bluetooth V4.0 LE
If you tra AT+HELP you'll get:
- Command Description *
- ---------------------------------------------------------------- *
- AT Check if the command terminal work normally *
- AT+RESET Software reboot *
- AT+VERSION Get firmware, bluetooth, HCI and LMP version *
- AT+HELP List all the commands *
- AT+NAME Get/Set local device name *
- AT+PIN Get/Set pin code for pairing *
- AT+PASS Get/Set pin code for pairing *
- AT+BAUD Get/Set baud rate *
- AT+LADDR Get local bluetooth address *
- AT+ADDR Get local bluetooth address *
- AT+DEFAULT Restore factory default *
- AT+RENEW Restore factory default *
- AT+STATE Get current state *
- AT+PWRM Get/Set power on mode(low power) *
- AT+POWE Get/Set RF transmit power *
- AT+SLEEP Sleep mode *
- AT+ROLE Get/Set current role. *
- AT+PARI Get/Set UART parity bit. *
- AT+STOP Get/Set UART stop bit. *
- AT+START System start working. *
- AT+IMME System wait for command when power on. *
- AT+IBEA Switch iBeacon mode. *
- AT+IBE0 Set iBeacon UUID 0. *
- AT+IBE1 Set iBeacon UUID 1. *
- AT+IBE2 Set iBeacon UUID 2. *
- AT+IBE3 Set iBeacon UUID 3. *
- AT+MARJ Set iBeacon MARJ . *
- AT+MINO Set iBeacon MINO . *
- AT+MEA Set iBeacon MEA . *
- AT+NOTI Notify connection event . *
- AT+UUID Get/Set system SERVER_UUID . *
- AT+CHAR Get/Set system CHAR_UUID . *
- -----------------------------------------------------------------*
- Note: (M) = The command support slave mode only. *
- For more information, please visit http://www.bolutek.com *
- Copyright@2013 www.bolutek.com. All rights reserved. *
Bolutek sells CC41-A, not HM-10.
And on an CC41-a 'at+help' will work the same way as 'AT+HELP', while HM-10 should be casesensitive.
Is there a chance to use the HM-10 firmware anyway?
dmjlambert:
Just curious, how did you figure out you had CC-41A?
Several hints that will tell you it's a CC41-A clone:
-It's missing a crystal in the top left corner (placing the Bluetooth antenna on top facing you)
See http://wiki.makespacemadrid.org/images/7/72/HM-10-fake.jpg
-It needs CR+LF terminated commands to reply. Original HM-10 will reply to any unterminated AT commands
-Doesn't support usual commands like AT+ADTY3 or AT+DELO2 needed for best performance as a beacon. When you issue an unsupported command you don't get any reply at all in a clone
-First commands you try, like AT+VERR? or AT+VERS? following usual guides don't return anything.
Im telling you as I fell for one of this. I found an article on how to flash them (using an arduino in between) with the original HM-10 firmware thou
Thank you
edugimeno:
Im telling you as I fell for one of this. I found an article on how to flash them (using an arduino in between) with the original HM-10 firmware thou
Can you give a link to the article that shows how to flash them please?
dmjlambert:
Can you give a link to the article that shows how to flash them please?
No luck... I tried to follow the directions myself to flash them but after downloading the .ino and the windows .exe, next step was to download the firmware (according to the author, the firmware in the original board website was not usable as it was missing the boot loader and something else) but the guy who had the special firmware in his website had removed it as he had abandoned the project. I've spent hours looking for another mirror or site hosting the same file with no luck...sorry
leogar07:
The sketch I use to communicate with my HM-10 is
Hi leogar07. Your sketch worked perfectly after I realised that I had a less than original copy and that I had to add the CR+LF. My question is, do you, or anybody else for that matter, know why I can't do the same with the Arduino UART? Instead of using a software serial port, I would like to use the hardware UART that comes with the UNO (Rx and Tx) but I can´t seem to get it to work
Thanks in advance
Hi,
I also try to burn firmware on a copy of HM-10 (based on a CC2541), I have found how to flash the CC2541 using Arduino but don't find the original firmware of the HM10
Can you post the link to the article where it explain that the original firmware is not good ?
Thanks,
Hello,
I am trying to setup my HM-11 module using the code above. I have the AT command responding with an OK however whenever I try to get anything else working I don't get a response or I just receive null values. I tried sending AT+DEFAULT and AT+RESET to just restart the entire module back to factory settings, however there is still no proper response other than the nulls. I also tried resetting the baud rate to what I hoped was the default, however again there is no proper response. I tried ever baud setting within Realterm and nothing happens.
I was able to set up the device earlier viewing the MAC address and setting the mode to Master, however since then I'm out of luck regarding responses.
Thanks,
Hello,
For those who want the full firmware, I have found them, ask me by PM
So with the CCLoader and this full firmware it's possible to burn HM10 on any cc2541 board.
Hi!
It would be very very great if you can tell us where to find instructions to flash cc2541 via arduino.
For the HM-10 firmware I found it on the jnhuamao website.
Sincerely if you find a way to change fake cc41-into real HM-10 it would be awesome!
bye
Hi,
I will write a tutorial this day as many many user have the same problem.
For the HM-10 firmware I found it on the jnhuamao website.
This firmware is useless in your case, it is only usefull for UPGRADE a genuine HM-10, not for burn a new firmware
Thank you for your answer! I was going to make a big mistake I think
Can't wait for your tuto, if it works your gona be a star
I was wondering one thing: on the cc41a it lacks an external oscillator. Will it not be a pb for an HM-10 firmware?
On this post I saw that they had to change one variable (SET_32KHZ_OSC) to use an internal oscillator
https://e2e.ti.com/support/wireless_connectivity/bluetooth_low_energy/f/538/t/398466
What do you think about that?
The tuto is here How to flash genuine HM-10 firmware on CC2541 (make genuine HM-10 from CC41) - Networking, Protocols, and Devices - Arduino Forum
You are right concerning the missing oscillator, the problem is I haven't the original files of the firmware, just the compiled version, so it's not possible to change this parameter....
I will make some search to find if it's really significant or now with a HM-10 firmware.