OpenWrt Forum Archive

Topic: Ubiquiti UniFi AP: no errors, but OpenWRT not installing at all.

The content of this topic has been archived on 30 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

A week ago I installed OpenWRT v14 on a Ubiquiti UniFi AP without any problem by following these instructions here:

https://wiki.openwrt.org/toh/ubiquiti/unifi

Today I am trying with another one (same model, or so I think), but the installation is not working at all.
These are my steps:

login as: admin
admin@192.168.11.2's password:


BusyBox v1.11.2 (2014-09-30 11:56:14 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

BZ.v3.2.6# wget https://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/
openwrt-ar71xx-generic-ubnt-unifi-squashfs-factory.bin
BZ.v3.2.6# cd /tmp
BZ.v3.2.6# wget https://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/
openwrt-ar71xx-generic-ubnt-unifi-squashfs-factory.bin
--2016-02-21 01:13:45--  https://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/openwrt-ar71xx-generic-ubnt-unifi-squashfs-factory.bin
Resolving downloads.openwrt.org... 78.24.191.177
Connecting to downloads.openwrt.org|78.24.191.177|:443... connected.
ERROR: cannot verify downloads.openwrt.org's certificate, issued by `/C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./OU=http://certs.starfieldtech.com/repository//CN=Starfield Secure Certificate Authority - G2':
  Unable to locally verify the issuer's authority.
ERROR: certificate common name `www.openwrt.org' doesn't match requested host name `downloads.openwrt.org'.
To connect to downloads.openwrt.org insecurely, use `--no-check-certificate'.
Unable to establish SSL connection.

Well... the certificate thing did not happen the last week. I don't know what is going on, but I will ignore it as suggested:

BZ.v3.2.6# wget https://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/
openwrt-ar71xx-generic-ubnt-unifi-squashfs-factory.bin --no-check-certificate
--2016-02-21 01:15:31--  https://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/openwrt-ar71xx-generic-ubnt-unifi-squashfs-factory.bin
Resolving downloads.openwrt.org... ^[[B^[[B78.24.191.177
Connecting to downloads.openwrt.org|78.24.191.177|:443... connected.
WARNING: cannot verify downloads.openwrt.org's certificate, issued by `/C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./OU=http://certs.starfieldtech.com/repository//CN=Starfield Secure Certificate Authority - G2':
  Unable to locally verify the issuer's authority.
WARNING: certificate common name `www.openwrt.org' doesn't match requested host name `downloads.openwrt.org'.
HTTP request sent, awaiting response... 200 OK
Length: 3342748 (3.2M) [application/octet-stream]
Saving to: `openwrt-ar71xx-generic-ubnt-unifi-squashfs-factory.bin'

100%[=========================================>] 3,342,748    120K/s   in 29s

2016-02-21 01:16:28 (113 KB/s) - `openwrt-ar71xx-generic-ubnt-unifi-squashfs-factory.bin' saved [3342748/3342748]

BZ.v3.2.6#

So, I rename the file to "/tmp/fwupdate.bin" as must be done, and start "syswrapper":

BZ.v3.2.6# mv openwrt-ar71xx-generic-ubnt-unifi-squashfs-factory.bin /tmp/fwupdate.
bin
BZ.v3.2.6# syswrapper.sh upgrade2
+ exec

The connection falls, but the AP is still on (IP 192.168.11.2 on my network):

luis@Midnighter:~$ sudo ping 192.168.11.2
[sudo] password for luis:
PING 192.168.11.2 (192.168.11.2) 56(84) bytes of data.
64 bytes from 192.168.11.2: icmp_seq=1 ttl=64 time=0.459 ms
64 bytes from 192.168.11.2: icmp_seq=2 ttl=64 time=0.197 ms
^C
--- 192.168.11.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.197/0.328/0.459/0.131 ms
luis@Midnighter:~$ nmap 192.168.11.2

Starting Nmap 7.01 ( https://nmap.org ) at 2016-02-20 23:20 CET
Nmap scan report for 192.168.11.2
Host is up (0.00036s latency).
All 1000 scanned ports on 192.168.11.2 are closed

Nmap done: 1 IP address (1 host up) scanned in 0.31 seconds
luis@Midnighter:~$

After waiting 1-2 minutes (maybe the AP is still installing anything in background?), I power off the device 1 minute, power it on again, but IP (must be now 192.168.1.1 according to the OpenWRT Wiki) keeps the same, and I still can SSH login with the same data I had before (no "new host key" message when connecting, as it should) :

login as: admin
admin@192.168.11.2's password:


BusyBox v1.11.2 (2014-09-30 11:56:14 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

BZ.v3.2.6#

Tested with the images:

https://downloads.openwrt.org/barrier_b … actory.bin
https://downloads.openwrt.org/chaos_cal … actory.bin

Could anyone give some ideas, please?
Why did it work fine with the other UniFi AP?

Further data:
- Prior to accessing the UniFi, I needed to install the (damned) Ubiquiti Controller software :-P , in order to give the device some basic config, like user/password so I could login via SSH. The process was performed in both cases from the same computer (Windows portable) and I think configuration was just the same (WiFi name, password, DHCP client for RJ45... etc).

boolsheat wrote:

Ubiquiti following TP link? Read more here:
https://forum.openwrt.org/viewtopic.php?id=62827

Well... maybe not: it seems I have succeeded in sending the v14 .bin file via TFTP.
But I couldn't tell for sure, because right now:
- The LED light ring stays orange (not blinking)
- The device gets IP (via DHCP) on RJ45.
- The only port that seems to be open is the 22 TCP (SSH), but I can not guess what user/password is.
- No telnet access nor http/https.

Bricked?
Any suggestions about login data for SSH?

Extra info:

luis@Midnighter:~/Temporal/UniFiAP$ netcat -v 192.168.11.2 22
192.168.11.2: inverse host lookup failed: Unknown host
(UNKNOWN) [192.168.11.2] 22 (ssh) open
SSH-2.0-dropbear_2013.59
u▒▒▒^▒▒B[▒~F▒[▒Pdiffie-hellman-group1-sha1,diffie-hellman-group14-sha1,kexguess2@matt.ucc.asn.aussh-rsa,ssh-dss=aes128-ctr,3des-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes256-cbc=aes128-ctr,3des-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes256-cbchmac-sha1,hmac-md5hmac-sha1,hmac-md5nonenoneT#>p▒▒M▒

On the correctly flashed UniFi AP :

luis@Zarzamoro:~$ netcat -v 192.168.0.231 22
192.168.0.231: inverse host lookup failed: Unknown host
(UNKNOWN) [192.168.0.231] 22 (ssh) open
SSH-2.0-dropbear_2014.63
37▒▒<Q▒▒▒k▒▒▒Pdiffie-hellman-group1-sha1,diffie-hellman-group14-sha1,kexguess2@matt.ucc.asn.aussh-rsa,ssh-dss=aes128-ctr,3des-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes256-cbc=aes128-ctr,3des-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes256-cbchmac-sha1,hmac-md5hmac-sha1,hmac-md5nonenone▒▒▒▒#@

So there is some SSH server listening, but the correct one is a bit more recent.

Data found:

login: ubnt
password: ubnt

Too obvious X-D .

All right, sumarizing: The Ubiquiti UniFi AP ignores any attempt to flash it, whether be it via "syswrapper" or TFTP. Case of TFTP the device reverts to its default values.

If nobody has any suggestion, I will have to consider it as including that sort of limitation on
firmware (locked-down for custom user updates).

Maybe the upgrade could be done via serial cable, if anyone knows about?

Tested with a second just bought UniFi AP with same results.

I had a heap of trouble trying to flash a couple of Unifi uaps(firmware 3.26) following the wiki and bricked 2 before I stopped. I used the recovery from ubnt to recover them and used firmware V3.29
https://help.ubnt.com/hc/en-us/articles … cess-point

After they came back up I placed the openwrt-ar71xx-generic-ubnt-unifi-squashfs-factory.bin in /tmp then ran this syswrapper command and all went smoothly.

mv /tmp/openwrt-ar71xx-generic-ubnt-unifi-squashfs-factory.bin /tmp/fwupdate.bin
cd /tmp
nohup syswrapper.sh upgrade2

I've updated the wiki with this too.

webtron wrote:

I had a heap of trouble trying to flash a couple of Unifi uaps(firmware 3.26) following the wiki and bricked 2 before I stopped. I used the recovery from ubnt to recover them and used firmware V3.29
https://help.ubnt.com/hc/en-us/articles … cess-point

After they came back up I placed the openwrt-ar71xx-generic-ubnt-unifi-squashfs-factory.bin in /tmp then ran this syswrapper command and all went smoothly.

mv /tmp/openwrt-ar71xx-generic-ubnt-unifi-squashfs-factory.bin /tmp/fwupdate.bin
cd /tmp
nohup syswrapper.sh upgrade2

I've updated the wiki with this too.

Thanks for the info, Webtron. I will give it a try.
My 2 UniFI APs did not brick. Just the behavior described, but no bricking at all.
A question, please:

- Did you had the same problem with the UniFi APs described at the beginning of this post?

Not exactly but i was flashing using

fwupdate.real -m openwrt-ar71xx-generic-ubnt-unifi-squashfs-factory.bin -d

from the wiki and it was failing to write to the mtd3 which was rootfs.

Working(2) with block: /dev/mtd3
Unlocking /dev/mtd3(rootfs) ...
Unlocking device failed: ioctl(MEMUNLOCK): Operation not supported

I used to be able to flash unifi this way because I keep notes and that's how I had been flashing the odd 1 or 2.
It had me stumped for a while because I'd flashed 20 out of the same carton(V3.26 same as yours) only a month ago and they went fine. I'd used a script to autoflash those 20 so I checked what commands I'd used in the script and those are the commands I've posted.
Ubiquity seems actively discouraging anyone putting Openwrt on their Airmax gear and looks like this may be similar.

This is from a ubnt forum

    For changing to v2: syswrapper.sh upgrade2

    For changing to v3 (and beyond): nohup syswrapper.sh upgrade2

Sorry for reviving an old thread.
As much as id like to say that "nohup syswrapper.sh upgrade2" worked for the UAP-LRv2, ive been struggling with flashing the firmware over ubnt original firmware.  I type cat nohup and i see the error output:
"Invalid version 'BZ.ar934x.v6.0.0-OpenWrt-rxxx.xxx"


Im starting to think ubiquiti has locked down the devices from custom flashing. this device is VERSION 2 aka model UAP-LRv2 and has firmware 3.x.x

Please, if someone can help with this issue, id highly appreciate it.

(Last edited by MyelvR on 7 May 2017, 20:13)

Sopalajo de Arrierez wrote:

Thanks for the info, Webtron. I will give it a try.

With my UniFi AP everything worked fine.
But now I don't remember what was its version (it is now on the ceiling on a remote building, and I don't know for sure if the original box still remains), to tell you. If you wanna know, and could tell me how to get this info, please write down the method.

MyelvR wrote:

Sorry for reviving an old thread.
As much as id like to say that "nohup syswrapper.sh upgrade2" worked for the UAP-LRv2, ive been struggling with flashing the firmware over ubnt original firmware.  I type cat nohup and i see the error output:
"Invalid version 'BZ.ar934x.v6.0.0-OpenWrt-rxxx.xxx"


Im starting to think ubiquiti has locked down the devices from custom flashing. this device is VERSION 2 aka model UAP-LRv2 and has firmware 3.x.x

Please, if someone can help with this issue, id highly appreciate it.

We are too - and we have had an unofficial that Ubiquiti are indeed actively blocking the install of 3rd party Firmware in the UAP V2.  Officially, they refuse to confirm or deny it.

We will be opening one up and connecting to it to watch the process and confirm tomorrow.

The discussion might have continued from here.