From 030da4943b21c64c621b120307d9aee20900b310 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 5 Dec 2019 11:28:15 -0600 Subject: Write the LoRa-EUI correctly for MTCDT3 Base-Board --- configure.in | 2 +- src/eeprom_main.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 69589bb..c1f2416 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT([src/eeprom_main.c]) -AM_INIT_AUTOMAKE([mts-id-eeprom], [0.4.6]) +AM_INIT_AUTOMAKE([mts-id-eeprom], [0.4.7]) AM_CONFIG_HEADER([config.h]) AC_PROG_CC diff --git a/src/eeprom_main.c b/src/eeprom_main.c index 27aede3..3204c33 100644 --- a/src/eeprom_main.c +++ b/src/eeprom_main.c @@ -1092,7 +1092,12 @@ int main(int argc, char *argv[]) { usage(stderr); exit(1); } - EEPROM_SETP(sp,lora_eui,value) + tmp = hwaddr_aton(value, sp->lora_eui, sizeof(sp->lora_eui)); + if (!tmp) { + log_error("invalid EUI %s for slot %d", value, slot_index); + usage(stderr); + exit(1); + } break; case SLOT_DEVICE_ID: if(slot_index == -1) { -- cgit v1.2.3