2026-07-11 15:30:56 +00:00
2026-07-10 17:34:35 +00:00
2026-07-11 15:30:56 +00:00
2026-07-10 15:44:09 +02:00
2026-07-10 12:42:06 +01:00
2026-07-10 17:34:35 +00:00
2026-07-10 15:44:09 +02:00
2026-07-10 15:44:09 +02:00

openUF — C

Daemon that makes an OpenWrt router appear as a UniFi U6 InWall to the UniFi Network controller.

Implemented Features

Feature Description Implementation
L2 Discovery UDP broadcast + multicast every 10s announce.c → port 10001
Adoption AES-128-CBC handshake with the controller inform.chandle_response()
WiFi Config Creates WiFi networks from the controller via UCI wlan.cwlan_apply_config()
Band Steering 802.11k/v Neighbor Reports + BSS Transition wlan.capply_vap()
Fast Roaming 802.11r FT with mobility_domain derived from MAC wlan.capply_vap()
WPA3 / PMF SAE, SAE-mixed, 802.11w 0/1/2 wlan.csec_to_uci()
WiFi Clients MAC, signal, bitrate, bytes per VAP clients.ciw station dump
Wired Clients MACs from bridge FDB clients.cbridge fdb
CPU / RAM Real-time usage sysinfo.c/proc/stat + /proc/meminfo
Interfaces Speed, duplex, rx/tx counters sysinfo.c/proc/net/dev
Channel / RF Channel utilization, noise, tx_power sysinfo.ciw survey dump
LLDP Send Custom frames via AF_PACKET raw socket lldp.clldp_send_frame()
LLDP Read Neighbors for UniFi topology lldp.clldpctl -f json

Quick Installation

# On the OpenWrt device:
opkg update
opkg install gcc make libmbedtls-dev libuci-dev libjson-c-dev

# Compile and install
make -f Makefile.standalone install

# Configure
vi /etc/openuf/openuf.conf   # adjust controller_ip and lan_if

# Start
/etc/init.d/openuf start
/etc/init.d/openuf enable    # start on boot

Configuration

controller_ip   = 192.168.1.1   # UniFi controller IP
lan_if          = br-lan        # LAN interface (for MAC and IP)
ufmodel         = u6-inwall     # emulated model
inform_interval = 10            # seconds between informs
enable_announce = 1
enable_inform   = 1

U6 InWall Model

A U6 IW is emulated because it has 5 GbE ports, which covers most OpenWrt routers. The model reports:

  • 5 ethernet ports (eth0-eth4)
  • 2.4 GHz WiFi 6 Radio (HE/802.11ax)
  • 5 GHz WiFi 6 Radio (HE/802.11ax)

LLDP

For visual topology in UniFi:

opkg install lldpd
/etc/init.d/lldpd start
/etc/init.d/lldpd enable

openuf sends its own LLDP frames even without lldpd (raw socket). With lldpd installed, it also reports upstream neighbors (switches).

Adoption

The process is automatic:

  1. The AP appears as "Pending" in UniFi.
  2. Click on "Adopt" → the controller sends a new key.
  3. The AP applies the key and becomes "Connected".
  4. The controller pushes the WiFi configuration (SSIDs, channels, etc.).

To reset: rm /etc/openuf/state.json && reboot

Dependencies

opkg install libmbedtls libuci libjson-c
opkg install lldpd   # optional, for topology

S
Description
No description provided
Readme Apache-2.0
765 KiB
Languages
C 87.9%
Python 7.5%
Shell 3.6%
Makefile 0.6%
Dockerfile 0.4%