Merge branch 'v_master'
This commit is contained in:
@@ -372,7 +372,14 @@ public:
|
|||||||
if (!testAT()) {
|
if (!testAT()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!isCatM)
|
||||||
|
{
|
||||||
sendAT(GF("+CFUN=16"));
|
sendAT(GF("+CFUN=16"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sendAT(GF("+CFUN=15"));
|
||||||
|
}
|
||||||
if (waitResponse(10000L) != 1) {
|
if (waitResponse(10000L) != 1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -499,6 +506,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
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user