Closed trlafleur closed 6 years ago
Thanks for reminding me about this. I'll update the sample apps.
This might of interest you.... It swaps byte to allow pasting of keys direct from TTN
// ** // Function to do a byte swap in a byte array void RevBytes(unsigned char* b, size_t c) { u1_t i; for (i = 0; i < c / 2; i++) { unsigned char t = b[i]; b[i] = b[c - 1 - i]; b[c - 1 - i] = t; } }
/*
/ // provide device ID (8 bytes, LSBF) void os_getDevEui (u1_t buf) { memcpy(buf, DEVEUI, 8); RevBytes(buf, 8); // TTN requires it in LSB First order, so lets swap byte's }
/*
/ // provide application router ID (APPEUI) (8 bytes, LSBF) void os_getArtEui (u1_t buf) { memcpy(buf, APPEUI, 8); RevBytes(buf, 8); // TTN requires it in LSB First order, so lets swap byte's }
~~ /) ~~~~ /) ~~ _/) ~~ _/) ~~
Tom Lafleur
On Fri, Jun 29, 2018 at 4:21 PM, Terry Moore notifications@github.com wrote:
Thanks for reminding me about this. I'll update the sample apps.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mcci-catena/arduino-lmic/issues/80#issuecomment-401497077, or mute the thread https://github.com/notifications/unsubscribe-auth/AEXCK_7jnkAbPeGy7W9T7yK3j_B-t5O8ks5uBraVgaJpZM4U9nvd .
This is missing from your event handler in the ttn-otaa.ino example (maybe others)
Its now caught as an Unknown event