Browse Source

Merge pull request #253 from ldab/master

fix CFUN restart on R4xxx and add +URAT options
v_master
Sara Damiano 6 years ago
committed by GitHub
parent
commit
fdd0279f70
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 1 deletions
  1. +26
    -1
      src/TinyGsmClientUBLOX.h

+ 26
- 1
src/TinyGsmClientUBLOX.h View File

@ -369,7 +369,14 @@ public:
if (!testAT()) { if (!testAT()) {
return false; return false;
} }
sendAT(GF("+CFUN=16"));
if (!isCatM)
{
sendAT(GF("+CFUN=16"));
}
else
{
sendAT(GF("+CFUN=15"));
}
if (waitResponse(10000L) != 1) { if (waitResponse(10000L) != 1) {
return false; return false;
} }
@ -496,6 +503,24 @@ public:
else return false; else return false;
} }
bool setURAT( uint8_t urat ) {
// AT+URAT=<SelectedAcT>[,<PreferredAct>[,<2ndPreferredAct>]]
sendAT(GF("+COPS=2")); // Deregister from network
if (waitResponse() != 1) {
return false;
}
sendAT(GF("+URAT="), urat); // Radio Access Technology (RAT) selection
if (waitResponse() != 1) {
return false;
}
sendAT(GF("+COPS=0")); // Auto-register to the network
if (waitResponse() != 1) {
return false;
}
return restart();
}
/* /*
* GPRS functions * GPRS functions
*/ */


Loading…
Cancel
Save