deal with cheap BT dongle that shows multiple copies of unit in lescan output
[fw/altos] / ao-bringup / turnon_telebt
index 912ba459657d01bdb5a889d00d4eba2f4613d7f2..fb8318b311c83d7ac28aa9adfbe392cf866ef1af 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