diff --git a/Firmware/RTK_Everywhere/menuPP.ino b/Firmware/RTK_Everywhere/menuPP.ino index a41b871b0..d703cab62 100644 --- a/Firmware/RTK_Everywhere/menuPP.ino +++ b/Firmware/RTK_Everywhere/menuPP.ino @@ -221,6 +221,8 @@ bool pointperfectProvisionDevice() do { + provisionAttempt++; + char hardwareID[15]; snprintf(hardwareID, sizeof(hardwareID), "%02X%02X%02X%02X%02X%02X%02X", btMACAddress[0], btMACAddress[1], btMACAddress[2], btMACAddress[3], btMACAddress[4], btMACAddress[5], @@ -342,6 +344,7 @@ bool pointperfectProvisionDevice() landingPageUrl, hardwareID); displayAccountExpired(5000); + break; } else if (ztpResponse == ZTP_NOT_WHITELISTED) { @@ -362,6 +365,7 @@ bool pointperfectProvisionDevice() landingPageUrl, hardwareID); displayNotListed(5000); + break; } else if (ztpResponse == ZTP_ALREADY_REGISTERED) { @@ -373,11 +377,11 @@ bool pointperfectProvisionDevice() systemPrintf("This device is registered on a different profile. Please contact " "support@sparkfun.com for more assistance. Please reference device ID: %s\r\n", hardwareID); + break; } else if (ztpResponse == ZTP_RESPONSE_TIMEOUT) { // The WiFi failed to connect in a timely manner to the API. - provisionAttempt++; if (provisionAttempt < maxProvisionAttempts) systemPrintf("Provision server response timed out. Trying again.\r\n"); else @@ -386,7 +390,6 @@ bool pointperfectProvisionDevice() else { // Unknown error - provisionAttempt++; if (provisionAttempt < maxProvisionAttempts) systemPrintf("Unknown provisioning error. Trying again.\r\n"); else