Unifi Conroller in einer Freebsd Jail installieren

APs zum Conroller hinzuf├╝gen

ssh ip-of-ap -l ubnt
#passwort ubnt

marc@thinkpad:~$ ssh ip-of-ap -l ubnt

ubnt@ip-of-ap's password: 


BusyBox v1.11.2 (2012-02-24 08:52:11 PST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

BZ.v2.2.5# mca-cli
UniFi# set-inform http://ip-of-controller:8080/inform

Nun wird der AP von Controller gefunden

Unifi AP unbrick

Serial access

serial: 1N8,115200

GND <----> GND
SOUT <---> RX
SIN <----> TX

find suitable firmware

example from controller v3.1.9:

# cat UniFi/dl/firmware/bundles.json
{
'U2L48': {'path': 'U2S48/3.1.9.2442/firmware.bin', 'version': '3.1.9.2442', 'display': 'UniFi AP48-LR'}, 
'p2N': {'path': 'BZ2/3.1.9.2442/firmware.bin', 'version': '3.1.9.2442', 'display':     'PicoStation M2'},
'U2S48': {'path': 'U2S48/3.1.9.2442/firmware.bin', 'version': '3.1.9.2442', 'display': 'UniFi AP48'}, 
'U2O': {'path': 'BZ2/3.1.9.2442/firmware.bin', 'version': '3.1.9.2442', 'display':     'UniFi AP-Outdoor'},
'BZ2LR': {'path': 'BZ2/3.1.9.2442/firmware.bin', 'version': '3.1.9.2442', 'display':   'UniFi AP-LR'}, 
'U2HSR': {'path': 'U2S48/3.1.9.2442/firmware.bin', 'version': '3.1.9.2442', 'display': 'UniFi AP-Outdoor+'},
'U5O': {'path': 'BZ2/3.1.9.2442/firmware.bin', 'version': '3.1.9.2442', 'display':     'UniFi AP-Outdoor 5G'},
'U7O': {'path': 'U7E/3.1.9.2442/firmware.bin', 'version': '3.1.9.2442', 'display':     'UniFi AP-AC Outdoor'},
'U7E': {'path': 'U7E/3.1.9.2442/firmware.bin', 'version': '3.1.9.2442', 'display':     'UniFi AP-AC'}, 
'U7Ev2': {'path': 'U7E/3.1.9.2442/firmware.bin', 'version': '3.1.9.2442', 'display':   'UniFi AP-AC v2'}, 
'U7P': {'path': 'U7P/3.1.9.2442/firmware.bin', 'version': '3.1.9.2442', 'display':     'UniFi AP-Pro'}, 
'BZ2': {'path': 'BZ2/3.1.9.2442/firmware.bin', 'version': '3.1.9.2442', 'display':     'UniFi AP'}
}

uboot error

tftp upload failed with: Firmware check failed! (-5)

ar7240> urescue
Setting default IP 192.168.1.20
Starting TFTP server...
Using eth0 (192.168.1.20), address: 0x81000000
Waiting for connection: -
Receiving file from 192.168.1.2:50882
Received 5418141 bytes
Firmware Version: BZ.ar7240.v2.3.9.1693.121221.1336
mtdparts variable not set, see 'help mtdparts'
Firmware check failed! (-5)
...

The solution was to run **mtdparts default** before urescue

load firmware via tftp

marc@thinkpad-a:~$ sudo ip a add 192.168.1.2/24 dev eth0
marc@thinkpad-a:~$ tftp 192.168.1.20
tftp> bin
tftp> put firmware.bin
Sent 5418141 bytes in 3.3 seconds
tftp> quit
marc@thinkpad-a:~$