I keep getting the error in object, in this case when I try to run the following commands:
uci get network.<interface_name>.macaddr
uci get wireless.default_radio<n>.macaddr
I have made several attempts, including:
- to see if there was something strange in /etc/config,
- to see if
uci show gave some kind of error,
- to do several system settings reset.
...Until I have update OpenWrt to the latest version without saving any current configuration.
Nothing seems to have been successful.
What could be due to this error, which occurred after several complete resets of the device?
If it was caused by a hidden corruption of something in /etc/config, or perhaps by an unsuccessful upgrade by opkg, wouldn't it all have been resolved with resets to default settings?
Did you put real values in the <> fields?
uci get network.lan.macaddr
uci get network.wan.macaddr
uci get network.wan6.macaddr
uci get wireless.default_radio0.macaddr
uci get wireless.default_radio1.macaddr
"uci: Entry not found" for all of these.
I tried both to give them during my old installation (they worked long ago, now not anymore), and after updating OpenWrt to the latest version but before making any changes.
UPDATE: I found one thing: instead of giving
uci get network.lan.macaddr, I first gave
uci set network.lan.macaddr=00:11:22:33:44:55 by inserting the same MAC that I read from the GUI; after, giving again
uci get network.lan.macaddr, here is the output that finally gives
00:11:22:33:44:55. The thing is very strange: it is almost as if before I attributed manually the MAC of lan, it did not exist (when instead I just got it from the GUI).
uci get merely reports values found in the configuration. If you get
Entry not found then the configuration simply contains no macaddr key. The values you see in the gui are not queried from uci but from the current runtime state of the system (using lower level system calls).
I had guessed from the behavior that the GUI was taking that specific data elsewhere, even though I had no idea where from. Thank you for the explanation!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.