Hi,
I’m trying to connect arduino to my phone with HM-10, when HM-10 initiates the connection.
However, in both cases when I try to connect (giving a mac address and just connecting to last connected device) I get an error (OK+CONNE and OK+CONNA without connection notification).
Here’s my code:
#include <SoftwareSerial.h>
SoftwareSerial bluetooth(8,9);
void setup() {
Serial.begin(115200);
Serial.setTimeout(50);
bluetooth.begin(115200); //open BLE connection
bluetooth.setTimeout(50); //set timeout
bluetooth.write("AT+ROLE1");
delay(50);
bluetooth.write("AT+NOTI1");
delay(50);
bluetooth.write("AT+CONC40BCB403020");
delay(50);
bluetooth.write("AT+CONNL");
}
void loop() {
while (bluetooth.available() > 0) {
String response = bluetooth.readString();
Serial.println(response);
}
}
The response that I get is usually:
Example:
OK+Set:1
OK+Set:1
OK+CONNE
OK+CONNN
By the way CONNN is not even documented in the datasheet.