[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-115547":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":17,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":9,"pushedAt":23,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":14,"starSnapshotCount":14,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},115547,"unifi-openwrt","antoniocosta\u002Funifi-openwrt","antoniocosta","OpenWrt access points as UniFi access points",null,"Go",153,12,1,0,9,71,36,88.44,"GNU General Public License v2.0",false,"main",[],"2026-11-23 17:27:18","2026-11-23 09:19:29","# unifi-openwrt: OpenWrt access points as UniFi access points\n\nKeep your old **OpenWrt** access point useful in a **UniFi** network, long after its maker stopped\nsupporting it. A small daemon on the AP speaks the UniFi inform protocol, so a UniFi controller adopts\nthe AP as a UniFi model of your choice (default: UAP-AC-Pro, `U7PG2`), pushes its settings to it, and\nshows its clients, radios and stats like those of its own APs: one network, one place to manage it.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fimages\u002Funifi-topology.gif\" alt=\"An OpenWrt access point in the UniFi topology view, shown as a UniFi AP\" width=\"329\">\n\u003C\u002Fp>\n\nIf you like this or find it useful, support the project by buying me a coffee.\n\n\u003Ca href=\"https:\u002F\u002Fwww.buymeacoffee.com\u002Fantoniocosta\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fcdn.buymeacoffee.com\u002Fbuttons\u002Fv2\u002Fdefault-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 40px !important;width: 140px !important;\" >\u003C\u002Fa>\n\n## Why this repo exists\n\nI own a Google OnHub (TP-Link TGR1900). It is still a capable 3x3 Wi-Fi 5 access point, but Google\nended its support in January 2023: no more updates, no more management through its app, and the\nadvice to recycle it. OpenWrt brings the software back up to date. My home network, though, is\nUniFi, and a UniFi controller only manages Ubiquiti's own access points, so the OnHub would have\nstayed a second network with its own settings, its own clients and no roaming between the two. I\ndon't accept that working hardware should become e-waste, or a second-class citizen in a network,\nbecause its maker moved on.\n\nSo this repo does two things:\n\n- **It brings OpenWrt access points into UniFi.** The AP is adopted, configured and monitored from\n  the same controller as the Ubiquiti APs: Wi-Fi settings, clients, stats, roaming hints, guest\n  portal, VLANs, even meshing when its cable is out. Whatever the hardware can't do is clamped and\n  logged, and every change rolls back by itself if the Wi-Fi doesn't come up.\n- **It documents.** How the protocol, the settings and the stats work is written up in\n  [docs\u002Finternals.md](docs\u002Finternals.md), so it can be checked, ported to other devices, or carried\n  on by anyone.\n\n> **Tested on two devices only.** Everything here was tested on a single\n> TP-Link OnHub (TGR1900) running OpenWrt 25.12, adopted as a UAP-AC-Pro\n> into UniFi Network 10.6 on a UniFi Express 7. A contributor\n> ([@dohun0310](https:\u002F\u002Fgithub.com\u002Fdohun0310)) runs it on a Linksys LN1301\n> (MX4300) adopted as a U6-IW, and added and tested the wired clients and\n> in-wall port numbering there. Other OpenWrt devices, other UniFi models and\n> other controller versions are **best effort**: they may work, they have not\n> been tried. Reports are welcome.\n\n**It never applies Ubiquiti firmware.** Upgrade requests from the controller\nare answered and ignored; Ubiquiti firmware would brick a non-Ubiquiti\ndevice.\n\n## Setup: point it at your AP, pick a model, click Adopt\n\n1. **Install the package** (OpenWrt 25.12+): build it with `tools\u002Fbuild.sh`\n   and `tools\u002Fmkapk.sh` (see [docs\u002Fpackaging.md](docs\u002Fpackaging.md)), copy\n   the `.apk` for your AP's architecture (`cat \u002Fetc\u002Fapk\u002Farch`) to the AP and run\n   `apk add --allow-untrusted .\u002Funifi-openwrt_*.apk`. Then go to step 3.\n   The package does not swap a basic `wpad` for the full one: it prints the\n   command if you have the basic one.\n\n   **Or** run `tools\u002Fbuild.sh` and copy `dist\u002Fopenwrt\u002F` (with `bin\u002F`, `files\u002F` and `install.sh`) to the\n   AP, for example to `\u002Ftmp\u002Fuow`, and use the installer (older OpenWrt with\n   opkg works too).\n2. **Install** with the installer (skip this with the package):\n\n   ```sh\n   cd \u002Ftmp\u002Fuow && sh install.sh\n   ```\n\n   The installer checks free flash, replaces a basic `wpad` with the full\n   one from the package feed (and restores it on failure), adds the packages\n   listed under [Requirements](#requirements), installs `\u002Fusr\u002Fbin\u002Fuow`,\n   `\u002Fetc\u002Finit.d\u002Funifi-openwrt` and `\u002Fetc\u002Fconfig\u002Funifi-openwrt` (an existing\n   config is kept), and prints the closest UniFi models.\n3. **Pick a model.** `uow -models` lists all of them; `uow -ap local\n   -suggest` ranks them for this AP (same bands, then Wi-Fi generation, then\n   streams). `U7PG2` is the only one with measured capability data.\n4. **Configure** `\u002Fetc\u002Fconfig\u002Funifi-openwrt`:\n\n   ```sh\n   uci set unifi-openwrt.main.model='U7PG2'\n   uci set unifi-openwrt.main.inform_url='http:\u002F\u002F\u003Ccontroller IP>:8080\u002Finform'\n   uci set unifi-openwrt.main.apply='0'     # log-only at first (see Safety)\n   uci set unifi-openwrt.main.enabled='1'\n   uci commit unifi-openwrt\n   \u002Fetc\u002Finit.d\u002Funifi-openwrt enable\n   \u002Fetc\u002Finit.d\u002Funifi-openwrt start\n   ```\n\n   The inform URL needs an IP address, not a host name. Other options in the\n   file: `hostname`, `profile_caps`, `locate_beep`, `mesh_uplink`,\n   `ssh_port` (adoption SSH responder, default 2222), `hw_caps`,\n   `inform_every`, `led_idle`, `uplink_port` (the port that is always the\n   uplink, e.g. `wan`).\n5. **Adopt.** The AP shows up in the UniFi as pending adoption, with the\n   chosen model's name. Click Adopt.\n6. **Watch the log:** `logread -e uow`. It shows the adoption, every plan of\n   changes, what was applied, clamped or skipped, and each rollback.\n   When the plans look right, set `apply '1'` and restart the service.\n\nTo stop managing the AP: Remove it in the UniFi (the daemon goes back to\npending; OpenWrt and its Wi-Fi are not reset), then\n`\u002Fetc\u002Finit.d\u002Funifi-openwrt disable; \u002Fetc\u002Finit.d\u002Funifi-openwrt stop`.\n\n## What works\n\nTested live on the device above unless marked otherwise.\n\n| UniFi feature | Status |\n|---|---|\n| Adoption, Remove, adopt again | works (SSH and inform-reply adoption) |\n| Firmware update | answered, **never applied**: nothing is downloaded; the offered version is reported so the controller stops asking (never offered in testing) |\n| Clients as wireless clients of the AP, with signal, rates, channel width | works |\n| Radio and VAP stats, channel use, interference, history graphs, CPU and memory | works |\n| Live updates (1 s informs while the panel is open) | works |\n| Wi-Fi experience (satisfaction) | partial: PHY-rate and retry sub-scores, as the firmware computes them ([details](docs\u002Finternals.md#unifi-ap-satisfaction--wifi-experience-score-how-it-is-computed)) |\n| Ethernet ports in the device panel | works (Port Manager; an AC Pro has no port squares) |\n| Wired clients on the AP's LAN ports | tested by a contributor on a Linksys LN1301 adopted as a U6-IW, not on the OnHub; in-wall models only (U6-IW and the others with the `ACCESS_POINT_SWITCH` feature) |\n| Radios: channel, width, transmit power, country | works |\n| Indoor \u002F Outdoor | works (Country IE environment) |\n| Minimum RSSI, load balancing (max clients) | works |\n| WLANs: SSID, password, WPA2, WPA3, WPA2\u002FWPA3, PMF, hidden, client isolation, U-APSD, DTIM | works (WPA3-only untested live) |\n| WPA-Enterprise (RADIUS), Enhanced Open (OWE), WEP, private pre-shared keys | not built: such a WLAN is left off, never opened with other security |\n| MAC filter (allow \u002F deny) | works |\n| 802.11k, 802.11v | works; needs the full `wpad`. The neighbour list is built from the AP's own scans: its own other-band BSSes and the same SSID on other APs of the LAN, genuine UniFi APs included |\n| 802.11r (fast transition) | switched on with OpenWrt's defaults, **untested live**. No key exchange with genuine UniFi APs, so a client moving between the two does a normal reconnect ([rrb-unifi](https:\u002F\u002Fgithub.com\u002Fd-malinowski\u002Funifi-openwrt-roaming) adds that exchange) |\n| Band steering | works (usteer, local mode) |\n| Minimum data rates | clamped: applied per radio, only when every WLAN on that radio asks for it |\n| WLAN schedules | works (enforced on the AP) |\n| Rate limits (user groups) | works (tc shaping; nftables policing without tc) |\n| Guest WLAN: isolation, guest DNS | works |\n| Guest portal (hotspot) | works |\n| VLANs (WLAN on a tagged network) | works |\n| Block, Unblock, Reconnect | works (immediate with `hostapd-utils`) |\n| Locate, LED on\u002Foff, Restart | works; Locate beeps on APs with a speaker |\n| LED colour and brightness | built, **untested live**: only offered when `hw_caps` is claimed (not on the AC Pro) |\n| Disable device | works |\n| IP settings (DHCP \u002F static) | works; a static address other than the current one is refused |\n| Device SSH authentication | works (extra login, root untouched) |\n| NTP server, timezone | works |\n| Remote syslog, including UniFi's encrypted syslog | works |\n| SNMP v1\u002Fv2c | works; SNMPv3 not built (OpenWrt's snmpd is built without SSL) |\n| RF scan, neighbour scan, rogue AP list | works (a spare radio is used when there is one) |\n| Mesh: wireless uplink when the cable is out | works; never cable and mesh at once |\n| Mesh Parent (choose the uplink AP) | built, **untested live** |\n| Serving mesh children, VLANs over mesh | not built |\n| Debug terminal, Support file | not built |\n| LLDP neighbours (what is on the other end of each cable) | works with the optional `lldpd` package, which also announces the AP to the switch: the controller then takes the AP's uplink from LLDP. lldpd must listen on the Ethernet ports themselves: `uci add_list lldpd.config.interface=lan1` (your port names), `uci commit lldpd`, `\u002Fetc\u002Finit.d\u002Flldpd restart` |\n| Discovery broadcast (the AP showing up by itself, before it has the controller's address) | not built: the AP is given the address. A controller that finds a device this way adopts it by logging in on its SSH port 22 as `ubnt`, which this project leaves alone |\n| DFS radar events | not built |\n\nTechnical notes for contributors are in [docs\u002F](docs\u002F):\n[docs\u002Finternals.md](docs\u002Finternals.md): protocol, config translation, stats,\nthe satisfaction formula, models and profiles, LED, mesh, VLANs, guest\nportal and RF scan.\n\n## Requirements\n\n- OpenWrt with `apk` or `opkg` (tested: 25.12). The daemon is a static Go\n  binary of 8-10 MB: APs with 16 MB of flash usually do not have room.\n- **Full wpad** (`wpad-mbedtls`, `wpad-wolfssl` or `wpad-openssl`) instead of\n  `wpad-basic-*`: needed for 802.11k\u002Fv and the runtime deny\n  list. Install it from the package feed; check with `--simulate` before\n  removing the basic one.\n- `hostapd-utils` (immediate block\u002Funblock), `kmod-nft-bridge` (guest\n  isolation).\n- Optional: `usteer` (band steering), `tc-tiny`, `kmod-sched-core`,\n  `kmod-sched`, `kmod-ifb` (rate-limit shaping), `snmpd` (SNMP),\n  `alsa-utils` (Locate beep), `lldpd` (LLDP neighbours).\n- A UniFi controller on the same network that the AP can reach on port\n  8080, and that can reach the AP's adoption SSH port (default 2222).\n\n## Safety design\n\n- **Log-only mode**: with `apply '0'` (flag: no `-apply`) the daemon only logs\n  the changes it would make.\n- **Automatic rollback**: before each apply the touched UCI packages are\n  backed up and an on-AP timer restores them after 5 minutes unless the\n  change is confirmed. 20 s after an apply the daemon checks that every\n  enabled radio with interfaces is up; if not, it rolls back at once.\n- **Never wired and mesh-uplinked at once**: the mesh watcher joins only\n  after 20 s without cable link and drops the wireless uplink within a\n  second of a cable coming back.\n- **Never applies Ubiquiti firmware**; Remove never resets OpenWrt.\n- The AP never starts serving DHCP, DNS or router advertisements on its LAN:\n  guest DNS runs on a separate port for guest clients only, VLAN interfaces\n  have no address.\n- Secrets (WLAN passphrases, the device key, password hashes) go to UCI over\n  stdin, never on a command line or in the log; state files are mode 600.\n- Only accounts the daemon created itself are touched for Device SSH\n  authentication; root and system accounts never are.\n\n## Building from source\n\nGo 1.26 or later. To build just the daemon for an AP without cloning, for example an ARMv7 one:\n\n```sh\nGOOS=linux GOARCH=arm GOARM=7 CGO_ENABLED=0 go install github.com\u002Fantoniocosta\u002Funifi-openwrt\u002Fcmd\u002Fuow@latest\n# the binary lands in $(go env GOPATH)\u002Fbin\u002Flinux_arm\u002Fuow\n```\n\nFrom a clone:\n\n```sh\ngo test .\u002F... && go vet .\u002F...\nCGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -trimpath -ldflags='-s -w' -o uow .\u002Fcmd\u002Fuow\n```\n\n`tools\u002Fbuild.sh` builds `uow-\u003Carch>` for armv7, aarch64, mipsel, mips\n(softfloat) and x86_64 and assembles the installer bundle in `dist\u002Fopenwrt\u002F`.\n\n## Layout\n\n| Path | What |\n|---|---|\n| `cmd\u002Fuow` | the daemon |\n| `cmd\u002Fowprobe`, `cmd\u002Fowplan`, `cmd\u002Fowctl` | development helpers: print the inform fields for an AP over SSH, print the UCI plan for a saved system_cfg, run one AP action |\n| `internal\u002F` | protocol (`inform`, `device`), OpenWrt side (`openwrt`), settings translation (`translate`), model catalogue (`models`), read-only UniFi API client (`unifiapi`) |\n| `packaging\u002F` | files installed on the AP, `install.sh`, the OpenWrt package Makefile |\n| `tools\u002F` | build, `.apk` packaging, model catalogue generator, a small SNMP test client |\n| `docs\u002F` | [internals](docs\u002Finternals.md), [packaging](docs\u002Fpackaging.md) |\n\n## Contributing\n\nIssues and pull requests are welcome. It has been tested on two devices only, so\nreports from other OpenWrt devices, UniFi models and controller versions help\nmost: say which device, OpenWrt version, model (`-model`) and controller version,\nand attach `logread -e uow` with keys and passphrases removed (the daemon never\nlogs them). Run `go test .\u002F... && go vet .\u002F...` before sending code.\n\n## Credits\n\nThis project builds on the work of others:\n\n- [open-unifi](https:\u002F\u002Fgithub.com\u002Flucavb\u002Fopen-unifi) by Luca Becker (MIT): its\n  protocol documentation is the basis of the inform packet format, the\n  controller replies and the system_cfg keys, and its recorded UAP-AC-Pro\n  capability words are the `U7PG2` profile.\n- [unifi-emu](https:\u002F\u002Fgithub.com\u002Fjamesbraid\u002Funifi-emu) by James Braid (MIT):\n  the UniFi model catalogue (`internal\u002Fmodels\u002Fcatalog.json`) is generated from\n  its model profiles, and its protocol notes informed the inform payload.\n- [unifi-inform-protocol](https:\u002F\u002Fgithub.com\u002Fjk-5\u002Funifi-inform-protocol) and\n  [ubntmfi's inform protocol notes](https:\u002F\u002Fgithub.com\u002Fmcrute\u002Fubntmfi\u002Fblob\u002Fmaster\u002Finform_protocol.md):\n  early descriptions of the inform protocol and `set-adopt`.\n- [OpenWrt](https:\u002F\u002Fopenwrt.org), with hostapd, iw, usteer and apk-tools, does\n  the actual work on the access point.\n\nContributors:\n\n- [@dohun0310](https:\u002F\u002Fgithub.com\u002Fdohun0310): wired clients on the AP's LAN\n  ports, the uplink port setting and in-wall port numbering, tested on a\n  Linksys LN1301.\n\nSimilar projects:\n\n- [openUF](https:\u002F\u002Fgithub.com\u002Fyesrab\u002FopenUF) (Lua, runs on the AP; continues\n  [jonasevcik\u002FopenUF](https:\u002F\u002Fgithub.com\u002Fjonasevcik\u002FopenUF) and the original\n  [trueserve\u002FopenUF](https:\u002F\u002Fgithub.com\u002Ftrueserve\u002FopenUF)): the same goal,\n  with a guided installer, a LuCI app, discovery, WPA-Enterprise and more\n  tested boards.\n- [rrb-unifi](https:\u002F\u002Fgithub.com\u002Fd-malinowski\u002Funifi-openwrt-roaming): 802.11r\n  fast roaming between OpenWrt and genuine UniFi access points.\n\nDetails and license texts are in [NOTICE](NOTICE).\n\n## Legal\n\nNot affiliated with, endorsed by or supported by Ubiquiti or the OpenWrt project. It relies on\nunofficial UniFi controller behaviour that Ubiquiti can change in any update. No Ubiquiti software,\nfirmware or code is included, and it never installs Ubiquiti firmware. UniFi and Ubiquiti are\ntrademarks of Ubiquiti Inc.; OpenWrt is a trademark of its owner. The names are used only to say what\nthis software works with.\n\n## License\n\nGPL-2.0-or-later; see [LICENSE](LICENSE). Third-party attributions and license texts are in\n[NOTICE](NOTICE).\n","unifi-openwrt 是一个轻量级 Go 语言守护进程，使运行 OpenWrt 的通用无线接入点（如 TP-Link OnHub、Linksys MX4300）能被 UniFi 网络控制器识别、纳管和统一监控。它通过模拟 Ubiquiti 设备的 Inform 协议，将 OpenWrt AP 虚拟为指定 UniFi 型号（如 UAP-AC-Pro、U6-IW），支持 Wi-Fi 配置下发、客户端\u002F射频状态上报、VLAN、访客门户及基础漫游协同。项目不刷写 Ubiquiti 固件，仅协议层兼容，适用于希望复用老旧但硬件完好的 OpenWrt 设备、避免网络割裂并维持单点管理的家庭或小型办公 UniFi 环境。",2,"2026-11-24 04:51:17","CREATED_QUERY"]