add automatic Bluetooth functionality check to turnon_telebt
authorBdale Garbee <bdale@gag.com>
Tue, 29 Sep 2015 06:45:27 +0000 (00:45 -0600)
committerBdale Garbee <bdale@gag.com>
Tue, 29 Sep 2015 06:46:35 +0000 (00:46 -0600)
ao-bringup/turnon_telebt

index 7c036bc21b299c0206cd35ebf8fbd83700814275..509814d367bac83dadc8ff7d239d15189c202be9 100755 (executable)
@@ -56,6 +56,15 @@ SERIAL=$SERIAL ./cal-freq $dev
 
 echo 'E 1' > $dev
 
+echo -n "checking BlueTooth functionality... "
+btdev=`hcitool scan | awk -F \- '/TeleBT/ { print $2 }'`
+if [ "$btdev" = "$SERIAL" ]; then
+       echo "working!"
+else
+       echo "device not found"
+       exit 1
+fi
+
 echo "TeleBT-v$VERSION $SERIAL is ready to ship"
 
 exit $?