@@ -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 " support@sparkfun.com 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+ " support@sparkfun.com 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