UPS HAT Manual Firmware Update Instructions

  1. Download the update_firmware.py file by the following command.
wget https://raw.githubusercontent.com/sixfab/\
sixfab-power-python-api/master/example/update_firmware.py
  1. Change the file’s permission.
sudo chmod +x update_firmware.py
  1. Now, download the latest firmware version here.

  2. Type the path of the downloaded file(.bin) in the firmware_path field.

  3. If the power_agent and power_request service is running, stop it.

sudo systemctl stop power_agent.service
sudo systemctl stop power_request.service
  1. Run the script.
python3 update_firmware.py
  1. L1 flashes green and purple when updating.

  2. When the update is complete, please wait until the system starts.

Alernative way

If your HAT is behaving abnormally (for example, the firmware is not responding to any requests), update the firmware by following the steps below.

  1. Remove the battery and unplug the adapter.

  2. Press and hold both S1 and S2 buttons and then plug in the power cable to UPS HAT.

  3. Release the buttons when the L1 magenta light. This indicates that UPS HAT is working in bootloader mode.

Note: For firmware update, UPS HAT must work in the bootloader mode.
  1. In bootloader mode, It can be called only to the update_firmware method in Python API.

  2. Download the latest firmware version here.

  3. If the power_agent and power_request service is running, stop it.

  4. Change the firmware_path in the update_firmware.py script and execute it to update the firmware on the UPS HAT.

Troubleshooting

  • If you get an error message, run the update_firmware.py script on the command line a few times.

  • Make sure your app is updated to use the latest API version as well.
    pip3 install sixfab-power-python-api --upgrade