====== Radio Programmer ====== The Radio Programmer is a black-box unit that automatically uploads a firmware to a device (radio) when connected. This unit is based on a Raspberry Pi and a USB hub which connects to the devices. It detects the device connected and starts the firmware upload immediately. ===== Auto detecting ===== Udev is used to auto detect the devices when connected. Put this file in ''/etc/udev/rules.d/90-compass.rules'' # Run script when ESP device is connected ACTION=="add", SUBSYSTEM=="tty", KERNEL=="ttyUSB*", RUN+="/opt/CG3/udev.sh" ===== Programming the device ===== Put this file in ''/opt/CG3/udev.sh'' #!/bin/sh esptool.py -p /dev/$1 chip_id >> /tmp/udev.log #esptool.py -p /dev/ttyUSB0 --baud 460800 write_flash -fm dio -fs 16m 0x00000 /opt/CG3/firmware.bin Remember to make the file executable ''chmod +x /opt/CG3/udev.sh'' ===== Updating FW to be uploaded =====