summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech/get-eeprom-device-config
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2018-04-18 17:52:03 -0500
committerJohn Klug <john.klug@multitech.com>2018-04-18 18:39:16 -0500
commit3c8466f555782592d33575ec835e335ea8db8def (patch)
tree236e6de80f06a0996c351fd36f3cf18cce8be285 /recipes-bsp/multitech/get-eeprom-device-config
parent3ba4e967bfd4ee137e19cde89d71349834a535d4 (diff)
downloadmeta-multitech-3c8466f555782592d33575ec835e335ea8db8def.tar.gz
meta-multitech-3c8466f555782592d33575ec835e335ea8db8def.tar.bz2
meta-multitech-3c8466f555782592d33575ec835e335ea8db8def.zip
Change get-eeprom-device-config for no radio case
Diffstat (limited to 'recipes-bsp/multitech/get-eeprom-device-config')
-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"