Skip to content
dtechterminalPublic

About

Run TP-Link Deco X20 units and a JioFiber JCOW414 as UniFi access points

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

udeco

Run TP-Link Deco X20 units as UniFi access points.

udeco-ap is a small Go agent that runs on each Deco. It takes the unit's Wi-Fi over from TP-Link's firmware and speaks the UniFi inform protocol, so a UniFi Network controller adopts the unit as a U6-Lite (UAL6). From then on UniFi configures it and shows its clients, radios and stats like those of its own APs. TP-Link's firmware stays on the unit and takes back over if the agent is removed or an apply fails.

The same agent also runs a JioFiber JCOW414 router as a plain UniFi AP (second platform).

Tested setup. Three Deco X20 V2 units on wired backhaul (TP-Link firmware 1.3.0 Build 20250912, kernel 4.1, Broadcom wl, hostapd 2.9), one mesh master and two satellites. They are adopted into UniFi Network 11.1.50 on a UniFi Cloud Gateway. The tables below were first checked on all three against release d9dd8fe (19 Nov 2026); a row checked later, or on a later build, carries its own date. Other Deco models and firmware versions are untested.

What works

Status key:

  • Verified: working on the units with the controller.
  • Built: written and unit-tested, with the device commands confirmed on a unit, but not proven end to end.
  • Partial: works, with the gap named.
  • Not yet: possible, not built.
  • Not possible: this hardware, driver or hostapd build can't do it.

Management

Feature Status Notes
Adopt, provision, Forget, re-adopt Verified Adopted over SSH. Config sync uses the cfgversion handshake. A forgotten unit re-adopts without a Wi-Fi restart.
Live stats Verified Follows the controller's 1 s / 10 s inform interval.
Restart from UniFi Verified Back on UniFi about 3 minutes after the reboot. The unit runs stock TP-Link Wi-Fi until the agent's boot gate opens (at least 120 s).
Locate, LED on/off Verified LED on is steady green, also right after a reboot. Off goes dark. Locate blinks green until Unlocate. UniFi's LED colour can't be carried.
Topology (LLDP) Verified UniFi shows the parent switch port.
Device SSH keys and site logins Verified Site SSH keys pushed from UniFi let the site user log in; root login stays key-only.
Login lock (root logins) Verified While Device SSH Authentication is off and the controller answers, new connections to the unit's root login (Deco :22, Garage :23 and :22) are dropped; open sessions stay. 10 min without a controller reply, Device SSH on, observe mode or the agent's stop opens it again. "login_lock": false turns it off (login-lock). Live 2026-11-20 on all four APs: locked within 30 s of Device SSH off, an open session kept working, Bedroom opened after 10 min of controller silence and relocked when it answered again, Device SSH on opened them in seconds. The crash path and the Garage launcher removal are not yet seen on a unit.
Encrypted remote syslog Verified The controller's AES-GCM syslog format.
Firmware upgrade Not possible By design: upgrade offers are answered and ignored. Ubiquiti firmware is never flashed.
SNMP, mDNS bridge Built Off by default (mdns_bridge config key for the bridge).

SSIDs and security

Feature Status Notes
Open, WPA2-Personal Verified PMF optional or required.
WPA2/WPA3 transition, WPA3 (SAE) Verified With "wpa3": true, 16 phones and laptops across the three units joined with SAE (AKM 00-0f-ac-8), and WPA2-only clients with PSK. A WPA3-only SSID has not been tried.
Hidden SSID, enable/disable Verified
VLAN per SSID Verified One bridge per VLAN on the uplink.
SSID per AP group Verified An SSID is broadcast only by the APs of its group.
MAC allow/deny lists Verified The driver's macmode together with hostapd's ACL.
WLAN schedules Verified An SSID goes off within seconds of its off-window starting.
WPA2/WPA3 Enterprise, RADIUS MAC auth, private PSK, Hotspot 2.0 Built Not tested against a RADIUS server. An SSID whose server is unusable is refused, never brought up open. The Garage serves WPA2/WPA3-Enterprise only (built, not run on the unit: garage-parity section 27).
Enhanced Open (OWE) Not possible This hostapd build has no OWE; such an SSID is refused.
RADIUS-assigned VLANs Not possible No dynamic VLAN support in this hostapd.

Roaming and client tuning

Feature Status Notes
802.11k, 802.11v Verified Neighbour reports list the other units. 802.11k (RRM) is on for every SSID as on a U6 Pro, and 802.11v (WNM) is turned off in the driver where the controller turns BSS transition off. The driver bits are built, not checked on a unit (radio-parity).
802.11r (FT-PSK) Built On for every SSID. The units exchange FT key holders over signed announcements on the LAN. A client doing a fast transition has not been observed yet. The Garage joins the same mobility domains with ft (off; built, not run on air).
802.11r for WPA3 (FT-SAE) Verified On with wpa3 ("ft_sae": false turns it off). On 2026-11-19 it stopped WPA3 phones joining: the driver beacons the mobility domain byte-swapped, so hostapd refused every FT-SAE association (status 54). Fixed 2026-11-20; since then all three units run it, and an iPhone, an Apple Watch and a Pixel join (seen 2026-11-21). Until v0.3.2 no FT-SAE key reached another unit: the X20's bridge drops unicast key holder frames, and the agent now hands them to hostapd past it. Since 2026-11-23 the keys are exchanged between all three Decos and the Garage (verified). A real client's FT-SAE roams between Hallway and Bedroom were seen on 2026-11-23: FT authentication, no 4-way handshake, associated in the same second (ft-sae). No FT roam to or from the Garage seen yet. The Garage takes part with ft.
Client isolation, proxy ARP, multicast-to-unicast, DTIM, U-APSD Verified Proxy ARP is now applied on SSIDs without client isolation too, as a U6 Pro does it (Built: proxy-arp).
Intelligent DHCP (unicast DHCP replies) Verified wl dhcp_unicast 1 on every served SSID, live, as a U6 Pro. The hand-back puts back 0 (radio-parity). Read live 2026-11-20 (wl dhcp_unicast = 1 on the served SSIDs); clients (Galaxy S20 FE, the KVM) get their leases with it on.
BSS Load element Built On by default, as a U6 Pro. Off on a radio where the controller sends qbssload=disabled for any SSID, with a note when other SSIDs share that radio, because the element is radio-wide in this driver (radio-parity).
BPDU filter (bridge group address) Built Frames to 01:80:c2:00:00:00 are dropped into and out of every served SSID, in an ebtables chain of the agent's own. The controller's bga_filter decides per WLAN (bga-filter).
IGMP/MLD snooping Built The agent's VLAN bridges snoop as a U6 Pro's bridges do. br-lan keeps TP-Link's snooping (igmp-snooping).
Band steering, max clients Built Band steering uses 802.11v nudges.
Restrict to 5 GHz Built Dual-band clients seen on the SSID's 5 GHz BSS within the hour with a usable signal are asked (802.11v) to leave 2.4 GHz; one that ignores it is kept off 2.4 GHz for a minute, at most once an hour. Clients never seen on 5 GHz are never refused. no2ghz
Minimum RSSI Built A client below the controller's minimum for 3 readings is asked to leave (802.11v, disassociation imminent), then disconnected with a 30 s ban on that BSS; its leave event says why. min-rssi
Minimum data rates Built Off by default ("min_rates": true). wl rateset runs inside a radio down/up, which drops that radio's clients.
Target Wake Time (TWT) Built On by default ("twt": false turns it off), as a U6 Pro. Turned on by hand on one unit (wl twt enab 1 after wl down): a Pixel's station info then shows TWT capable; an iPhone showed no TWT.

Radios and RF

Feature Status Notes
Channel, width, transmit power Verified Includes 80 MHz on 5 GHz.
Auto channel Built A radio left on auto gets one channel when a provision restarts that radio anyway, for example the takeover at boot. 2.4 GHz uses only 1, 6 or 11. 5 GHz never uses DFS. Channels in the controller's blocked list are never taken. The pick favours the quietest channel by neighbours and spectrum use. It is never re-picked periodically (auto-channel).
Country Verified 2.4 GHz runs US/0 (24 dBm). 5 GHz runs Broadcom's #a table by the user's choice (driver_country_bands {"ng":"US","na":"#a"}, verified live 2026-11-20): Wi-Fi 6 at 23.5 dBm on 36-144 and 149-161, but no radar detection, so the agent refuses 120-128 (weather radar; refusal seen live). Every real country but US/0 disables Wi-Fi 6 on this board, and US/0 has no DFS. See dfs.
Power presets (low/medium/high) Verified (custom) / Built (presets) These match the U6 Pro: Low is the 5 dBm floor, Medium is halfway, and High and Auto are the radio's ceiling. Custom is clamped to that range. All of them apply without a radio restart. UniFi shows the real preset and dBm, not "custom". The earlier fixed 6 dB / 3 dB steps were Verified (tx-power). Custom power verified live 2026-11-20 (17 and 14 dBm on 2.4 GHz through txpwr_degrade, no client dropped); the low/medium/high presets have not been set on a unit.
Radio driver defaults Verified U6 Pro values are used. Implicit beamforming is off (live), 2.4 GHz has no vendor VHT, power save is off, and the glitch-based receiver desense is off. "rx_desense": true keeps TP-Link's desense, and puts it back where an earlier run cleared it. The radio-down settings (rrm and wnm included) ride a restart the agent makes anyway (radio-parity). Read on all three units 2026-11-20: wl interference mode 360 (desense off), txbf_imp 0, 2.4 GHz vht_features 6.
Neighbour and rogue-AP list Verified Refreshed every minute by a passive listen on the AP's own channel. A full scan from UniFi adds the other channels.
Spectrum scan Partial 2.4 GHz is complete; 5 GHz covers 36–48. Channels 149–165 are reported as unmeasured, not as clean.
DFS channels Verified The controller's DFS channel gets 802.11h and the driver's CAC, and Tick and the health check leave the radio alone during the CAC. On radar the driver's move is followed and reported as EVT_AP_RadarDetected, with hostapd's conf unchanged. A DFS channel needs a country table that has it: US/0 has none, IN/288 runs the CAC and radar detection, and under #a (the Country row above) the channels are served without either. The controller's nightly dfs-reset goes back once the non-occupancy period is over. has_dfs is reported (dfs). Live 2026-11-20 under IN/288: CAC timed (60 s on 100 and 132, about 10 min on 116/80), ISM entered, clients served on 100/80 and 132/80. A radar move has not been observed.

Clients

Feature Status Notes
Client list with signal, rates, traffic, Wi-Fi generation Verified Only stations the driver reports as associated are listed, so clients don't flap between APs.
Connect and leave events Verified A departed client leaves UniFi at once, not after about 5 minutes.
Connection-timing events Built Success, failure, soft failure and fixup per connection attempt, with the controller's timings and counters, from hostapd's log and sockets and a read-only tap of each client's ARP, DHCP and DNS (IPv4 and IPv6). A client whose DNS goes encrypted (DNS over TLS) gets no event rather than a false failure, or a success if a plaintext answer follows within the fixup window. "sta_snoop": false turns it off. connection-events
Gratuitous ARP on association Built Once a client is authorized and its address is known, the unit announces it on the wired ports so switches learn it at once. "assoc_garp": false turns it off. assoc-garp
Per-client TX retries Verified Attempts, retries and retry % on each client's page.
Reconnect, block, unblock Verified
Lock client to AP Verified Every other unit denies a locked client. Its deny lists are updated live, without a hostapd restart.
Per-client speed limits Verified A client's own user group. A 512/768 kbit/s limit held at 460/652 kbit/s, and full speed returned when the client went back to the default group. The limit survives restarts and follows the client to any SSID of the unit. On the Garage (jio-mtk): built, not run on the unit, "rate_limits": true (off by default): a per-station policer module, see the second platform below.
SSID and user-group speed limits Built Same shaping path as per-client limits. The same on the Garage, with rate_limits: its policer module held 512/768 kbit/s at 502/698 (2.4 GHz) and 504/699 (5 GHz) on the unit; not yet driven through UniFi there.

Speed limits have one cost. Flows that the Deco's Broadcom flow cache accelerates bypass Linux traffic shaping, so a unit turns its flow cache off while it has any limit, and back on when none are left. Details are in client-rate-limit.

Guest networks

Feature Status Notes
Guest-to-LAN blocking Verified A guest reaches the gateway and the internet, never LAN hosts.
Gateway-hosted guest portal Verified Before login a guest gets DHCP, DNS and the portal only. Authorise opens the internet within one inform; unauthorise closes it again.
Guest isolation across APs Built
Captive-portal redirect Not possible This ebtables has no redirect target (checked on a unit). A guest opens the portal page themselves.

Stats and uplink

Feature Status Notes
Channel utilisation, CPU, memory, uptime, load Verified
Wi-Fi Experience (AP and client) Verified
Wired uplink and uplink traffic Verified With a UniFi gateway, the controller credits the AP with its clients' traffic.
SSIDs down on uplink loss Built No carrier on the uplink port for 5 s takes every SSID down (no radio restart); 10 s of carrier brings them back. Never during an apply. "uplink_ssid_down": false turns it off; "uplink_gateway_down": true also counts a gateway unanswered for 60 s. The LED blinks red meanwhile (TP-Link's "ap-lost"), dark if the LED is off. uplink-loss
Wireless mesh uplink Not planned TP-Link's mesh is switched off at takeover; every unit is wired.

Hardware

Real U6-Lite Deco X20 V2
Wi-Fi Wi-Fi 6, dual band Wi-Fi 6, dual band
Streams 2×2 on each band 2×2 on each band
Widest channel 80 MHz on 5 GHz 80 MHz on 5 GHz, 40 MHz on 2.4 GHz
Transmit power 20 dBm (2.4 GHz), 25 dBm (5 GHz) 24 dBm (2.4 GHz), 23.5 dBm (5 GHz) target
5 GHz channels All for the country, DFS included All the driver allows for the country table in force, DFS included (the Country and DFS channels rows above say which tables and channels have run)
SSIDs per band 8 5 (one driver slot is hostapd's hidden anchor)
Ethernet 1 × GbE 2 × GbE
Power PoE DC adapter
LED White/blue ring Green, red and a blink

How it behaves on the unit

  • Boot gate. After a reboot the unit runs stock TP-Link Wi-Fi until TP-Link's boot has finished (at least 120 s); then the agent takes over.
  • TP-Link services stopped. The mesh controller, auto channel, cloud, app server and Wi-Fi triggers would undo the agent's config, so they are stopped. Kept: procd, netifd, crond, dropbear, the LED daemon, eapd, apsd.
  • Fences. TP-Link's app and web ports (20001–20003, 80, 443) are dropped inbound. An egress firewall blocks the unit's own traffic to the internet; the controller stays reachable.
  • One copy. A second agent exits at once.
  • Rollback. A failed apply first retries the last good config. If that fails too, the radios run TP-Link's Wi-Fi with every SSID restored, but while the controller answers (an inform answered in the last 10 min) the agent keeps the takeover and applies the next provision. Only a controller silent for 10 min makes it hand the unit back and drop to observe mode, and the controller's next answer ends that observe mode again.
  • Reboot cause. /tp_data/udeco/alive records whether the last boot ended with a clean stop, so an unexplained reboot shows up in events.log.
  • Persistence. The agent and its config live on flash in /tp_data/udeco. They are started from the unit's existing cron hook.

Install

You need root SSH on each unit; how to get it is out of scope here.

  1. Configure. /tp_data/udeco/udeco-ap.json on the unit, for example:

    {
      "inform_url": "http://192.168.0.1:8080/inform",
      "console_ip": "192.168.0.1",
      "model": "UAL6",
      "sshd_port": 2222,
      "takeover": true,
      "apply": true,
      "egress": true
    }

    Unknown keys are an error, so a typo can't silently flip a safety switch. With "takeover": false the agent only reports to UniFi and changes nothing. With "apply": false it logs its plans without applying them. log is syslog (the default) or stderr. Optional keys, all off by default: wpa3, min_rates, mdns_bridge, hotspot2, mgmt_sources, uplink_gateway_down, rx_desense (keep TP-Link's glitch-based receiver desense, which a U6 Pro runs off), driver_country and driver_country_bands. driver_country runs the radios in another country's table than the site's, and driver_country_bands sets the country of one radio (ng for 2.4 GHz, na for 5 GHz) over it. With neither, a site in India runs IN/288 (IN/0 has no 80 MHz), which has DFS but, on this board, no Wi-Fi 6 rates and low power on 2.4 GHz and on 36-48. The tested units set driver_country_bands as in the Country row above; the tables, their measurements and the choice are in dfs. On by default: ft_sae (with wpa3: 802.11r for WPA3 clients, see the FT-SAE row above), uplink_ssid_down (SSIDs down while the uplink has no carrier, as a U6; false keeps them up), login_lock (with takeover and apply: root logins closed while UniFi's Device SSH is off and the controller answers; login_lock_failopen_s, 600, opens them after that much silence), sta_snoop (connection-timing events), assoc_garp (gratuitous ARP for a client once authorized), and twt (802.11ax Target Wake Time on both radios, as a real U6 Pro runs it; "twt": false keeps TP-Link's off). The driver takes it only while the radio is down, so the agent sets it inside a radio restart it makes anyway (takeover at boot, a channel, country or SSID change) and never restarts a radio for TWT alone. A unit already running the agent picks it up at its next such restart; until then the log says radio na: TWT enab 0, config wants 1: set at the next radio down/up. Handing Wi-Fi back to TP-Link restores its TWT state. On the Garage (platform jio-mtk), driver_dtim_bands sets one radio's DTIM period over the controller's ({"ng": 2} there), and downlink_watchdog (default true) disconnects a 2.4 GHz station that stops answering the unit's ARP probes while dozing, so it re-associates. The watchdog has its own 5 s tick between informs. inform_every_s (5-60, off by default) informs at least that often, whatever longer interval the controller asks for (it paces unwatched devices at about 30 s, so the dashboard's client activity moves in 30 s steps).

  2. Deploy. From a machine with Go and SSH access to the unit:

    deploy/deco-ap.sh <unit-ip>               # the canary unit
    deploy/deco-ap.sh --force-host <unit-ip>  # any other unit

    The script builds the armv7 binary, checks the unit (read-only), installs the agent in /tp_data/udeco with an md5 check (the plain binary, or its gzip when the binary is large), writes the launcher start.sh and starts it. It prints a one-line rollback command at the end. deploy/deco-ap.sh --help lists every step, check and size. Do satellites first, then the master. While the login lock holds, :22 does not answer: turn on Device SSH in UniFi, wait about a minute, deploy, then turn it off again (login-lock).

  3. Supervise. One line in the unit's /data/persist_shell.sh, which cron runs every minute, runs the launcher. The file is yours, so the deploy only prints the exact line to add; it ends in a marker the script finds it by at the next deploy. To have the script write it:

    deploy/deco-ap.sh --edit-persist <unit-ip>
  4. Adopt the unit in UniFi. It appears as a U6-Lite.

The launcher /tp_data/udeco/start.sh is written by deploy/deco-ap.sh on every deploy. It sends the agent's log to /tmp/udeco-bin/agent.log (RAM, capped at 2 MB); /tp_data/udeco/events.log keeps the important events across reboots.

Undo: rm /tp_data/udeco/start.sh and reboot. The unit comes back as stock TP-Link. The files on the unit are listed in packaging/deco.

To build without a unit (the deploy's own build, so the same binary):

deploy/deco-ap.sh --build-only   # writes dist/udeco-ap-linux-armv7

Run go test ./... && go vet ./... before deploying a change.

Prebuilt binaries. GitHub Actions (build.yml) tests every push and builds one agent per device: udeco-ap-deco-x20 (udeco-ap-linux-armv7, with its gzip) and udeco-ap-jio-jcow414 (udeco-ap-linux-mipsle, with its gzip), each with SHA256SUMS and MD5SUMS. Download them from the run's Artifacts, or, for a release, from the GitHub release of its tag: there they are named udeco-ap-<device>-linux-<arch>, with the release's notes from CHANGELOG.md. Each is built by its device's --build-only, with the Go toolchain go.mod names, so its md5 matches what a deploy of the same commit installs. The JioFiber's two optional kernel modules are built too (tools/econet-kernel/build-modules.sh, in Docker, reproducible) and released as mt7603roam-jio-jcow414.ko.gz (the 2.4 GHz driver) and udeco_rl-jio-jcow414.ko.gz (speed limits).

Second platform: JioFiber JCOW414

With "platform": "jio-mtk", the agent runs a JioFiber JCOW414 (MediaTek EN7528, MT7603 + MT7663) as a plain AP, adopted as a UAP-AC-Lite (U7LT).

  • Verified: adopt and provision; SSIDs per AP group with WPA2 and VLANs; radio channel, width and power; client list and stats. Jio's services are stopped, and telnet is kept.

  • Verified: WPA3 and WPA2/WPA3 on both bands. 2.4 GHz needs the optional rebuilt MT7603 driver (tools/mt7603: mt7603roam-jio-jcow414.ko.gz from a release, installed with deploy/jio-ap.sh --driver, in use from the next reboot); with Jio's driver 2.4 GHz stays WPA2 and the agent notes it.

  • Speed limits ("rate_limits": true, off by default; the module was proven on the unit on both bands, 512/768 kbit/s held at 502/698 and 504/699, the agent-driven path through UniFi not yet run): the kernel has no traffic control, so the agent loads its own optional module (udeco_rl-jio-jcow414.ko.gz from a release, installed with deploy/jio-ap.sh --rate-limit-module; source tools/udeco_rl) that polices each limited station on the bridge, both directions, and never cuts a client off. It keeps the limited stations out of Jio's hardware NAT. Off, the limits are noted as not applied.

  • Not on this platform: TWT (no 802.11ax radio); intelligent DHCP; turning the BSS Load element off; 5 GHz minimum rates.

  • 802.11r with the Decos ("ft": true, off by default; partial: on air since 2026-11-23, keys exchanged with the Decos on both bands, no client roam seen yet): FT-PSK and FT-SAE in the Decos' mobility domains, the agent standing in for the missing IAPP daemon and moving the FT-SAE keys with the Decos' hostapd; 2.4 GHz needs the rebuilt mt7603roam module. The 5 GHz profile keys were checked on the unit (the Decos' mobility domain on air) and the driver's key export matched hostapd's derivation. For a 5 GHz FT-PSK roam from a Deco the agent pre-installs the keys, but only on WLANs that also have FT-SAE (the Decos announce no others). Band steering and the Roaming Assistant send 802.11v requests there too (5 GHz never with a disconnect timer). 802.11k answers stay the drivers' own (garage-ft). Off, a roam to or from the Garage is a full association. The key was garage_ft up to v0.3.0; that name is still read, with a line in the log asking for the rename.

  • U6 parity (docs/deco/features/garage-parity.md; none of it run on the unit yet except the login lock, whose live run is in the Login lock row above):

    Feature What the Garage does Config
    Minimum RSSI driver threshold per BSS, agent kick (status 16) controller
    WPS off on every BSS always
    Group rekey, PMK cache the WLAN's rekey per BSS; 90-day PMK cache on 5 GHz controller
    2.4 GHz auto channel 1/6/11 only always
    Band steering flag off always
    Multicast enhancement per SSID on 5 GHz controller
    Tx power dB steps, live, reported in dBm with the mode controller
    Beamforming, 20/40 coexistence implicit BF off, coexistence off always
    Uplink loss SSIDs down except one management SSID; LED red fast blink (the firmware's "no WAN") uplink_loss (on), uplink_loss_ssid
    Station events leaves at once from driver events always
    BSS slot pinning each WLAN keeps its netdev and BSSID bss_pinning (off)
    Guest WLANs the Deco's fail-closed ebtables rules, portal controller
    Proxy ARP agent responder + ebtables drops on both radios (MT7663 driver flag hs_flag=3 only with proxy_arp_driver) controller, proxy_arp (on), proxy_arp_driver (off)
    DFS 52-64, CAC, radar followed and reported dfs (off)
    Station GARP on association when the address is known assoc_garp (on)
    Speed limits per-station policer module on the bridge, hw NAT kept off the limited stations controller, rate_limits (off)
    WPA2/WPA3-Enterprise, RadSec 802.1X through Jio's rtdot1xd, started and supervised per radio (2.4 GHz with the rebuilt MT7603 module only); RadSec through the agent's proxy. MAC auth, Filter-Id, PPSK, Hotspot 2.0, RADIUS VLANs: not possible, such SSIDs stay off or are noted controller, enterprise (on)
    mDNS bridge the Deco's bridge over bdg2 and the VLAN bridges mdns_bridge (off)
    Connection events the Deco's timing events from driver events and the taps (2.4 GHz: no association or handshake timing) sta_snoop (on)
    Multicast inspect as on the Deco always
    BPDU filter the Deco's ebtables BGA drops per BSS controller
    IGMP/MLD snooping on the agent's VLAN bridges always
    SNMP the Deco's agent; MediaTek netdevs as ieee80211 controller
    Login lock new telnet (:23) and SSH (:22) connections dropped while Device SSH is off and the controller answers; open after 10 min of silence login_lock (on), login_lock_failopen_s
    802.11r/k/v with the Decos FT-PSK and FT-SAE in the Decos' mobility domains, PMK-R1s moved over hostapd's RRB (5 GHz: the MT7663's KDP; 2.4 GHz: the rebuilt mt7603roam), (garage-ft); keys exchanged with the Decos (verified 2026-11-23), no client roam seen yet; 802.11v requests for band steering and the Roaming Assistant; 802.11k answered by the drivers from their scan tables; no FT-1X or Hotspot 2.0 controller, ft (off)
    U-APSD on 2.4 GHz mt7603roam driver built and live-swapped on the unit; the agent does not write APSDCapable there yet none yet

    Profile changes are batched into one restart per radio; live driver settings wait for a restart's settle time; the hand-back restores the vendor's values.

  • RF scans ("site_survey": true, off by default; needs takeover): the controller's scan commands run on the unit, and it claims RF scan. A scan from UniFi runs the driver's site survey of both bands (iwpriv <radio> set SiteSurvey=1, the radio off its channel for a few seconds) and fills the neighbour list. The nightly quick scan and the Environment page's spectrum scan measure each channel of both bands, one channel at a time (200 ms each, one a second; the radio returns to its own channel after each visit and never restarts), then survey the neighbours:

    • 2.4 GHz (MT7603): channels 1-11 with ApOffChanScan, about 15 s for the band, rows at 20 and 40 MHz;
    • 5 GHz (MT7663): the channels the agent serves (36-48 and 149-165; 52-64 too with dfs) with the driver's own off-channel request (OID 0x955), each visit confirmed by the driver's result event; about 12 s, rows at 20, 40 and 80 MHz.

    The unit then reports a per-channel table (utilisation from the busy time, on its own channel less its own clients' estimated traffic; interference from the strongest neighbour on the channel), as a real AP does, so the Environment page shows both bands' charts; the last table is kept in /flash2/udeco/state/ and comes back after a restart. Verified on the Garage 2026-11-25: both bands' tables reached the controller from a spectrum scan run by the agent. A quick scan reports itself running until it ends, as a real AP does: UniFi then asks for the next band (inferred from the real AP's logs). Scans run only on a command from UniFi, one at a time, never during a Wi-Fi apply, a radio restart or the 20 s after it, and never on a radio that is down; a band whose visits cannot be confirmed stops and keeps the previous table. Off, the neighbour list comes only from the driver's cached survey.

    The 2.4 GHz sweep confirms each visit from the driver's log lines: the start line and the "time_diff" end line, with their kernel times from /dev/kmsg (an end too soon after the start means another running scan took the visit over). The unit prints "time_diff" at its default debug level; with the rebuilt 2.4 GHz driver only iwpriv ra0 set Debug=0 silences it (Jio's original driver: Debug=1 too), and every 2.4 GHz sweep then stops. An ACS scan (400 ms a channel) can still take a visit over unseen. On 5 GHz the driver could get stuck so that it dropped every off-channel request and every site survey (seen once, 2026-11-24: the survey found only the home channel's neighbours until the 5 GHz radio was restarted). The cause was the driver's FT key holder entries aging out while their clients were still connected; since v0.3.4 the agent keeps them from aging (garage-ft). If it happens anyway, the band fails saying so, and the agent does not restart the radio itself, as that drops its clients. Not yet measured: how long clients stall during a 5 GHz survey (each off-channel visit is 200 ms away from the home channel, one a second).

  • LAN ports ("model": "UHDIW"): the unit can instead report as a UAP-IW-HD: LAN ports 1-3, port 4 absent, the uplink as rear port 5. With Enable Port VLAN on, the controller's port VLANs apply to ports 2 and 3 (port 1 only with ports_unlocked; the uplink never). Untested on the unit: tagged VLANs on ports 2-3. Give ports 2 and 3 explicit port profiles before turning Port VLAN on: the default "All" trunks every site network onto them.

  • Port monitor: a port change that cuts the unit off from the controller undoes itself, since telnet over the LAN is the only way in.

    • Confirm or revert: every change to a port waits for an inform the controller answers that started after the change. That includes a move back to the plain LAN (a loop through a downstream switch can cut the unit off too) and a failed change whose rollback took the port off a VLAN. The change triggers an inform at once, and while it waits, failed informs are retried at least every 15 s. With none answered within ports_confirm_s (default 90 s, 60-900), the ports of that change go back to their previous settings, and the agent logs EVENT: PORTS REVERTED (no inform reached the controller ...). A port that was in no bridge goes back on the plain LAN, never into no bridge again. The reverted setting is not applied again until the controller sends a different one for that port. A running Wi-Fi apply holds the bridges, so a revert can wait for it (at most one Wi-Fi apply).
    • Controller loss: when no inform is answered for ports_loss_s (default 300 s, 60-3600), every port the agent may change goes back on the plain LAN, and the agent logs EVENT: PORTS REVERTED (controller unreachable ...). Port settings stay off until informs are answered again, then come back through the confirm window. A setting taken off this way twice in a row is not applied again until the controller sends a different one. Once informs have been answered for twice ports_loss_s after the controller came back, the count starts over, so two unrelated outages do not count.
    • Startup: no port setting is applied before the first answered inform.
    • A port that cannot be put back is retried every 5 s until it is on the LAN. Port 1 (when locked) and the uplink are never touched. Events also go to events.log next to the config. To re-apply a reverted setting, change the port's profile in UniFi (or restart the agent).
  • Changing the model (U7LT to UHDIW or back) of an adopted unit needs a Forget and a new adoption: the controller keeps the model it adopted. The agent records that model in its state and, while the config differs, logs MODEL NOT CHANGED IN UNIFI and claims no port VLANs. Forget drops the AP's name, AP groups and radio settings, so note them first.

  • Gateway guard (deploy/jio-start.sh): if the unit loses the gateway, it rolls back to the previous build after 180 s and reboots after 480 s. A new build is confirmed after 30 minutes healthy. A deploy that changes the config keeps the old one as udeco-ap.json.prev next to udeco-ap.gz.prev; the rollback restores both.

Layout

Path What
cmd/udeco-ap the agent: inform loop, adoption, config, actions
internal/bcmwifi, internal/wl Deco Wi-Fi: hostapd configs, wl driver control, shaping, guest rules
internal/decosys TP-Link service control, fences, boot gate
internal/mtkwifi, internal/jiosys the JioFiber platform
internal/inform, internal/device, internal/translate UniFi inform protocol and the controller's settings
internal/ftpeer, internal/pathmon, internal/lldp, internal/snmpagent, internal/mdnsbr, internal/hs20, internal/radsec fast-roaming key exchange, uplink monitor, LLDP, SNMP, mDNS bridge, Hotspot 2.0, RadSec
internal/rf, internal/unit facts every package shares, each written once: band names, channel and frequency arithmetic, bridge names, the agent's directories on a unit
internal/atomicfile the one write-a-temporary-file-and-rename used for the state files
internal/repotest test helpers that hold the shell scripts and the docs to the Go code
deploy/ deco-ap.sh (Deco deploy; it writes the unit's launcher), jio-ap.sh (JioFiber deploy), jio-start.sh (JioFiber supervisor with the gateway guard), unraid.sh (the off-device udeco on an Unraid host), lib.sh (what those scripts share), udeco.example.json (example config for udeco)
.github/workflows/build.yml CI: tests, then one agent build per device (a new device needs its deploy script and a matrix entry); a v* tag publishes a release
CHANGELOG.md, .github/release-notes.sh release notes, one section per tag; the script prints a tag's section for its release
packaging/deco what a persistent install on a Deco consists of
tools/wifi-inet-monitor per-client internet monitor that runs on the gateway
tools/udeco_rl the Garage's speed-limit kernel module (GPL; build.sh cross-builds it against the unit's 3.18.21 tree)
docs/deco/ design, device capabilities, interference audit, feature notes

Legal

Not affiliated with, endorsed by or supported by Ubiquiti, TP-Link or Reliance Jio. It relies on unofficial UniFi controller behaviour that Ubiquiti can change in any update. No Ubiquiti software, firmware or code is included. UniFi and Ubiquiti are trademarks of Ubiquiti Inc.; Deco and TP-Link of TP-Link; JioFiber of Reliance Jio. The names are used only to say what this software works with.

License

GPL-2.0-or-later; see LICENSE. Third-party attributions are in NOTICE.

About

Run TP-Link Deco X20 units and a JioFiber JCOW414 as UniFi access points

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages