Skip to main content
OpenWrt manages wireless through the /etc/config/wireless UCI file. The wifi-scripts package (and underlying mac80211 / hostapd) reads this file and configures both the radio hardware and the virtual access points running on top of it.

File structure

The wireless config file uses two section types:
Section typePurpose
config wifi-deviceRadio hardware — one section per physical radio
config wifi-ifaceVirtual interface — one per SSID/mode on a radio
A single radio (wifi-device) can host multiple virtual interfaces (wifi-iface), each with its own SSID, encryption, and network association.

wifi-device — radio hardware options

OptionDescription
typeDriver type, always mac80211 on modern OpenWrt
pathKernel device path (set automatically by wifi config)
bandRadio band: 2g, 5g, 6g, or 60g
channelChannel number or auto
htmodeChannel width: HT20, HT40, VHT80, VHT160, HE80, etc.
txpowerTransmit power in dBm (auto to use driver default)
countryISO 3166-1 country code (required for regulatory compliance)
disabledSet to 1 to disable the radio

wifi-iface — virtual AP/station options

OptionDescription
deviceName of the parent wifi-device (e.g. radio0)
modeOperation mode: ap, sta, adhoc, monitor, mesh
ssidNetwork name (up to 32 characters)
bssidOverride the BSSID/MAC (optional)
networkLogical interface name to attach to (links to /etc/config/network)
encryptionEncryption type (see table below)
keyPre-shared key for WPA modes
hiddenSet to 1 to suppress SSID broadcast
isolateSet to 1 to block client-to-client traffic
ieee80211rSet to 1 to enable fast BSS transition (802.11r)
ieee80211wManagement frame protection: 0 off, 1 optional, 2 required
disabledSet to 1 to disable this interface without removing it

Encryption values

encryption valueDescription
noneOpen network, no encryption
pskWPA-Personal (TKIP)
psk2WPA2-Personal (CCMP/AES)
psk+psk2WPA/WPA2 mixed mode
psk2+ccmpWPA2-Personal, CCMP only
saeWPA3-Personal (SAE)
sae-mixedWPA2/WPA3 transition mode
wpa2WPA2-Enterprise (requires RADIUS config)
wpa3WPA3-Enterprise

Configuration examples

A typical home router setup with one 2.4 GHz radio and one 5 GHz radio, each broadcasting a single WPA2 SSID.
config wifi-device 'radio0'
    option type     mac80211
    option path     'platform/ahb/18100000.wmac'
    option band     2g
    option channel  6
    option htmode   HT20
    option country  US

config wifi-iface 'default_radio0'
    option device      radio0
    option mode        ap
    option network     lan
    option ssid        MyHomeNetwork
    option encryption  psk2
    option key         'mysecretpassword'

config wifi-device 'radio1'
    option type     mac80211
    option path     'pci0000:00/0000:00:00.0'
    option band     5g
    option channel  36
    option htmode   VHT80
    option country  US

config wifi-iface 'default_radio1'
    option device      radio1
    option mode        ap
    option network     lan
    option ssid        MyHomeNetwork_5G
    option encryption  psk2
    option key         'mysecretpassword'

Applying wireless changes

1

Edit the configuration

Modify /etc/config/wireless directly or use UCI commands:
uci set wireless.default_radio0.ssid='NewSSID'
uci set wireless.default_radio0.key='newpassword'
uci commit wireless
2

Reload wireless

Apply changes to all radios without fully restarting:
wifi reload
To restart a specific radio only:
wifi down radio0
wifi up radio0
3

Check status

Verify the radio and associated clients:
# Show all wireless interface status
wifi status

# Show associated clients on a specific interface
iw dev wlan0 station dump

# Show radio info
iw dev
wifi reload briefly disrupts all wireless clients. For a live production router, prefer making incremental UCI changes and reloading only the affected radio where possible.

Auto-detecting radio hardware

When setting up a new device or after a factory reset, run:
wifi config
This detects the available radios and generates default wifi-device and wifi-iface sections in /etc/config/wireless. The generated config has all interfaces disabled (option disabled 1) by default — set a key and remove the disabled line before running wifi up.