Skip to content

Commit 9f8a951

Browse files
committed
L-Band: Display not listed if whitelist error is seen.
1 parent 04b5a2b commit 9f8a951

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

Firmware/RTK_Surveyor/Display.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1893,6 +1893,11 @@ void displayAccountExpired(uint16_t displayTime)
18931893
displayMessage("Account Expired", displayTime);
18941894
}
18951895

1896+
void displayNotListed(uint16_t displayTime)
1897+
{
1898+
displayMessage("Not Listed", displayTime);
1899+
}
1900+
18961901
void displayRoverStart(uint16_t displayTime)
18971902
{
18981903
if (online.display == true)

Firmware/RTK_Surveyor/menuPP.ino

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ bool pointperfectProvisionDevice()
238238

239239
char hardwareID[13];
240240
snprintf(hardwareID, sizeof(hardwareID), "%02X%02X%02X%02X%02X%02X", lbandMACAddress[0], lbandMACAddress[1],
241-
lbandMACAddress[2], lbandMACAddress[3], lbandMACAddress[4], lbandMACAddress[5]); // Get ready for JSON
241+
lbandMACAddress[2], lbandMACAddress[3], lbandMACAddress[4], lbandMACAddress[5] - 2); // Get ready for JSON
242242

243243
#ifdef WHITELISTED_ID
244244
// Override ID with testing ID
@@ -326,13 +326,27 @@ bool pointperfectProvisionDevice()
326326
lbandMACAddress[1], lbandMACAddress[2], lbandMACAddress[3], lbandMACAddress[4],
327327
lbandMACAddress[5]);
328328

329-
systemPrintf("This device's L-Band subscription has lapsed or is not white-listed. Please contact "
329+
systemPrintf("This device has been deactivated. Please contact "
330330
"[email protected] to renew the L-Band "
331331
"subscription. Please reference device ID: %s\r\n",
332332
hardwareID);
333333

334334
displayAccountExpired(5000);
335335
}
336+
//If a device is not whitelisted, reponse will be: "HTTP response error 403: Device hardware code not whitelisted"
337+
else if (response.indexOf("not whitelisted") >= 0)
338+
{
339+
char hardwareID[13];
340+
snprintf(hardwareID, sizeof(hardwareID), "%02X%02X%02X%02X%02X%02X", lbandMACAddress[0],
341+
lbandMACAddress[1], lbandMACAddress[2], lbandMACAddress[3], lbandMACAddress[4],
342+
lbandMACAddress[5]);
343+
344+
systemPrintf("This device is not white-listed. Please contact "
345+
"[email protected] to get your subscription activated. Please reference device ID: %s\r\n",
346+
hardwareID);
347+
348+
displayNotListed(5000);
349+
}
336350
else
337351
{
338352
systemPrintf("HTTP response error %d: ", httpResponseCode);

0 commit comments

Comments
 (0)