mirror of
https://github.com/vshymanskyy/TinyGSM.git
synced 2026-05-15 04:06:10 +00:00
Merge pull request #1 from Gelemikke/network-system-mode-sim7600
add getNetworkSystemMode() for SIM7600
This commit is contained in:
@@ -291,6 +291,17 @@ class TinyGsmSim7600 : public TinyGsmModem<TinyGsmSim7600>,
|
||||
return waitResponse() == 1;
|
||||
}
|
||||
|
||||
bool getNetworkSystemMode(bool& n, int16_t& stat) {
|
||||
// n: whether to automatically report the system mode info
|
||||
// stat: the current service. 0 if it not connected
|
||||
sendAT(GF("+CNSMOD?"));
|
||||
if (waitResponse(GF(GSM_NL "+CNSMOD:")) != 1) { return false; }
|
||||
n = streamGetIntBefore(',') != 0;
|
||||
stat = streamGetIntBefore('\n');
|
||||
waitResponse();
|
||||
return true;
|
||||
}
|
||||
|
||||
String getLocalIPImpl() {
|
||||
sendAT(GF("+IPADDR")); // Inquire Socket PDP address
|
||||
// sendAT(GF("+CGPADDR=1")); // Show PDP address
|
||||
|
||||
Reference in New Issue
Block a user