Skip to content

Commit 60b6b7d

Browse files
committed
L-Band: Always print the HTTP response error.
1 parent 5a41e7e commit 60b6b7d

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

Firmware/RTK_Surveyor/menuPP.ino

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ 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] - 2); // Get ready for JSON
241+
lbandMACAddress[2], lbandMACAddress[3], lbandMACAddress[4],
242+
lbandMACAddress[5]); // Get ready for JSON
242243

243244
#ifdef WHITELISTED_ID
244245
// Override ID with testing ID
@@ -317,6 +318,9 @@ bool pointperfectProvisionDevice()
317318

318319
if (httpResponseCode != 200)
319320
{
321+
systemPrintf("HTTP response error %d: ", httpResponseCode);
322+
systemPrintln(response);
323+
320324
// If a device has been deactivated, response will be: "HTTP response error 403: No plan for device
321325
// device:9f49e97f-e6a7-4a08-8d58-ac7ecdc90e23"
322326
if (response.indexOf("No plan for device") >= 0)
@@ -333,25 +337,22 @@ bool pointperfectProvisionDevice()
333337

334338
displayAccountExpired(5000);
335339
}
336-
//If a device is not whitelisted, reponse will be: "HTTP response error 403: Device hardware code not whitelisted"
340+
// If a device is not whitelisted, reponse will be: "HTTP response error 403: Device hardware code not
341+
// whitelisted"
337342
else if (response.indexOf("not whitelisted") >= 0)
338343
{
339344
char hardwareID[13];
340345
snprintf(hardwareID, sizeof(hardwareID), "%02X%02X%02X%02X%02X%02X", lbandMACAddress[0],
341346
lbandMACAddress[1], lbandMACAddress[2], lbandMACAddress[3], lbandMACAddress[4],
342347
lbandMACAddress[5]);
343348

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);
349+
systemPrintf(
350+
"This device is not white-listed. Please contact "
351+
"[email protected] to get your subscription activated. Please reference device ID: %s\r\n",
352+
hardwareID);
347353

348354
displayNotListed(5000);
349355
}
350-
else
351-
{
352-
systemPrintf("HTTP response error %d: ", httpResponseCode);
353-
systemPrintln(response);
354-
}
355356
break;
356357
}
357358
else

0 commit comments

Comments
 (0)