mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-11 00:23:43 +08:00
0e51ecbb7e
version: sunnypilot v2026.003.000 (dev)
date: 2026-09-09T15:43:49
master commit: b255314f5a
14 lines
608 B
C
14 lines
608 B
C
// this is where we manage the dongle ID assigned during our
|
|
// manufacturing. aside from this, there's a UID for the MCU
|
|
|
|
#define PROVISION_CHUNK_LEN 0x20
|
|
|
|
void get_provision_chunk(uint8_t *resp) {
|
|
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";
|
|
|
|
(void)memcpy(resp, (uint8_t *)PROVISION_CHUNK_ADDRESS, PROVISION_CHUNK_LEN);
|
|
if (memcmp(resp, unprovisioned_text, 0x20) == 0) {
|
|
(void)memcpy(resp, "unprovisioned\x00\x00\x00testing123\x00\x00\xa3\xa6\x99\xec", 0x20);
|
|
}
|
|
}
|