HM-10 bricked? odd characters in serial monitor

I am learning about Bluetooth and attempting to use AT+ commands to configure an HM-10 module on Arduino Mega.

Here is the code:

void setup(){
  Serial.begin(9600);
  
  Serial1.begin(9600); // default baud rate

  pinMode(LED_BUILTIN,OUTPUT);
  
  delay(250);
  
  Serial.println("AT commands: ");

  delay(250);
      
}

void loop(){
  //read from the HM-10 and print in the Serial
  if(Serial1.available())
    Serial.write(Serial1.read());
   
  //read from the Serial and print to the HM-10
  if(Serial.available())
    Serial1.write(Serial.read());


//use AT+LADDR to read address

}

Here is the result of a module brand new out of the box that works with AT+HELP:

* -----------------------------------------------------------------*
* Note: (M) = The command support master mode only. 	           *
********************************************************************
* 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+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+INQ              Search slave model                           *
* AT+SHOW             Show the searched slave model.               *
* AT+CONN             Connect the index slave model.               *
* AT+IMME             System wait for command when power on.	   *
* AT+START            System start working.			   *
* AT+UUID             Get/Set system SERVER_UUID .            	   *
* AT+CHAR             Get/Set system CHAR_UUID .            	   *
* -----------------------------------------------------------------*
* Note: (M) = The command support master mode only. 	           *

Here is the result of a second module, same supplier, same wiring, that fails when entering AT+HELP after trying to change its baud rate:

f⸮⸮⸮⸮⸮怘⸮

What is wrong with the failed module? The odd characters tell me it's a baud rate issue, but supposedly AT+ mode is locked in at 9600 baud.

EDIT: I was able to replicate this error by entering AT+BAUD3, which bricked the originally working module into behaving the same way. Now both modules don't work.

The garbled characters suggest that the module Baud rate is not the same as the serial monitor Baud rate.

Solution: change the serial monitor Baud rate to match.

Hint: when asking about a particular module, always post links to the product page and data sheet or user manual for that module.

jremington:
The garbled characters suggest that the module Baud rate is not the same as the serial monitor Baud rate.

Solution: change the serial monitor Baud rate to match.

Hint: when asking about a particular module, always post links to the product page and data sheet or user manual for that module.

Thank you.
I have tried every available serial monitor baud rate along with changing both the baud rates on Serial and Serial1 to match. I cannot receive any readable characters.
This is the transceiver module used:
https://www.amazon.com/KOOBOOK-Bluetooth-Transceiver-Module-MLT-BT05/dp/B07T8GQ1W6/ref=sr_1_14?dchild=1&keywords=HM-10&qid=1617489791&s=electronics&sr=1-14

Post link to the user manual or data sheet for that particular module. There may be a way to do a factory reset.

Free returns on Amazon.

jremington:
Post link to the user manual or data sheet for that particular module. There may be a way to do a factory reset.

Free returns on Amazon.

User manual: seems to be the standard HM-10 clone. No manual to be found, I used the HM-10 standard manual.
Troubleshooting attempted: hardware reset with shorting PIO 0 pin to GND per suggestion: https://www.electronicspoint.com/forums/threads/reset-to-factory-settings-for-hm-10.276733/
This has no effect. seems to be a total loss.

xyz_summer:
seems to be a total loss.

You have some sort of communication, so this is probably not true.

AT+RESET or AT+RENEW might fix things. i don't know what the differences are - if any.

There is never any point in fartarsing about with baud rates. Arduino only talks to Bluetooth at the rate Bluetooth is configured for, and only to monitor at the rate you have commanded, to which the monitor must match. No exceptions.

seems to be the standard HM-10 clone.

In other words, you have no idea.

When you buy cheap undocumented junk, you get what you pay for. No exceptions.

Curious about this, I see that AT+RENEW resets to factory spec. RESET is for reboot! I understand this applies to all BLE devices, so this should work for you. Supplier also clearly specifies that this is a CC2541 version. This means it is an HM-10 with a reduced instruction set. It is in effect little more than an HC-05, and I bet intended as that for those with IOS. I believe it is the most common BLE device around, and the problem should be fixable. I do hope you have been successful in using this before you started with AT mode.

Nick_Pyner:
Curious about this, I see that AT+RENEW resets to factory spec. RESET is for reboot! I understand this applies to all BLE devices, so this should work for you. Supplier also clearly specifies that this is a CC2541 version. This means it is an HM-10 with a reduced instruction set. It is in effect little more than an HC-05, and I bet intended as that for those with IOS. I believe it is the most common BLE device around, and the problem should be fixable. I do hope you have been successful in using this before you started with AT mode.

I tried AT+RENEW. The same problem occurs. Must be some other problem.

Did it respond with OK?

Nick_Pyner:
Did it respond with OK?

It responded with some gibberish, not OK.

OK, I submit it is just as likely that the problem lies with Arduino code, or serial monitor configuration, and Bluetooth is 100% kosher.

I don't have very much experience with BLE configuration but you might check the Martyn Currey website.

The module linked in reply #2 is NOT an HM-10.

The Amazon page states the module to be AT-09 (whatever that means), and claims it to be "very similar" and "compatible" with HM-10. Since it appears to be otherwise undocumented, you may be out of luck.

However, if you can find someone with an oscilloscope, determining the current serial Baud rate is trivial.

Martin Currey's site has this to say:

Fakes

There are lots of comments on the internet about fake HM-10s and even Jinan Huamao includes information in the data sheets. I do not see the non-HM-10s as fakes, I see them as similar devices with different firmware. To me if they were fakes they would copy the firmware.
I think a lot of the problem comes from how the non-HM-10s are sold, especially on places like ebay and aliexpress. You will often see modules sold as HM-10s when they are in fact not. One of the easiest ways to spot the non-HM-10s was the lack of a crystal, unfortunately you can now buy actual HM-10s without the crystal so the confusion is likely to get worse.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.