projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos]
/
ao-bringup
/
turnon_telebt
diff --git
a/ao-bringup/turnon_telebt
b/ao-bringup/turnon_telebt
index 912ba459657d01bdb5a889d00d4eba2f4613d7f2..3e9fddaa4da8203bf26350cf266b9730ccb02a14 100755
(executable)
--- a/
ao-bringup/turnon_telebt
+++ b/
ao-bringup/turnon_telebt
@@
-44,7
+44,7
@@
esac
FLASH_FILE=$REPO/loaders/telebt-v$VERSION-altos-flash-*.bin
ALTOS_FILE=$REPO/telebt-v$VERSION-*.elf
FLASH_FILE=$REPO/loaders/telebt-v$VERSION-altos-flash-*.bin
ALTOS_FILE=$REPO/telebt-v$VERSION-*.elf
-$DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE
|| exit 1
+$DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE
sleep 2
sleep 2
@@
-64,11
+64,18
@@
case "$dev" in
;;
esac
;;
esac
+CALFILE=cal-$SERIAL.txt
+
echo 'E 0' > $dev
echo 'E 0' > $dev
-SERIAL=$SERIAL ./cal-freq $dev
+../ao-tools/ao-cal-freq/ao-cal-freq --nosave --output=$CALFILE --tty=$dev
+
+# echo 'E 1' > $dev
-echo 'E 1' > $dev
+CAL_VALUE=`cat $CALFILE`
+echo $SERIAL","$CAL_VALUE >> cal_values
+echo "Reflashing with calibration: $CAL_VALUE"
+$USBLOAD --cal=$CAL_VALUE --tty=$dev $ALTOS_FILE || exit 1
echo -n "checking BlueTooth functionality... "
btdev=`hcitool scan | awk -F \- '/TeleBT/ { print $2 }'`
echo -n "checking BlueTooth functionality... "
btdev=`hcitool scan | awk -F \- '/TeleBT/ { print $2 }'`
@@
-80,7
+87,7
@@
else
fi
echo -n "checking BTLE functionality... "
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
if [ "$btdev" = "$SERIAL" ]; then
echo "working!"
else