summaryrefslogtreecommitdiff
path: root/io-module/mts_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io-module/mts_io.c')
-rw-r--r--io-module/mts_io.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index 7e3d1f0..0b22592 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -47,7 +47,7 @@
#include "mts_io.h"
-#define DRIVER_VERSION "v1.4.1"
+#define DRIVER_VERSION "v1.4.2"
#define DRIVER_AUTHOR "James Maki <jmaki@multitech.com>"
#define DRIVER_DESC "MTS-IO Controller"
#define DRIVER_NAME "mts-io"
@@ -599,7 +599,18 @@ static ssize_t mts_attr_show_product_info(struct device *dev,
id_eeprom.mac_addr[3],
id_eeprom.mac_addr[4],
id_eeprom.mac_addr[5]);
- } else {
+ } else if (strcmp(attr->attr.name, "lora-eui") == 0) {
+ value = sprintf(buf, "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n",
+ id_eeprom.lora_eui[0],
+ id_eeprom.lora_eui[1],
+ id_eeprom.lora_eui[2],
+ id_eeprom.lora_eui[3],
+ id_eeprom.lora_eui[4],
+ id_eeprom.lora_eui[5],
+ id_eeprom.lora_eui[6],
+ id_eeprom.lora_eui[7]);
+ }
+ else {
log_error("attribute '%s' not found", attr->attr.name);
value = -1;
}
@@ -866,6 +877,18 @@ static int mts_id_eeprom_load()
}
log_info("uuid: %s", (char*)buf);
+ if (mts_hw_version == MTP_0_0) {
+ log_info("lora-eui: %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
+ id_eeprom.lora_eui[0],
+ id_eeprom.lora_eui[1],
+ id_eeprom.lora_eui[2],
+ id_eeprom.lora_eui[3],
+ id_eeprom.lora_eui[4],
+ id_eeprom.lora_eui[5],
+ id_eeprom.lora_eui[6],
+ id_eeprom.lora_eui[7]);
+ }
+
return 0;
}