HM-10 (MLT-BT05) 4.0 Bluetooth problem

Hi everybody!

I have a HM-10 (MLT-BT05) Bluetooth low energy connected to Arduino Mega. HM-10 has state pin always high but it’s not connected with any device.
I don’t know so much about AT command but i think is in Master mode (AT-ROLE1). The problem is i don’t know how reset the module. I am reading the following documentation: MLT-BT05 .

I run above code and i write AT in Monitor Serial but nothing happen. The monitor serial is configured with ‘Both NL & CR’ and 9600 baud.

#include "Arduino.h"
#include <SoftwareSerial.h>

SoftwareSerial ble(15, 14); // RX, TX

void setup()
{
  Serial.begin(9600);
  ble.begin(9600);
  Serial.println("AT commands: ");
}

void loop()
{
  if (Serial.available() > 0)
  {
    ble.write(Serial.read());
  }
  if (ble.available() > 0)
  {
    Serial.write(ble.read());
  }
}

Any ideas? Thanks a lot!

Photo1 is not very informative. Are you sure this is an HM-10?

You have the Module connected to hardware serial and yet programme it with software serial, which is fatal. Since you have four (4) hardware serial ports, using software serial is exceptionally dumb on a Mega, even if you used appropriate pins.

If you get rid of all reference to software serial and use Serial3 commands, as already connected, instead of ble., you might get a result.

It is good practice to use a 1k/2k voltage divider in the Arduino Tx line

Yes, i’m sure is a HM-10 model MLT-BT05. I added two photos more.

I modified code and it looks like:

#include "Arduino.h"

void setup()
{
  Serial.begin(9600);
  Serial3.begin(9600);
}

void loop()
{
  while (Serial.available())
  {
    Serial3.write(Serial.read());
  }
  while (Serial3.available())
  {
    Serial.write(Serial3.read());
  }
}

You were right, SoftwareSerial is not necessary. But i still have the problem. I can not get response from Arduino with AT commands.

Thanks for your replay!.

It probably isn't the cause of your problem, but the Arduino.h library is surely redundant. I don't even know what it is.

You might find the following background notes useful.

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino

The guide has notes on configuration of HC-06 on Mega in the appendix, which I believe is the same. The rest is not particularly pertinent.

Also note this