diff --git a/src/TinyGsmClientUBLOX.h b/src/TinyGsmClientUBLOX.h index a577094..aa72acc 100644 --- a/src/TinyGsmClientUBLOX.h +++ b/src/TinyGsmClientUBLOX.h @@ -369,7 +369,14 @@ public: if (!testAT()) { return false; } - sendAT(GF("+CFUN=16")); + if (!isCatM) + { + sendAT(GF("+CFUN=16")); + } + else + { + sendAT(GF("+CFUN=15")); + } if (waitResponse(10000L) != 1) { return false; } @@ -496,6 +503,24 @@ public: else return false; } + bool setURAT( uint8_t urat ) { + // AT+URAT=[,[,<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 */