* added function to disable power save on the modem

This commit is contained in:
Dávid Danyi 2018-03-01 16:58:56 +01:00
parent 1584e835cb
commit b7f58c7551
2 changed files with 11 additions and 0 deletions

View File

@ -519,6 +519,8 @@ bool Sodaq_nbIOT::connectSocket()
return false;
}
powerSaveOff();
println(R"(AT+COPS=1,2,"21630")");
readResponse();
@ -530,6 +532,14 @@ bool Sodaq_nbIOT::connectSocket()
return waitForSignalQuality();
}
bool Sodaq_nbIOT::powerSaveOff() {
println(R"(AT+CEDRXS=0,5,"0101")");
readResponse();
println(R"(AT+CPSMS=0,,,"01000001","00000101")");
return readResponse() == ResponseOK;
}
bool Sodaq_nbIOT::reconnectSocket() {
println(R"(AT+COPS=1,2,"21630")");
readResponse();

View File

@ -48,6 +48,7 @@ class Sodaq_nbIOT: public Sodaq_AT_Device
bool isAlive();
// returns true if modem is registered on the network
bool isRegistered();
bool powerSaveOff();
bool reconnectSocket();
// Returns the default baud rate of the modem.