summaryrefslogtreecommitdiff
path: root/recipes-core/mlinux-scripts
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2017-08-31 12:21:47 -0500
committerJohn Klug <john.klug@multitech.com>2017-09-14 17:33:24 -0500
commitbf884446f0421e1cfb352c5b3d2dc82f0547a213 (patch)
tree7d8ab50dcb3d6c7cacc57966351c7da6466d834a /recipes-core/mlinux-scripts
parent76649f161247cfa04b2a33941a50f5b0b3b2c6e2 (diff)
downloadmeta-mlinux-bf884446f0421e1cfb352c5b3d2dc82f0547a213.tar.gz
meta-mlinux-bf884446f0421e1cfb352c5b3d2dc82f0547a213.tar.bz2
meta-mlinux-bf884446f0421e1cfb352c5b3d2dc82f0547a213.zip
MTCAP LORA configuration table
Diffstat (limited to 'recipes-core/mlinux-scripts')
-rw-r--r--recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready29
1 files changed, 29 insertions, 0 deletions
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready
new file mode 100644
index 0000000..9930425
--- /dev/null
+++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+COUNTER=0
+TIMEOUT=60
+
+if [ $# -gt 1 ]; then
+ echo "usage: $0 [timeout]"
+ exit 1
+fi
+
+[ $# -eq 1 ] && TIMEOUT=$1
+
+# Wait for the radio to be ready before continuing
+while [ $COUNTER -lt $TIMEOUT ]; do
+ TYPE=$(radio-query --type)
+ MODEL=$(radio-query --model)
+ if [ $? == 0 ]; then
+ echo "Cellular radio is ready."
+ exit 0
+ fi
+ let COUNTER=COUNTER+1
+
+ echo "Waiting for radio to come up in order to identify type ..."
+
+ sleep 1
+done
+
+echo "Cellular radio is not ready."
+exit 1