3 # serial number of the TeleDongle being used as the flash programmer
6 if [ -x ../ao-tools/ao-load/ao-load ]; then
7 AOLOAD=../ao-tools/ao-load/ao-load
8 elif [ -x /usr/bin/ao-load ]; then
9 AOLOAD=/usr/bin/ao-load
11 echo "Can't find ao-load! Aborting."
15 if [ -x ../ao-tools/ao-rawload/ao-rawload ]; then
16 RAWLOAD=../ao-tools/ao-rawload/ao-rawload
17 elif [ -x /usr/bin/ao-rawload ]; then
18 RAWLOAD=/usr/bin/ao-rawload
20 echo "Can't find ao-rawload! Aborting."
24 echo "TeleBT v1.1 Turn-On and Calibration Program"
25 echo "Copyright 2013 by Bdale Garbee. Released under GPL v2"
28 echo "\tTeleBT v1.1 powered from USB"
29 echo "\t\twith TeleDonlge (on /dev/ttyACM0) cabled to debug header"
30 echo "\t\twith coax from SMA to frequency counter"
32 echo -n "TeleBT serial number: "
37 $RAWLOAD -D $DONGLE -r ao_led_blink.ihx
38 echo "LEDs should be blinking"
41 $RAWLOAD -D $DONGLE -r ao_radio_xmit.ihx
42 echo -n "Generating RF carrier. Please enter measured frequency: "
45 CAL_VALUE=`nickle -e "floor(434.55 / $FREQ * 1186611 + 0.5)"`
47 echo "Programming flash with cal value " $CAL_VALUE
48 $AOLOAD -D $DONGLE --cal $CAL_VALUE /usr/share/altos/stable/telebt-v1.0*.ihx $SERIAL
50 echo "Serial number "$SERIAL" programmed with RF cal value "$CAL_VALUE
51 echo "Unplug debug cable, power cycle, cu to the board, confirm freq and record power"