3 if [ -x ../ao-tools/ao-load/ao-load ]; then
4 AOLOAD=../ao-tools/ao-load/ao-load
5 elif [ -x /usr/bin/ao-load ]; then
6 AOLOAD=/usr/bin/ao-load
8 echo "Can't find ao-load! Aborting."
12 if [ -x ../ao-tools/ao-rawload/ao-rawload ]; then
13 RAWLOAD=../ao-tools/ao-rawload/ao-rawload
14 elif [ -x /usr/bin/ao-rawload ]; then
15 RAWLOAD=/usr/bin/ao-rawload
17 echo "Can't find ao-rawload! Aborting."
21 echo "TeleDongle v0.2 Turn-On and Calibration Program"
22 echo "Copyright 2010 by Bdale Garbee. Released under GPL v2"
25 echo "\tTeleDongle v0.2 powered from USB"
26 echo "\t\twith TIdongle (on /dev/ttyACM0) cabled to debug header"
27 echo "\t\twith coax from SMA to frequency counter"
29 echo -n "TeleDongle serial number: "
43 $RAWLOAD -D $programmer -r ao_led_blink.ihx
44 echo "LEDs should be blinking"
47 $RAWLOAD -D $programmer -r ao_radio_xmit.ihx
48 echo -n "Generating RF carrier. Please enter measured frequency: "
51 CAL_VALUE=`nickle -e "floor(434.55 / $FREQ * 1186611 + 0.5)"`
53 echo "Programming flash with cal value " $CAL_VALUE
54 $AOLOAD -D $programmer --cal $CAL_VALUE ~/altusmetrumllc/Binaries/teledongle-v0.2*.ihx $SERIAL
56 echo "Serial number "$SERIAL" programmed with RF cal value "$CAL_VALUE
57 echo $SERIAL","$CAL_VALUE >> cal_values
58 echo "Unplug and replug USB, cu to the board, confirm freq and record power"