* added function to disable power save on the modem
This commit is contained in:
parent
1584e835cb
commit
b7f58c7551
@ -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();
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user