deal with cheap BT dongle that shows multiple copies of unit in lescan output
authorBdale Garbee <bdale@gag.com>
Thu, 14 Sep 2017 16:51:18 +0000 (10:51 -0600)
committerBdale Garbee <bdale@gag.com>
Thu, 14 Sep 2017 16:51:18 +0000 (10:51 -0600)
ao-bringup/turnon_telebt

index 912ba45..fb8318b 100755 (executable)
@@ -80,7 +80,7 @@ else
 fi
 
 echo -n "checking BTLE functionality... "
-btdev=`sudo timeout -s SIGINT 5s hcitool lescan | awk -F \- '/TeleBT/ { print $2 }'`
+btdev=`sudo timeout -s SIGINT 5s hcitool lescan | awk -F \- '/TeleBT/ { print $2 }' | head -n 1`
 if [ "$btdev" = "$SERIAL" ]; then
        echo "working!"
 else