Set CFUN in Sequans init - else fails

Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
This commit is contained in:
Sara Damiano
2020-01-24 11:41:24 -05:00
parent 6a60e3be76
commit 033092f8fe

View File

@@ -210,6 +210,13 @@ public:
DBG(GF("### Modem:"), getModemName()); DBG(GF("### Modem:"), getModemName());
// Make sure the module is enabled. Unlike others, the VZN20Q powers on
// with CFUN=0 not CFUN=1 (that is, at minimum functionality instead of full functionality
// The module cannot even detect the sim card if the cellular functionality is disabled so
// unless we explicitly enable the functionality the init will fail.
sendAT(GF("+CFUN=1")); // turn off error codes
waitResponse();
int ret = getSimStatus(); int ret = getSimStatus();
// if the sim isn't ready and a pin has been provided, try to unlock the sim // if the sim isn't ready and a pin has been provided, try to unlock the sim
if (ret != SIM_READY && pin != NULL && strlen(pin) > 0) { if (ret != SIM_READY && pin != NULL && strlen(pin) > 0) {