Skip to content

Commit a5967e2

Browse files
committed
Fix #420: hard-code testing keys (slim AVR)
1 parent 5a76de9 commit a5967e2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/compliance-otaa-halconfig/compliance-otaa-halconfig.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ Author:
2929

3030
// This EUI must be in little-endian format, so least-significant-byte
3131
// first. This corresponds to 0x0000000000000001
32-
static const u1_t PROGMEM APPEUI[8]= { 1, 0, 0, 0, 0, 0, 0, 0 };
33-
void os_getArtEui (u1_t* buf) { memcpy_P(buf, APPEUI, 8);}
32+
// static const u1_t PROGMEM APPEUI[8]= { 1, 0, 0, 0, 0, 0, 0, 0 };
33+
void os_getArtEui (u1_t* buf) { memset(buf, 0, 8); buf[0] = 1; }
3434

3535
// This should also be in little endian format, see above.
3636
// This corresponds to 0x0000000000000001
37-
static const u1_t PROGMEM DEVEUI[8]= { 1, 0, 0, 0, 0, 0, 0, 0 };
38-
void os_getDevEui (u1_t* buf) { memcpy_P(buf, DEVEUI, 8);}
37+
// static const u1_t PROGMEM DEVEUI[8]= { 1, 0, 0, 0, 0, 0, 0, 0 };
38+
void os_getDevEui (u1_t* buf) { memset(buf, 0, 8); buf[0] = 1; }
3939

4040
// This key should be in big endian format (or, since it is not really a
4141
// number but a block of memory, endianness does not really apply).
42-
static const u1_t PROGMEM APPKEY[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 };
43-
void os_getDevKey (u1_t* buf) { memcpy_P(buf, APPKEY, 16);}
42+
// static const u1_t PROGMEM APPKEY[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 };
43+
void os_getDevKey (u1_t* buf) { memset(buf, 0, 16); buf[15] = 2; }
4444

4545
// this data must be kept short -- max is 11 bytes for US DR0
4646
static uint8_t mydata[] = { 0xCA, 0xFE, 0xF0, 0x0D };

0 commit comments

Comments
 (0)