summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2019-11-25 09:06:30 -0600
committerJohn Klug <john.klug@multitech.com>2019-11-25 09:06:30 -0600
commita32e476a3f4ca8605ce1013288dab90f8e89cff7 (patch)
tree5fd14da542a76d0b588e67f8e56db698d52040cb
parenteb3b20bf2faf4db51ca769039db3c952333b919a (diff)
downloadmts-io-4.2.1.tar.gz
mts-io-4.2.1.tar.bz2
mts-io-4.2.1.zip
Remove default mtcdt-0.0 hardware version which does not work on mtcdt34.2.1
-rw-r--r--configure.ac2
-rw-r--r--io-module/mts-io.c41
-rw-r--r--io-module/mts_io_module.h2
3 files changed, 21 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac
index ca6635a..b889065 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([mts-io], [4.2.0])
+AC_INIT([mts-io], [4.2.1])
AC_CONFIG_SRCDIR([util/mts_util_lora2_reset.c])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER([config.h])
diff --git a/io-module/mts-io.c b/io-module/mts-io.c
index 63d695b..7078708 100644
--- a/io-module/mts-io.c
+++ b/io-module/mts-io.c
@@ -834,29 +834,26 @@ mts_id_eeprom_load(void)
set_buttons(default_buttons);
mts_hw_version = MTCPM_0_0;
log_info("detected board %s", HW_VERSION_MTCPM_0_0);
- } else {
- if(noradio) {
- struct attribute **ap = mtcdt_platform_attribute_group.attrs;
- while(1) {
- if(ap[j] == NULL) {
- log_info("Did not find radio power attribute. Possible driver fault.");
- break;
- }
- j++;
- if (is_radio_power_attr_mtcdt(ap[j])) {
- log_info("Pruning radio feature from mts-io",j);
- ap[j] = NULL;
- break;
- }
- }
- }
+ } else {
+ int i;
- attr_group = &mtcdt_platform_attribute_group;
- gpio_pins = gpio_pins_mtcdt_0_0;
- mts_hw_version = MTCDT_0_0;
- set_buttons(default_buttons);
- log_info("detected board %s", HW_VERSION_MTCDT_0_0);
- }
+ for(i=0;i<sizeof id_eeprom.hw_version;i++) {
+ if(! id_eeprom.hw_version[i])
+ /* Found NULL so done */
+ break;
+ if(! isprint(id_eeprom.hw_version[i]))
+ break;
+ }
+ log_alert("Unsupported EEPROM settings or device");
+
+ if(i)
+ log_alert("Found unsupported EEPROM HW_VERSION: %.*s",i,id_eeprom.hw_version);
+ log_alert("Check log for HW_VERSION dump");
+
+ print_hex_dump_bytes("HW_VERSION: ", DUMP_PREFIX_OFFSET, id_eeprom.hw_version, sizeof id_eeprom.hw_version);
+
+ return -ENODEV;
+ }
log_info("sizeof: %lu", (unsigned long) sizeof(struct mts_id_eeprom_layout));
log_info("vendor-id: %.32s", id_eeprom.vendor_id);
diff --git a/io-module/mts_io_module.h b/io-module/mts_io_module.h
index 4bcf31d..28e9e58 100644
--- a/io-module/mts_io_module.h
+++ b/io-module/mts_io_module.h
@@ -5,7 +5,7 @@
* MTAC cards.
*/
-#define DRIVER_VERSION "v4.2.0"
+#define DRIVER_VERSION "v4.2.1"
#define DRIVER_AUTHOR "Multitech Systems"
#define DRIVER_DESC "MTS-IO Controller"
#define DRIVER_NAME "mts-io"