[SOLVED] Cannot update OpenWrt

I cannot update or upgrade OpenWRT packages. I get the following error. I can ping and resolve hostnames just fine from the Dianostics section.

Any ideas?

Thanks

Model	Ubiquiti UniFi AC LR
Architecture	Qualcomm Atheros QCA956X ver 1 rev 0
Target Platform	ath79/generic
Firmware Version	OpenWrt 22.03.2 r19803-9a599fee93 / LuCI openwrt-22.03 branch git-22.288.45147-96ec0cd
Kernel Version	5.10.146
Executing package manager
Downloading https://downloads.openwrt.org/releases/22.03.2/targets/ath79/generic/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.2/targets/ath79/generic/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/base/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/base/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/luci/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/luci/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/routing/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/routing/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/telephony/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/telephony/Packages.gz
Errors
Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.2/targets/ath79/generic/packages/Packages.gz, wget returned 5.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/base/Packages.gz, wget returned 5.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/luci/Packages.gz, wget returned 5.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/packages/Packages.gz, wget returned 5.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/routing/Packages.gz, wget returned 5.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.2/packages/mips_24kc/telephony/Packages.gz, wget returned 5.
The opkg update command failed with code 6.

Or if possible, could someone link me to the latest available firmware for this chipset. I am still not 100% with choosing the right firmware and would absolutely hate to brick these devices now as the configuration is not going to be fun to redo.

Thanks

Have you tried using attended sysupgrade? It provides a nice interface for upgrades and you can create custom images with the packages you need in them.

Obviously you may not be able to install the package because of the opkg errors.

To upgrade manually:

https://downloads.openwrt.org/releases/22.03.3/targets/ath79/generic/openwrt-22.03.3-ath79-generic-ubnt_unifi-squashfs-sysupgrade.bin

From

Before you upgrade, make sure you take a backup of your config.

Ok so I can use this file to update via LuCI?

Please tell me more about the attended sysupgrade.

is it via the cli?

thank you

1 Like

Yes. Files with sysupgrade at the end are for upgrading existing installations and factory are from going from OEM to openwrt.

More info about attended sysupgrade here

Awesome, thank you so much.

Last question, I have a Unifi AP Pro aswell. Can I use the same firmware for that?

Also, do you know why package upgrades are failing?

Model	Ubiquiti UniFi AC Pro
Architecture	Qualcomm Atheros QCA956X ver 1 rev 0
Target Platform	ath79/generic
Firmware Version	OpenWrt 22.03.2 r19803-9a599fee93 / LuCI openwrt-22.03 branch git-22.288.45147-96ec0cd
Kernel Version	5.10.146
1 Like

No, that has different firmware. If you Google "UniFi AC Pro openwrt" it will take you to the wiki page.

This is for the UniFi AC Pro

https://downloads.openwrt.org/releases/22.03.3/targets/ath79/generic/openwrt-22.03.3-ath79-generic-ubnt_unifiac-pro-squashfs-sysupgrade.bin

RE opkg, first update using the sysupgrade image and then try again. We can work on that once you are on the latest version.

Does a forum search for "wget returned 5" yield anything useful for you?

1 Like

Its too spiritic. There's too many different scenarios I don't know where to start.

I'm leaning toward SSL because I can resolve DNS but not sure.

Thanks, I got the AC Pro upgraded fine, however still have the updating issue.

When I try update the AC LR, I get this warning.

Any ideas? Should I just force update?

Just to be clear im flashing the firmware upgrade image listed here

[OpenWrt Wiki] Ubiquiti UniFi AP and AP-LR

https://downloads.openwrt.org/releases/22.03.3/targets/ath79/generic/openwrt-22.03.3-ath79-generic-ubnt_unifi-squashfs-sysupgrade.bin

Image check failed:

Sun Nov 6 09:40:30 NZDT 2022 upgrade: Device ubnt,unifiac-lr not supported by this image Sun Nov 6 09:40:30 NZDT 2022 upgrade: Supported devices: ubnt,unifi unifi Image check failed.

Should be OK to force this. Looks like a generic image has been created for AP and AP LR perhaps?

In this directory for 22.03.2 it has separate images for AP/AP LR

https://downloads.openwrt.org/releases/22.03.2/targets/ath79/generic/

In this directory for 22.03.03 it has a single image

https://downloads.openwrt.org/releases/22.03.3/targets/ath79/generic/

I would trust the information on the wiki too.

Upgrading packages (via the CLI opkg upgrade command or the LuCI Upgrade... button) can result in major problems. It is generally highly discouraged, unless you know what you are doing or if there is specific instruction to do so.

If you’re actually just trying to update the package lists so you can install packages (not upgrade them), that should be fine, of course. In that case, the problem is likely network connectivity.

Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

cat /etc/config/network
cat /etc/config/wireless
1 Like

Hmmm ok I force upgraded and the device has not come back up :frowning:

That's unfortunate. But nothing to be too worried about. Your device has a fail safe mode.

If you follow the instructions in the wiki, your device will boot up again:

It seems that the OP may be using an UAP-AC series device...

Also, on that note, it is really important to make sure that the correct firmware image is installed... it's easy to accidentally install the UAP version when the UAP-AC version is required (or vice versa).

Yea OK sorry its the AP AC one.

So if I boot into failsafe mode, I then just need to flash the correct firmware via CLI?

Trying to avoid going down the whole serial route again if possible :stuck_out_tongue:

Thanks guys

You'll be using TFTP mode if you need to reflash the device. The device info page should have all the relevant details.

So should I be flashing the sysupgrade image or the first installation image from here?

The factory image. sysupgrade is typically only for the situation where OpenWrt is already installed and running (and performing the upgrade).

This bit here? Where do i PUT the image? /tmp?

TFTP PUT the image to 192.168.1.20. This should be done promptly, since although the LEDs continue to blink indefinitely, after a few minutes the UAP will stop responding to TFTP. If the TFTP put attempt times out, repeat the power up reset process and try again.
Flashing via TFTP (TFTP recovery)
OpenWrt cannot be flashed this way since the firmware must be signed. Any version of the official firmware should work though.

Keep the reset button pressed while powering on the AP
Wait until the LED ring is blinking white/blue/off (ca. 15 sec.) then release the button. The UAP is now a TFTP server at 192.168.1.20. It will not respond to pings or serve DHCP, so you must static IP your PC.
TFTP PUT the image to 192.168.1.20. This should be done promptly, since although the LEDs continue to blink indefinitely, after a few minutes the UAP will stop responding to TFTP. If the TFTP put attempt times out, repeat the power up reset process and try again.
Further TFTP client instructions in here.
If successful, the TFTP transfer will complete in a few seconds, then the LEDs will flash in various patterns. Leave the UAP alone (powered up) until the LED lights steady white, which may take several minutes.