Problems flashing custom OpenWrt on Unifi AC Pro Gen2

Hi,

i have the following problem. I flashed one Unifi AC Pro and configured it manualy with the settings we needing.

I saved the config via Webgui. The tar ball contains the "etc" folder with all configs.

I made an image with the imagebuilder and followed the instructions which described here:

I create the files folder at root of the image builder where I execute the make command.
I copied the etc folder from the config backup of the manual configured AP to the files folder of the image builder.
I checked with "make info" which profile I need for the Unifi AC Pro and executed the make command.
The FW was build.

I take a new Unifi AC pro AP and downgrade it to first Version 3.7.8
I copied the custom built FW to the "tmp" folder of the new AP.

I followed the instructions of the "Non-invasive method using mtd from unifi"

SSH to your UniFi:
    default ip address is 192.168.1.20
    default login is ubnt
    default password is ubnt
Copy this fils to /tmp
    openwrt-*-squashfs-sysupgrade.bin
    You can use tools such as nc or scp to transfer files
Flash new firmware:
    mtd write /tmp/openwrt-*-squashfs-sysupgrade.bin kernel0
Erase kernel1:
    mtd erase kernel1
Set bootloader to boot from kernel0
    dd if=/dev/zero bs=1 count=1 of=/dev/mtd4
Reboot the device

After reboot, the white LED keeps blinking. The AP didnßt request an IP via DHCP and i can´t reach it via the static IP 192.168.1.20 (in this case my PC has the static IP192.168.1.10/24)

Anyone nows what the Problem is and how I can recover the AP. I tried to hold the reset button for round about 5 sec. after I power on the AP with POE. The AP makes a reboot.
After a while the AP began to blink the white LED again.
I can´t reach the AP. It looks that the AP didn´t have any IP.

It would probably help a lot if you have a serial connection so we can see what is in the actual config files in the AP.

Or if you share the network and dhcp files you build the FW with.

The default address for OpenWrt is 192.168.1.1 unless you've changed it

EDIT: and wrt recovery - press the reset button while plugging in power and keep the button pressed until you see the tftp recovery led pattern (white - blue - off - repeat). This might take more than 5 seconds.

Ref

The config files should be fine cause my manual configered Ap working as expected.

Either there was another problem with the built FW or with the flashing process. Sorry, I don´t have the rigth cable to make a serial connection.

I got the dead APs working again with pumpkin. So the AP has the static IP 192.168.1.20. It was possible to tftp the first unifi fw 3.7.8 to the AP with pumpkin.
I thought the AP has no IP cause it didn´t answer to my ping, but the tftp connection to the AP worked.

Now I setting up a new Ubuntu VM and try to built the custom firmware again....

This is documented on the help pages linked above:

User Tip: The UAP will not respond to ping requests while in TFTP recovery mode, but will respond to ARP requests.

ok thx for hint.

So now i built a new custom firmware. with the following command:

make image PROFILE="ubnt_uniflac-pro" PACKAGES="kmod-a th10k-ct ath10k-firmware-qca988x-ct kmod-usb2" FILES="files"

After flashing the FW the AP requests an IP from DHCP, the the led is stady blue, the rigth SSID is shown but now i can´t open the Webgui.

Firefox Errormsg: PR_END_OF_FILE_ERROR
Chrome doesn´t work too

You didn’t include the luci (and probably also luci-ssl if you want https connection) in the build packages.

ah ok it is an extra package
big thx

Yes!, if you use imagebuilder. That surprise has probably everyone made the first time using imagebuilder. No one think about it since it is always standard in the prebuild firmware’s.

After the build and if you have luci In the packages definition you will see a lot of luci packages included in the build manifest list.

2 Likes

are there any other packages that are recommended to install on the AP?

Whats about snmp? I installed snmpd and snmp-utils but after installation i didn´t find the snmp configuration part in the webgui.

That would be in luci-app-snmpd.

2 Likes

For it to work, no.

But the question is impossible to answer because only you can answer it. It is only you that know what you want it to do.

I have no real idea why you need these on a access point to begin with? If they are system critical they should already be specified in the profile definition.

The make info comand shows me which profile I have to use, and shows me the packages kmod-a th10k-ct ath10k-firmware-qca988x-ct kmod-usb2 for this profile
Thats the reason I used them

You don’t need to define them as packages, the packages defined in the profile config are installed automatically if you choose that profile.

“PACKAGES=“ are only for ad ons like luci, luci-ssl, openvpn, banip, adblocker or what ever you want to have for ad ons in your build. You don’t specify depenables ether since image builder installs them automatically.

2 Likes

thx for the hint. I missinterpreted it :o)

2 Likes

Been there, done that😄

Hi,

so now a few days later I want to compile a new FW. I changed nothing at the Ubuntu VM were I successfully compiled a FW. But now I get following errors:

Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-nf-reject
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-nf-ipt
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-ipt-core
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for luci:
 * 	kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4)
 * opkg_install_cmd: Cannot install package luci.
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-nf-reject6
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-nf-ipt6
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-ip6tables
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for ip6tables:
 * 	kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4)
 * opkg_install_cmd: Cannot install package ip6tables.
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-crypto-aead
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-crypto-hmac
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-crypto-sha256
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-crypto-rng
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-crypto-gf128
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-mac80211
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-ath
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-hwmon-core
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-ath10k-ct
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-ath10k-ct:
 * 	kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4)
 * opkg_install_cmd: Cannot install package kmod-ath10k-ct.
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-ath9k
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-ath9k:
 * 	kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4)
 * opkg_install_cmd: Cannot install package kmod-ath9k.
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-gpio-button-hotplug
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-nf-flow
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-ipt-offload
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-ipt-offload:
 * 	kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4)
 * opkg_install_cmd: Cannot install package kmod-ipt-offload.
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-usb-core
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-usb2
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb2:
 * 	kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4)
 * opkg_install_cmd: Cannot install package kmod-usb2.
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4) for kmod-lib-crc-ccitt
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for ppp:
 * 	kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4)
 * opkg_install_cmd: Cannot install package ppp.
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for ppp-mod-pppoe:
 * 	kernel (= 5.4.158-1-4442032d164fb5e25cb8cb20aa8479b4)
 * opkg_install_cmd: Cannot install package ppp-mod-pppoe.
make[2]: *** [Makefile:168: package_install] Error 255
make[1]: *** [Makefile:123: _call_image] Error 2
make: *** [Makefile:241: image] Error 2

I made a " make clean" before
I compiled the new FW with

make image PROFILE="ubnt_uniflac-pro" PACKAGES="luci luci-ssl luci-proto-relay luci-app-snmpd snmpd snmp-utils lldpd" FILES="files"

The errors still the same