I am trying to figure out how to capture the OK or the ERROR from a SIM800l.
I have tried
mySerial.println("AT");
while (mySerial.available() > 0 ) {
String str = mySerial.readString();
Serial.println(str);
if (str.equals("OK")) {
Serial.println("ok");
} else {
Serial.println("unknown");
}
}
But I always getting nothing back?