====== Ubiquiti - CLI - Downgrade/Upgrade Firmware ======
===== SSH into the device. =====
ssh ubnt@192.168.1.15
returns:
The authenticity of host '192.168.1.15 (192.168.1.15)' can't be established.
ECDSA key fingerprint is SHA256:...
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.1' (ECDSA) to the list of known hosts.
ubnt@192.168.1.1's password:
----
===== Download the file locally =====
Determine the firmware to download from https://www.ui.com/download/unifi/.
Confirm it is a .bin firmware file.
cd /tmp
wget https://dl.ui.com/unifi/firmware/U7PG2/4.0.80.10875/BZ.qca956x.v4.0.80.10875.200111.2335.bin
**NOTE:** If you do not have internet access on the device, try the following:
- Download the firmware on another machine.
- Copy the firmware to the Ubiquiti device. scp /foldername/firmwarefile.bin ubnt@IP-of-UAP-or-Switch:/tmp/fwupdate.bin
* For example scp BZ.qca956x.v4.0.80.10875.200111.2335.bin ubnt@192.168.1.15:/tmp/fwupdate.bin
----
===== Rename the download to fwupdate.bin =====
cp BZ.qca956x.v4.0.80.10875.200111.2335.bin fwupdate.bin
----
===== Downgrade/Upgrade the Firmware =====
upgradesyswrapper.sh upgrade2 &
**NOTE:** Getting an "Invalid Firmware" error when upgrading via SSH might be caused by installing an incorrect version first.
Correct this by going to the tmp folder and deleting fwupdate.bin first and then trying the upgrade command once more (making sure it was in the correct folder in the Controller).
See: https://help.ui.com/hc/en-us/articles/204910064-UniFi-Upgrading-firmware-image-via-SSH
**NOTE:** To Reset to default:
syswrapper.sh restore-default
----
===== Check logs =====
/var/logs/messages
----
===== References =====
[[https://help.ui.com/hc/en-us/articles/218850057|SSH intro]]
https://help.ui.com/hc/en-us/articles/204910064-UniFi-Upgrading-firmware-image-via-SSH
https://help.ui.com/hc/en-us/articles/204910124-UniFi-TFTP-Recovery-for-Bricked-Access-Points
https://help.ui.com/hc/en-us/articles/204910064-UniFi-Upgrade-the-Firmware-of-a-UniFi-Device