Uci argument documentation

This doc indicates

uci set wireless.@wifi-iface[0].disabled="0"
uci set wireless.@wifi-device[0].disabled="0"

should be valid, but this other doc indicates it should be

uci set wireless.radio0.disabled="0"

or looking at

uci show wireless

disabled is not even listed, but maybe it should be

uci set wireless.default_radio0.disabled="0"

. The man page does not list valid arguments, and does not list an argument validation command.

What is the correct command?

(maybe some only work on old versions, or some devices, or maybe they are all valid... maybe I'm just missing some knowledge but this part of the doc seems inconsistent)

Additionally it looks like testing may cause issues, get hints that maybe all are valid :

# uci get wireless.@wifi-iface[0].disabled
uci: Entry not found
# uci get wireless.@wifi-device[0].disabled
uci: Entry not found
# uci get wireless.radio0.disabled
uci: Entry not found
# uci get wireless.default_radio0.disabled
uci: Entry not found

# uci get wireless.@wifi-iface[0]
# uci get wireless.default_radio0
# uci get wireless.@wifi-device[0]
# uci get wireless.radio0

# uci get wireless.wifi-device
uci: Invalid argument
# uci get wireless.wifi-iface
uci: Invalid argument

Not necessarily, it can be omitted. It should be there if value is 1.

The @wifi-iface[0] is a reference for a section type and can be the same as radio0.
The @wifi-device[0] is again a reference and can be the same as default_radio0
It all depends how you have named the type when you create it.
It's more clear if you use uci show wireless

1 Like

OK so it is both, and Section naming makes sense...I assume using an anonymous setter won't remove the section name. I get that there are practically unlimited settings combinations so I guess not listing iface disabled is a side effect that seems strange only at first.

Just like any other not required option, if it is not defined, it uses its default value.

1 Like