2023-01-16 12:13:26 +08:00
|
|
|
// this is where we manage the dongle ID assigned during our
|
|
|
|
// manufacturing. aside from this, there's a UID for the MCU
|
|
|
|
|
2017-07-30 23:26:48 +08:00
|
|
|
#define PROVISION_CHUNK_LEN 0x20
|
|
|
|
|
2024-05-28 12:21:13 +08:00
|
|
|
const unsigned char unprovisioned_text[] = "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff";
|
2024-01-19 06:10:17 +08:00
|
|
|
|
2017-07-30 23:49:53 +08:00
|
|
|
void get_provision_chunk(uint8_t *resp) {
|
2021-07-03 09:25:35 +08:00
|
|
|
(void)memcpy(resp, (uint8_t *)PROVISION_CHUNK_ADDRESS, PROVISION_CHUNK_LEN);
|
2024-01-19 06:10:17 +08:00
|
|
|
if (memcmp(resp, unprovisioned_text, 0x20) == 0) {
|
2019-07-04 07:01:01 +08:00
|
|
|
(void)memcpy(resp, "unprovisioned\x00\x00\x00testing123\x00\x00\xa3\xa6\x99\xec", 0x20);
|
2017-07-30 23:26:48 +08:00
|
|
|
}
|
|
|
|
}
|