UBNT firmware manual update / Firmware update stuck

One of my client site visited recently I came across UBNT AP-LR model AP. Issue is that it was setup by previous phone provider and they manged it. But with recent changes company wanted to re-use it for wifi and mange it. As you know once ubnt adopted by controller you have to factory reset it in order to adopted by another controller. So here is what I did.

In this case I had no access what so ever for previous ubnt management software so there are no way I can reset the controller or reset via SSH. Now I had to resort to traditional method of going up to the ceiling and opening unit and holding reset button and reset it with paper clip and I was able to get reset it. In this case I had to put pin in and hold it till it reboot twice and reboot it via POE injector once to show up on the controller. You can see full info here and it will discuss unit reset via SSH too https://help.ubnt.com/hc/en-us/articles/205143490-UniFi-How-to-Reset-the-UniFi-Access-Point-to-Factory-Defaults

After I got reset it and once the unit was flashing, I logged in and download latest ubnt management software and install it on the server. After I log onto a controller I was able to see the ubnt unit and I clicked on update firmware and adopt then the trouble started!!!

ubnt unit was stuck on infinity downloading and never completed. Several reboot via injector and re loading management software didn’t help. First my though was firewall must be blocking it or ubnt cannot reach DNS which I saw in several post on the internet forums. I was able to SSH into ubnt unit via local IP with putty and confirm that it actually can reach out to the internet and no issues with FW (btw default un/psw is ubnt/ubnt). So back to troubleshooting and reading on the internet!!

Finally I came a cross post that some of the ubnt get stuck on infinity download loop if they weren’t updated for long time or UBNT change or update the product category, solution will be manual update. Here is the steps I took and was able to get unit updated and adopted by the controller!!

First here is the detail article for UBNT manual firmware change https://help.ubnt.com/hc/en-us/articles/204910064-UniFi-Changing-the-Firmware-of-a-UniFi-Device#SSH

I’m a windows user so all my links are windows related and there are are two ways you can do this.

First method ( This is the easy one)

***Locate your AP local ip and SSH into it via putty

****then run upgrade http://dl.ui.com/path/to/upgrade-vX.Y.Z.tar

There is catch with KB article if you try to use firmware path you can get from ubnt firmware download page https://www.ui.com/download/unifi/unifi-ap it always gives you https address which will not work via SSH command line upgrade it will cannot make secure connection and use ” –no-check-certificate ” end line but I tried many times and it didn’t work for whatever the reason. In order to by pass this easy DON”T USE HTTPS AND EDIT line as HTTP. Here is the working command

upgrade http://dl.ubnt.com/unifi/firmware/BZ2/4.0.15.9872/BZ.ar7240.v4.0.15.9872.181229.0259.bin

No you will see it is updated without and issue. In this case I have use AP-LR firmware for my device. Here is the link for ubnt AP-LR unit if any one need it to download manually https://drive.google.com/file/d/1xchjBNOMWd_AoYIZHkugwHRjfFQR_EjL/view?usp=sharing

Second method (The Hardway)

****First download WinSCP https://winscp.net/eng/download.php and install it

****Download correct firmware for your model from https://www.ui.com/download/unifi/

****Connect to AP with winscp via local ip and copy .bin firmware to device /tmp/ folder

****Connect to AP via SSH and run syswrapper.sh upgrade2 &

****Done!!!