Connecting two HM-10 BLE modules together manually by AT+CON[slave mac] command

Hi guys, I am trying to connect two Nano Arduinos together by HM-10 Bluetooth BLE Modules,

(Master and Slave HM-10 BLE modules are connected to different Nano Arduinos)

I could connect them in the Automatic mode;
when “AT+IMME0” and “AT+ROLE1” for the Master,
and “AT+IMME0” and “AT+ROLE0” for the Slave.

But when I make it manual, I am not able to connect them by “AT+CONxxxxxxxxxxxx”,
which is written in the master code to connect to a specific slave mac address “xxxxxxxxxxxx”.

Actually, I could connect them by using “AT+START”, but by using this command I am not able to specify the mac of the wanted slave to connect, so it could be connected to another one (if there was in the area!!).

How can I solve this problem !!
My HM-10 BLEs version is “HMSoft V609”

My codes are below:

Master Code:

#include <SoftwareSerial.h>

#define Serial_Baud 9600
#define HM10_Baud 9600

#define RX 2
#define TX 3
SoftwareSerial HM10(RX, TX); //2, 3

char c = ' ';
boolean NL = true;

void setup()
{
  Serial.begin(Serial_Baud);
  Serial.println("Master Bluetooth");
  Serial.println(" ");
  
  HM10.begin(HM10_Baud);
}

void loop()
{
  if (HM10.available()) {
    c = HM10.read();
    Serial.write(c);
  }

  if (Serial.available()) {
    c = Serial.read();

    // Do not send line end characters to the HM-10
    if (c != 10 && c != 13) {
      HM10.write(c);
    }

    // If there is a new line print the ">" character.
    if (NL) {
      Serial.print("\r\n>");
      NL = false;
    }

    // Echo the user input to the main window.
    Serial.write(c);
    if (c == 10)  {
      NL = true;
    }
  }
}

Slave Code:

#include <SoftwareSerial.h>

#define Serial_Baud 9600
#define HM10_Baud 9600

#define RX 2
#define TX 3
SoftwareSerial HM10(RX, TX); //2, 3

void setup()
{
  Serial.begin(Serial_Baud);
  Serial.println("Slave Bluetooth");
  
  HM10.begin(HM10_Baud);
}

void loop()
{
  if (HM10.available()) {
    Serial.write(HM10.read());
  }

  if (Serial.available()) {
    HM10.write(Serial.read());
  }
}

My Problem has been solved.

I have upgraded the version of “HM-10” firmware from “v609” to “v707”

by flashing it by the programs bellow (in the attachments) using FTDI module.

Muhammed Genco

HMSoft-10-2541-V707.zip (778 KB)