From: Bdale Garbee Date: Thu, 14 Sep 2017 16:51:18 +0000 (-0600) Subject: deal with cheap BT dongle that shows multiple copies of unit in lescan output X-Git-Tag: 1.8.2~2^2~7 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=ad61e277069217d98400e884d3c173357d2343ed;ds=sidebyside deal with cheap BT dongle that shows multiple copies of unit in lescan output --- diff --git a/ao-bringup/turnon_telebt b/ao-bringup/turnon_telebt index 912ba459..fb8318b3 100755 --- a/ao-bringup/turnon_telebt +++ b/ao-bringup/turnon_telebt @@ -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