Description
Perhaps just a personal issue, but I get wrong responses from setPin.
When I enter the correct pin it returns false and everything works fine. But when I enter the wrong pin it also returns false (and not true as you state in the description).
if ( (_readSerial(5000).indexOf("ER")) == -1)
{
return false;
}
else return true;
When I type the AT-Commands in by hand everything works fine. I hope that there is a solution. Thank you :-)
Here my code:
#include <Sim800L.h>
#include <SoftwareSerial.h>
#define RX 5
#define TX 4
Sim800L GSM(RX, TX);
void setup(){
pinMode(11, OUTPUT);
digitalWrite(11,HIGH); //turns on the Sim800L module
Serial.begin(9600);
GSM.begin(4800);
String pin = "4311";
delay(5000);
if (GSM.setPIN(pin)) Serial.println("Pin set");
else Serial.println("Pin NOT set");
}
void loop(){
}