|
@ -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) { |
|
|