Installing OpenWrt on UniFi nanoHD

Not in my case, as I was aware of the link being wrong, so I downloaded the correct one since the beginning. I think it has to do with my U-Boot being upgraded and installing such an old version is not allowed.

What performance issues you had with the original firmware you plan to fix with OpenWrt? Works pretty decent here:

5Ghz

@grim$ ➜  ~ iperf3 -c openwrt.lan -R           
Connecting to host openwrt.lan, port 5201
Reverse mode, remote host openwrt.lan is sending
[  7] local 192.168.1.189 port 56563 connected to 192.168.1.1 port 5201
[ ID] Interval           Transfer     Bitrate
[  7]   0.00-1.00   sec  61.5 MBytes   516 Mbits/sec                  
[  7]   1.00-2.00   sec  84.0 MBytes   705 Mbits/sec                  
[  7]   2.00-3.00   sec  81.7 MBytes   686 Mbits/sec                  
[  7]   3.00-4.00   sec  83.5 MBytes   700 Mbits/sec                  
[  7]   4.00-5.00   sec  82.8 MBytes   695 Mbits/sec                  
[  7]   5.00-6.00   sec  79.9 MBytes   670 Mbits/sec                  
[  7]   6.00-7.00   sec  84.8 MBytes   711 Mbits/sec                  
[  7]   7.00-8.00   sec  81.7 MBytes   685 Mbits/sec                  
[  7]   8.00-9.00   sec  82.9 MBytes   695 Mbits/sec                  
[  7]   9.00-10.00  sec  82.3 MBytes   690 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  7]   0.00-10.01  sec   808 MBytes   677 Mbits/sec  273             sender
[  7]   0.00-10.00  sec   805 MBytes   675 Mbits/sec                  receiver

iperf Done.

2.4Ghz

@grim$ ➜  ~ iperf3 -c openwrt.lan -R
Connecting to host openwrt.lan, port 5201
Reverse mode, remote host openwrt.lan is sending
[  7] local 192.168.1.189 port 56603 connected to 192.168.1.1 port 5201
[ ID] Interval           Transfer     Bitrate
[  7]   0.00-1.00   sec  9.88 MBytes  82.8 Mbits/sec                  
[  7]   1.00-2.00   sec  11.4 MBytes  95.6 Mbits/sec                  
[  7]   2.00-3.00   sec  11.4 MBytes  96.0 Mbits/sec                  
[  7]   3.00-4.00   sec  11.4 MBytes  95.9 Mbits/sec                  
[  7]   4.00-5.00   sec  11.5 MBytes  96.4 Mbits/sec                  
[  7]   5.00-6.00   sec  11.5 MBytes  96.4 Mbits/sec                  
[  7]   6.00-7.00   sec  11.6 MBytes  97.2 Mbits/sec                  
[  7]   7.00-8.00   sec  11.4 MBytes  95.8 Mbits/sec                  
[  7]   8.00-9.00   sec  11.3 MBytes  95.1 Mbits/sec                  
[  7]   9.00-10.00  sec  11.4 MBytes  95.2 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  7]   0.00-10.01  sec   116 MBytes  97.1 Mbits/sec   44             sender
[  7]   0.00-10.00  sec   113 MBytes  94.6 Mbits/sec                  receiver

iperf Done.

Official firmware used to do about 800Mbit as I recall, it reduced to 700 then 600 seemingly as the firmware updates came out.

Now of course it might not have been a firmware issue at all, just environmental, but I prefer OpenWRT anyway as I hated running the bloated Unifi Controller. Also how common it is for Ubiquiti to break things, OpenWRT is usually a lot better tested.

Of course the point is moot if I can't even get 5Ghz to work at all. :wink:

1 Like

Yeah for me is more about fighting buffer bloat. I can't use ethernet cable and I have to connect wirelessly an additional AP upstairs. I thought like trying to see if OpenWrt can help a bit with it. I'm not sure, tho'.

There we go, apparently leaving country code in "driver default" disabled DFS. Switched it to GB and its now working, rookie error. Not getting a good link rate though, need to fiddle with the channels.

For the record, on channel 36 at 80Mhz I was getting a respectable 400Mbit down, 120Mbit up but I need to use DFS channels to get 160Mhz.

400 Mbit/s sounds about right for a 2x2 MIMO device. My iperf was utilising a 3x3 MIMO device and an 80 Mhz wide channel, nothing fancy.

@tmomas, sorry mate, I think these last messages should go in the new thread you splited this into Performance of UniFi nanoHD

Agreed, and to be fair once I can get a WiFi 6e AP then 400Mbit would be fine for where I will move the nanoHD to.

I've been using an Honor Router 3 for my fastest clients but had kinda hoped I could get 800Mbit back on the nanoHD so I can stop using that as it blocks some LAN traffic.

So it seems 160Mhz is broken, I've only managed to get it to come up on channel 36 and its slower than 80Mhz only able to do 300Mbit.

However 80Mhz on channel 52 I managed to hit 525Mbit down on my phone, so DFS at least in some fashion is working.

Interestingly my laptop was able to hit 600Mbit down and 336Mbit up using an Intel AX210. Very curious, as on stock firmware my phone (Galaxy S10) would always work much better than my laptop.

Probably not broken. Worst link quality and more noise, as expected with such a wide channel, do not forget that doubling the channel width decreases your signal strength by 30% (-3 dB) hence lower MCS and lower throughput, that not considering the additional noise as I said. I hope you live in an isolated farm in the bushes, otherwise is a mistake going with 160 Mhz channel width!

Its broken as it wont come up on higher channels where it was able to do 600Mbit on stock firmware.

That said, I did another check on my phone on 80Mhz with iperf3 this time and it goes 380Mbit down, 500Mbit up. Before I wasn't using iperf as I've found it a bit quirky, it can produce both lower and higher results than real-world so I prefer LibreSpeed running on my server via the browser.

LibreSpeed on my laptop (Linux) shows 662Mbit down (saw a peak to 700), 590Mbit up, that's honestly not bad for 80Mhz, I'm sure the stock firmware wasn't that fast. Looks like my mums phone is getting a higher link rate upstairs than I've seen before too.

Its only doing 494 down, 419 up in Windows though vs the Honor Router that does just hit 909 Down for the first time ever and 442 up (channel 100 80Mhz WiFi6). Iperf3 shows much slower, which is why I don't trust it as copying a file off my NAS mostly did over 100MB/s confirming LibreSpeed was correct.

I am interested to bring up a mesh network together with the UniFi nanoHD. I wonder if mesh network is supported by the driver. Can someone call iw list command and post the output here?

iw list | grep "Supported interface modes" -A 9

Hi,

I tried again but even using the version on the link I can't downgrade.

nanoHD-BZ.5.63.0# fwupdate.real -m fwupdate.bin
Invalid version 'BZ.mt7621.v3.9.27.8537.180317.1220'

I bought my nanohd on june/21 using firmware 5.63

Maybe factory reset it's the key.

Sadly I think manufacture date is the key. People who bought one recently and flashed it I suspect got old stock.

1 Like
    Supported interface modes:
             * IBSS
             * managed
             * AP
             * AP/VLAN
             * monitor
             * mesh point
             * P2P-client
             * P2P-GO
    Band 1:

    Supported interface modes:
             * IBSS
             * managed
             * AP
             * AP/VLAN
             * monitor
             * mesh point
             * P2P-client
             * P2P-GO
    Band 1:

Really hoping someone can help me out here.

I followed the directions - first factory resetting and then downleveling to v3.9.27 via TFTP:

tftp> connect 192.168.1.20 
tftp> binary 
tftp> rexmt 1 
tftp> timeout 60 
tftp> put /srv/tftp/BZ.mt7621.v3.9.27.8537.180317.1220.bin

Logged in via SSH and confirmed things:

UBNT-BZ.v3.9.27# info

Model:       UAP-nanoHD
Version:     3.9.27.8537
MAC Address: 74:83:c2:72:27:0e
IP Address:  192.168.144.3
Hostname:    UBNT
Uptime:      251 seconds

UBNT-BZ.v3.9.27# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00060000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "Factory"
mtd3: 00010000 00010000 "EEPROM"
mtd4: 00010000 00010000 "bs"
mtd5: 00100000 00010000 "cfg"
mtd6: 00f30000 00010000 "kernel0"
mtd7: 00f30000 00010000 "kernel1"

Obtained the "initramfs" version as suggested by the Firmware Selector for first-time install and SCP'd it to the AP:

UBNT-BZ.v3.9.27# ls -al /tmp/openwrt-21.02.0-ramips-mt7621-ubnt_unifi-nanohd-initramfs-kernel.bin 
-rw-r--r--    1 ubnt     root       4936021 Sep 22 19:21 /tmp/openwrt-21.02.0-ramips-mt7621-ubnt_unifi-nanohd-initramfs-kernel.bin
UBNT-BZ.v3.9.27# sha256sum /tmp/openwrt-21.02.0-ramips-mt7621-ubnt_unifi-nanohd-initramfs-kernel.bin 
a5b28fe90239d7b529cc701ef299120b75fc6b90304e7a8d775fd5875e1cddab  /tmp/openwrt-21.02.0-ramips-mt7621-ubnt_unifi-nanohd-initramfs-kernel.bin

Wrote the upgrade to the partitions:

UBNT-BZ.v3.9.27# dd if=/tmp/openwrt-21.02.0-ramips-mt7621-ubnt_unifi-nanohd-initramfs-kernel.bin of=/dev/mtdblock6
9640+1 records in
9640+1 records out
UBNT-BZ.v3.9.27# dd if=/tmp/openwrt-21.02.0-ramips-mt7621-ubnt_unifi-nanohd-initramfs-kernel.bin of=/dev/mtdblock7
9640+1 records in
9640+1 records out
UBNT-BZ.v3.9.27# reboot

and following reboot of the NanoHD and a steady blue light, my PC can see the AP:

$ arp -v 192.168.1.1
Address                  HWtype  HWaddress           Flags Mask            Iface
_gateway                 ether   74:83:c2:72:27:0e   C                     enp0s3
Entries: 3      Skipped: 2      Found: 1

But I cannot ping, SSH or HTTP to the device.

What did I do wrong?

Replying to my own, I did re-do the entire sequence with the full "squashfs" file, still no joy.

Your AP is on the IP 192.168.1.1/24 - you have to configure a static IP on your laptop - such as 192.168.1.2/24 and then plug that into the Ethernet cable coming out of your PoE injector.

After that, you'll be able to access the HTTP interface.

I would like to provide an update, as I was able to flash OpenWrt in two of my pesky (U-boot locked) NanoHDs. I was able to open both utilising a Swiss knife (found they are sonic welded so not much damage done) and some mobile prying tools. Installed v3.9.27 but as said it blocks your access to SSH after booting. What I ended doing was pulling in the sysupgrade image using curl and a HTTP server in my Mac connected by Ethernet cable to the AP. The trick here is the serial interface connected to AP J2 serial's UART (as seen in the picture).

It was a pain but finally!

Now I cannot mesh the two together. :frowning:

Hi,
I opened my device too since I got the invalid version error too when I try to firmware downgrade to v3.9.27 When over the serial connection I get the router into tftp boot mode but whenever I load the v3.9.27 image the AP does not boot it automatically. Over the serial line I just see that the image is loaded into the memory. Anyone knows how I can manually boot the image with U-boot?

Yes, I can help. So once you install 3.9.27 in your device and it reboots, just open your serial console, you will download from there your new sysupgrade image.

Putting it step by step (more or less):

  1. Download the sysupgrade image in the same directory you will be running your HTTP server.
  2. Install a simple HTTP server, I chose Python's SimpleHTTPServer.
  3. Change your LAN IP to something like 192.168.1.66.
  4. Connect your LAN cable to your Unifi Nano HD.
  5. Run your http server python -m SimpleHTTPServer 1313.
  6. Open your serial console and download sysupgrade image using curl.
  7. And, finally use the instructions to flash your sysupgrade using dd.

Let me know if you need more detail.