summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2019-10-07 14:30:29 -0500
committerJohn Klug <john.klug@multitech.com>2019-10-07 14:30:29 -0500
commita657a85786efc70f8225010102014031b379afc8 (patch)
treed9d4942dcaf05d8b509a92fe0522464fd2ed98f3
parent56b06021bac03a1ab8a2b280e6493261aa138b6b (diff)
downloadmts-id-eeprom-a657a85786efc70f8225010102014031b379afc8.tar.gz
mts-id-eeprom-a657a85786efc70f8225010102014031b379afc8.tar.bz2
mts-id-eeprom-a657a85786efc70f8225010102014031b379afc8.zip
Fix up the printing of the MTCDT3B base board EEPROM and bump the revision0.4.1
-rw-r--r--configure.in2
-rw-r--r--src/eeprom_main.c16
2 files changed, 13 insertions, 5 deletions
diff --git a/configure.in b/configure.in
index 22b7f6d..2309648 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.0])
+AM_INIT_AUTOMAKE([mts-id-eeprom], [0.4.1])
AM_CONFIG_HEADER([config.h])
AC_PROG_CC
diff --git a/src/eeprom_main.c b/src/eeprom_main.c
index 61c6b8c..8b398c0 100644
--- a/src/eeprom_main.c
+++ b/src/eeprom_main.c
@@ -428,7 +428,7 @@ static void mtcdt3b_eeprom_inspect(struct mtcdt3b_eeprom_layout *mtcdt3b_eeprom)
log_info("device-id: %.32s", mtcdt3b_eeprom->device_id);
log_info("hw-version: %.32s", mtcdt3b_eeprom->hw_version);
log_info("mtcdt3b-capa-lora: %s", DEVICE_CAPA(mtcdt3b_eeprom->capa, MTCDT3B_CAPA_LORA) ? "yes" : "no");
- log_info("eui: %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
+ log_info("lora-eui: %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
mtcdt3b_eeprom->lora_eui[0],
mtcdt3b_eeprom->lora_eui[1],
mtcdt3b_eeprom->lora_eui[2],
@@ -577,7 +577,6 @@ int main(int argc, char *argv[]) {
char *vendor_id = NULL;
char *product_id = NULL;
char *device_id = NULL;
- char *uuid = NULL;
char *hw_version = NULL;
char *mac_addr = NULL;
char *lora_eui = NULL;
@@ -636,7 +635,11 @@ int main(int argc, char *argv[]) {
if (accessory_card) {
tmp = read(fd, (char *) &ap_eeprom, eeprom_size);
- } else {
+#ifdef MTCDT3B
+ } else if (base_board) {
+ tmp = read(fd, (char *) &mtcdt3b_eeprom, eeprom_size);
+#endif
+ } else {
tmp = read(fd, (char *) &id_eeprom, eeprom_size);
}
@@ -651,7 +654,12 @@ int main(int argc, char *argv[]) {
if (accessory_card) {
log_info("loaded ap eeprom from %s successfully", in_file);
mts_ap_eeprom_inspect(&ap_eeprom);
- } else {
+#ifdef MTCDT3B
+ } else if (base_board) {
+ log_info("loaded ap eeprom from %s successfully", in_file);
+ mtcdt3b_eeprom_inspect(&mtcdt3b_eeprom);
+#endif
+ } else {
log_info("loaded id eeprom from %s successfully", in_file);
mts_id_eeprom_inspect(&id_eeprom);
}