13
SIM800L.cpp
13
SIM800L.cpp
@@ -45,6 +45,9 @@ const char AT_CMD_CFUN0[] PROGMEM = "AT+CFUN=0"; //
|
||||
const char AT_CMD_CFUN1[] PROGMEM = "AT+CFUN=1"; // Switch normal power mode
|
||||
const char AT_CMD_CFUN4[] PROGMEM = "AT+CFUN=4"; // Switch sleep power mode
|
||||
|
||||
const char AC_CMD_CSCLK0[] PROGMEM = "AT+CSCLK=0"; // AT+CSCLK=0 command
|
||||
const char AC_CMD_CSCLK2[] PROGMEM = "AT+CSCLK=2"; // AT+CSCLK=2 command
|
||||
|
||||
const char AT_CMD_CREG_TEST[] PROGMEM = "AT+CREG?"; // Check the network registration status
|
||||
const char AT_CMD_SAPBR_GPRS[] PROGMEM = "AT+SAPBR=3,1,\"Contype\",\"GPRS\""; // Configure the GPRS bearer
|
||||
const char AT_CMD_SAPBR_APN[] PROGMEM = "AT+SAPBR=3,1,\"APN\","; // Configure the APN for the GPRS
|
||||
@@ -721,6 +724,16 @@ bool SIM800L::setPowerMode(PowerMode powerMode) {
|
||||
return currentPowerMode == powerMode;
|
||||
}
|
||||
|
||||
void SIM800L::exitSleepMode() {
|
||||
sendCommand_P(AC_CMD_CSCLK0);
|
||||
purgeSerial();
|
||||
}
|
||||
|
||||
void SIM800L::enterSleepMode() {
|
||||
sendCommand_P(AC_CMD_CSCLK2);
|
||||
purgeSerial();
|
||||
}
|
||||
|
||||
/**
|
||||
* Status function: Check the strengh of the signal
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user