summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech/get-eeprom-device-config/get-eeprom-device-config.sh
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/multitech/get-eeprom-device-config/get-eeprom-device-config.sh')
-rwxr-xr-xrecipes-bsp/multitech/get-eeprom-device-config/get-eeprom-device-config.sh31
1 files changed, 18 insertions, 13 deletions
diff --git a/recipes-bsp/multitech/get-eeprom-device-config/get-eeprom-device-config.sh b/recipes-bsp/multitech/get-eeprom-device-config/get-eeprom-device-config.sh
index 02754a6..b6d9e5f 100755
--- a/recipes-bsp/multitech/get-eeprom-device-config/get-eeprom-device-config.sh
+++ b/recipes-bsp/multitech/get-eeprom-device-config/get-eeprom-device-config.sh
@@ -195,19 +195,24 @@ fi
done <${CONFIG_PATH}/device_info
-echo "Finding cellular module..."
-for ((i=0; i < TRY_COUNT; i++))
- do
- # Check cellular module
- echo "Try #"$i
- if [[ -L "/dev/modem_at0" && -L "/dev/modem_at1" ]]; then
- CAPABILITY_CELL="true"
- break
- fi
- if ((TRY_COUNT > 1)) ; then
- sleep 0.5
- fi
- done
+PRODUCTID=$(cat /sys/devices/platform/mts-io/product-id)
+# No modem if first hyphen in product-ID is followed by
+# a numeric. Modems always start with an alpha.
+if ((${#PRODUCTID})) && [[ $PRODUCTID =~ ^[^-]+-[^0-9] ]] ; then
+ echo "Finding cellular module..."
+ for ((i=0; i < TRY_COUNT; i++))
+ do
+ # Check cellular module
+ echo "Try #"$i
+ if [[ -L "/dev/modem_at0" && -L "/dev/modem_at1" ]]; then
+ CAPABILITY_CELL="true"
+ break
+ fi
+ if ((TRY_COUNT > 1)) ; then
+ sleep 0.5
+ fi
+ done
+fi
if isNativeLoraPresent; then
CAPABILITY_LORA="true"