summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2019-12-05 11:28:15 -0600
committerJohn Klug <john.klug@multitech.com>2019-12-05 11:28:15 -0600
commit030da4943b21c64c621b120307d9aee20900b310 (patch)
tree98b01ad019db9ca2441aaa9c81b1f3bc011bd2bc
parent51e87acd844279219c29aa51c02b956e361b6220 (diff)
downloadmts-id-eeprom-030da4943b21c64c621b120307d9aee20900b310.tar.gz
mts-id-eeprom-030da4943b21c64c621b120307d9aee20900b310.tar.bz2
mts-id-eeprom-030da4943b21c64c621b120307d9aee20900b310.zip
Write the LoRa-EUI correctly for MTCDT3 Base-Board
-rw-r--r--configure.in2
-rw-r--r--src/eeprom_main.c7
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) {