+FLASH_FILE=~/altusmetrumllc/Binaries/loaders/telemini-v$VERSION-altos-flash-*.bin
+ALTOS_FILE=~/altusmetrumllc/Binaries/telemini-v$VERSION-*.elf
+#FLASH_FILE=../src/telemini-v3.0/flash-loader/telemini-v$VERSION-altos-flash-*.bin
+#ALTOS_FILE=../src/telemini-v3.0/telemini-v$VERSION-*.elf
+
+if lsusb -d 0483:df11 | grep -q STM; then
+ $DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || exit 1
+
+ sleep 2
+fi
+
+$USBLOAD --serial=$SERIAL $ALTOS_FILE || exit 1
+
+sleep 3
+
+dev=`ao-list | awk '/'"$PRODUCT"'-v'"$VERSION"'/ { print $3; exit(0); }'`
+
+case "$dev" in
+/dev/tty*)
+ echo "$PRODUCT found on $dev"
+ ;;
+*)
+ echo 'No '"$PRODUCT"'-v'"$VERSION"' found'
+ exit 1
+ ;;
+esac