-$RAWLOAD --device TeleDongle -r ao_radio_xmit.ihx
-echo -n "Generating RF carrier. Please enter measured frequency: "
-read FREQ
+dev=`ao-list | awk '/TeleMetrum-v'"$VERSION"'/ { print $3; exit(0); }'`
+
+case "$dev" in
+/dev/tty*)
+ echo "TeleMetrum found on $dev"
+ ;;
+*)
+ echo 'No TeleMetrum-v'"$VERSION"' found'
+ exit 1
+ ;;
+esac
+
+echo 'E 0' > $dev
+
+SERIAL=$SERIAL ./cal-freq $dev
+
+../ao-tools/ao-cal-accel/ao-cal-accel $dev