Installing OpenWrt on UniFi nanoHD

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.

so whats the current state for running openwrt on nanoHD?

Would really like to do that, but want it to be stable and revertible if needed.

I currently run it in 2 NanoHD devices. It is being 14 days of uptime since my latest update (I'm running master branch for personal reasons).

You can revert to original firmware whenever you want via TFTP.

1 Like

So do i really need serial access and have to open the device? I have an usb serial adapter so no problem.

If your UBoot is locked, yes, that's the only way.

well its on the latest official firmware, so would expect it to be locked.

any hints/videos/fotos on how to exactly open this thing up? can i put i pack together affter that? or does it need some glue etc to fit it all pack together.

thanks! will probably attempt this soon

Nothing fancy, as I explained I used a Swiss knife and some mobile repairing tools to pry open my two units. The two pieces clamp back, there is no need to use glue after opening them.

ok got it working only by downgrading and installing as in the commit mentioned. works flawless so far.

unfortunately i cant acces the webinterface/ssh anymore, but AP is working. probably needs a static ip?

besides that, i read and saw on my device i cant use higher 5ghz channels withing DFS range.

so 124 is not possible ?

cheers

Just connect to it directly with a cable and enable DHCP in your cable, sure your AP is running on 192.168.1.1, otherwise, yes configure your client with an static IP.

To ensure you have your country's 5 GHz properly configure it in your AP, see below:

Currently my network is running in channel 157, see below:

BTW, here, 124 is available to use within DFS range and was working for me when I used DFS channel 108.

Thanks will check country settings. Regarding no web gui, it worked fine with direct lan cable connection to my MacBook. I meant I would like to see the luci web interface when it is connected to my main router.

Yeah, sure it is the IP then. Make sure you assign a static one, I know I'm stating something obvious but if your router is 192.168.1.1 just set the AP to 192.168.1.2 and make sure no other device is using it.

And, if you are configuring the AP as a dump AP, disable dnsmasq, odhcpd and firewall. And, please, make sure it is your router the only one serving IPs in your network, not the AP.

2 Likes

Hi,

sorry to resurrect, but need advice on flashing nanohd with openwrt

managed to tftp to 3.9.27, can ssh with ubnt default account

openwrt-22.03.0-rc6-ramips-mt7621-ubnt_unifi-nanohd-squashfs-sysupgrade.bin: No such file or directory
UBNT-BZ.v3.9.27#

what could i be doing wrong?

Thankyou

update: managed to work it out, using first post from david, used winscp to copy openwrt sysupgrade to tmp, then ssh'd in ran commands in the post and then rebooted, worked!

1 Like

Could be one or more of these:

  • Using the wrong file. The factory file is used for initial install, not sysupgrade.
  • Didn't push the file to the router using scp first.
  • Didn't cd to /tmp, where the file should have been placed.