Updating hotspot firmware via Pi-Star

Revised: Nov 2020, CC BY-SAOpen in new tab regular
Most up-to-date version: amateurradionotes.com/firmware.htm Links: Standalone articles & PDFsOpen in new tab regular

Note: This is an extract from the full Pi-Star notes article.

8) Updating hotspot firmware via Pi-Star

It's possible to update the firmware of several hotspot boards via Pi-Star.

Related article: Updating and upgrading Pi-StarOpen in new tab regular

Note: These instructions are for hotspots. For updating firmware on MMDVM repeaters, see the Pi-Star Wiki article: Headless MMDVM Firmware BuildingOpen in new tab regular.

8a) Updating ZUMspot/MMDVM_HS, etc.

Current version as of Nov 2020: v1.5.2Open in new tab regular.

Beginning with Pi-Star dashboard v20181214, you can see in the Radio Info section which TCXO chip (12.288 or 14.7456 MHz) a ZUMspot/MMDVM_HS board is running. This info is needed to determine which firmware update to apply, for example, with the MMDVM_HS_HAT or MMDVM_HS_DUAL_HAT, there are separate firmware update script commands for the different chips.
Pi-Star dashboard displaying firware (FW) version

You also can find information about your current radio/modem board and firmware version by running the pistar-findmodem script command via SSH:
sudo pistar-findmodem
For more info about this script command, see Find info about the radio/modem board and about what is using the hotspot's modem or USB portOpen in new tab regular.

Firmware release notes on GitHub: ZUMspot/MMDVM_HSOpen in new tab regular.

  1. Log into Pi-Star via SSH.
  2. Run a Pi-Star Update:
    sudo pistar-update
    Note: If there's anything unusual about the update process, for example, if there are unusual error messages or it finishes with a "mount: / is busy" message, it might be a good idea to rerun the update and also to reboot before proceeding:
    sudo reboot
  3. Run one of the following commands:
    Note 1: It isn't necessary to first put Pi-Star into read-write mode (rpi-rw); the script takes care of that.
    Note 2: When you first enter one of the following commands, you'll see a message showing the current version of firmware that is installed on your hotspot, for example:
    MMDVM_HS_Hat-v1.3.3 20180224 ADF7021 FW by CA6JAU GitID #d90263f
    Press any key to write the hs_hat firmware to this modem or Ctrl-C to quit…

    If you press any key to continue, the next thing you'll see is a message about the new version of firmware that is being installed, for example:
    Flashing your hs_hat modem to the latest version
    --2018-05-23 08:41:20-- http://github.com/juribeparada/MMDVM_HS/releases/download/v1.3.6/ install_fw_hshat.sh
    • ZUMspot board connected to GPIO:
      sudo pistar-zumspotflash rpi
    • MMDVM_HS_Hat board with 14.7456 MHz TCXO1 connected to GPIO:
      sudo pistar-mmdvmhshatflash hs_hat
    • MMDVM_HS_Hat board with 12.288 MHz TCXO connected to GPIO:
      sudo pistar-mmdvmhshatflash hs_hat-12mhz
    • MMDVM_HS_DUAL_Hat board with 14.7456 MHz TCXO connected to GPIO:
      sudo pistar-mmdvmhshatflash hs_dual_hat
    • MMDVM_HS_DUAL_Hat board with 12.288 MHz TCXO connected to GPIO:
      sudo pistar-mmdvmhshatflash hs_dual_hat-12mhz
    • Nano Hat board connected to GPIO:
      sudo pistar-vyehsflash nano_hs
    • HS_DUAL_HAT (VR2VYE) connected to GPIO:
      pistar-vyehsflash hs_dual_hat
    • NanoDV NPi board:
      sudo pistar-nanodvflash pi
    • NanoDV USB board:
      sudo pistar-nanodvflash usb
    • BD7KLE/BG3MDO devices:
      sudo pistar-mdoflash
    • ZUMspot duplex board connected to GPIO:
      sudo pistar-zumspotflash rpi_duplex
    • ZUMspot USB key:
      sudo pistar-zumspotflash usb
    • USB-connected Libre Modem:
      sudo pistar-zumspotflash libre
  4. A prompt will tell you to press any key to begin.
  5. When the update is finished, another prompt will tell you to press any key to reboot Pi-Star. Be patient, this step takes a bit of time during which it doesn't look like anything is happening.
  6. Once the firmware update is complete, you can see the new version in the Radio Info module on the Pi-Star Dashboard or Admin pages.

[1] TCXO = Temperature Compensated Crystal Oscillator
[2] The script for updating a ZUM Radio MMDVM-Pi board can be found here: GitHub: juribeparada/MMDVM_manOpen in new tab.

8b) Updating DVMEGA mounted on an RPi

Note: This method, which was figured out by Tom, ON4TOP. Tony Corbett, G0WFV, discusses it in detail on his Radio Geek blog, HOW-TO Update DVMega firmware without a programmer or an ArduinoOpen in new tab regular:

Tom, ON4TOP, has come to your rescue. He has figured out that it is possible to flash the DVMega firmware using the Rpi itself with the DVMega still in situ by wiring the reset pin of the ATMEGA328 directly to a spare GPIO port and then using (a slightly modified version of) avrdude to flash the hex file straight over /dev/ttyAMA0. The same procedure works just as well on a single band DVMega….

Subsequently, Andy Taylor, MW0MWZ, adapted this method for use with Pi-Star. What follows is a summary of Andy's adaption.

This process works in Pi-Star's default Read-Only mode. These are the instructions for the non-"Japan" firmware update. (Sorry Japanese hams but I don't know the process for the "Japan" firmware update.)

  1. For updating the DVMEGA firmware using a Raspberry Pi 3, solder a jumper wire between the ATMEGA328 reset pin and GPIO header Pin 7.
    - - - - - - - - - - - - - - -
    Important! Soldering a DVMEGA and updating its firmware are at your own risk. The only thing that is guaranteed is that if you wreck your DVMEGA doing this, then you own a wrecked DVMEGA.
    - - - - - - - - - - - - - - -
    Important! This jumper configuration is for use only when using the Raspberry Pi for updating the firmware. When using the BlueStack board, there is a different configuration and method (see Updating DVMEGA firmware using a BlueStack boardOpen in new tab regular).
    Note: You can leave the soldered jumper wire in place after updating the firmware, making subsequent updates much easier.
    Illustration of DVMEGA-DUAL board showing where to connect the jumper wire for firmware update using the RPi
    Photo DVMEGA board showing the jumper wire in place
    Illustration of DVMEGA-DUAL board showing where to connect the jumper wire for firmware update using the RPi
  2. SSH into your Pi-Star.
  3. Change directory to tmp:
    pi-star@pi-star(ro):~$ cd /tmp
  4. Download the imaging tools:
    pi-star@pi-star(ro):tmp$ wget --tries=3 https://www.pistar.uk/downloads/dvmega-flash-tools.zip
  5. Download the DVMega firmware update file:
    1. To find the latest firmware version, visit the DVMEGA DownloadsOpen in new tab regular page and look in the section for BlueDV-MMDVMhost, Raspberry Pi based.
      Where ### is the firmware update version:
      • For firmware versions 3.19 and earlier:
        pi-star@pi-star(ro):tmp$ wget --tries=3 http://www.dvmega.nl/wp-content/uploads/2018/11/DVMEGA_RH_V###_UNO.zip
      • For firmware versions 3.26 and later:
        pi-star@pi-star(ro):tmp$ wget --tries=3 http://www.dvmega.nl/wp-content/uploads/2018/11/DVMEGA_RH_V###_RPI.zip
      • - - - - - - - - - - - - - - -
        Thanks to Bruce, NB0DV, for his post about the change that happened with v3.26 on the Pi-Star User ForumOpen in new tab regular.
        - - - - - - - - - - - - - - -
        Note: I added --tries=3 after I ran into a problem with the DVMEGA site being unavailable the first time I tried this. The retries kept happening and each one took a long time, so this step seemed to be in an unending loop. I ended up rebooting the device to break the looping. Turns out the default for wgetOpen in new tab regular (web get) is 20 retries, which seems excessively high to me for this operation.
        - - - - - - - - - - - - - - -
    2. Unzip both imaging tools and firmware files to the dvmega directory:
      pi-star@pi-star(ro):tmp$ unzip -d dvmega dvmega-flash-tools.zip
    3. Where ### is the firmware update version:
      • For firmware versions 3.19 and earlier:
        pi-star@pi-star(ro):tmp$ unzip -j -d dvmega DVMEGA_RH_V319_UNO.zip
      • For firmware versions 3.26 and later:
        pi-star@pi-star(ro):tmp$ unzip -j -d dvmega DVMEGA_RH_V319_RPI.zip
      • - - - - - - - - - - - - - - -
        Note: The -d switch causes the files to be extracted into the dvmega folder. The -j switch extracts files into the current folder without the folder structure in zip file being recreated.
        - - - - - - - - - - - - - - -
    4. Change directory to dvmega:
      pi-star@pi-star(ro):tmp$ cd dvmega/
    5. For versions 3.26 and later, delete the unnecessary file, where ### is the firmware update version:
      pi-star@pi-star(ro):dvmega$ sudo rm DVMEGA_RH_V###_RPI_JAPAN.hex
    6. Run the script:
      pi-star@pi-star(ro):dvmega$ sudo ./flash_gpio.sh
    7. When the script is finished, you'll see:
      strace: |autoreset: Broken pipe
      Once flashing has been completed, you should reboot your Pi-Star
    8. Reboot Pi-Star:
      pi-star@pi-star(ro):dvmega$ sudo reboot
      (or you can exit the SSH session and reboot from the Pi-Star dashboard).