OpenWrt Forum Archive

Topic: Change Options in radio with multiple wifi-iface using UCI System

The content of this topic has been archived on 26 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

How can I change the options of a device, example "radio0" with multiple interfaces using UCI?

For example, I would like to add a mac in 'default_radio0' and change the bssid option in the other one

What would be the command
uci set wireless. @ wifi-iface [0]. ?????

config wifi-iface 'default_radio0'
    option device 'radio0'
    option network 'lan'
    option mode 'ap'
    option encryption 'none'
    option macfilter 'allow'
    option ssid 'KW_2400'
    list maclist 'xx:xx:xx:xx:xx:xx'
    list maclist 'yy:yy:yy:yy:yy:yy'

config wifi-iface
    option ssid 'WIFI_myJob'
    option encryption 'none'
    option device 'radio0'
    option mode 'sta'
    option bssid 'zz:zz:zz:zz:zz:zz'
    option network 'wan wwan'

Is this expression correct?

uci set wireless.radio0.default_radio0.mode="sta"

uci show shows exactly what you should pass back to uci set.

The radio assignment is merely part of the configuration, not the basis for naming.

Use option ifname on each interface to reduce confusion.

Thanks so much for the explanation

Using names can I omit the use of arrays?
When I use arrays does the index "-1" correspond to the last one?

mk24 wrote:

uci show shows exactly what you should pass back to uci set.

The radio assignment is merely part of the configuration, not the basis for naming.

Use option ifname on each interface to reduce confusion.

Yes if you have everything named, it should not be using arrays.

The discussion might have continued from here.