@@ -238,7 +238,7 @@ bool pointperfectProvisionDevice()
238
238
239
239
char hardwareID[13 ];
240
240
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
242
242
243
243
#ifdef WHITELISTED_ID
244
244
// Override ID with testing ID
@@ -326,13 +326,27 @@ bool pointperfectProvisionDevice()
326
326
lbandMACAddress[1 ], lbandMACAddress[2 ], lbandMACAddress[3 ], lbandMACAddress[4 ],
327
327
lbandMACAddress[5 ]);
328
328
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 "
330
330
" [email protected] to renew the L-Band "
331
331
" subscription. Please reference device ID: %s\r\n " ,
332
332
hardwareID);
333
333
334
334
displayAccountExpired (5000 );
335
335
}
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
+ }
336
350
else
337
351
{
338
352
systemPrintf (" HTTP response error %d: " , httpResponseCode);
0 commit comments