How does the argument of ubus call uci get '{"config":"wireless"}'
get parsed?
I assume that '{"config":"wireless"}'
is the message while while uci get
being the path and method.
I can’t really find config
or wireless
field in uci
so I’m not sure how the message is being parsed here.
This UBUS UCI is serviced by rpcd (package in Openwrt).
The method and the message are serviced by this daemon. In this particular case, rpcd translates this into “uci show wireless” and gives you the resulting data. Since Ubus is primarily an IPC, it becomes very tricky to use it as a CLI, without knowing exactly what the methods and the message parameters provide. Usually a process implementing Ubus will provide an API documentation of this, unfortunately opensource Openwrt projects are not very up-to-date.
https://openwrt.org/docs/guide-developer/ubus/uci
1 Like
If you run ubus list -v [object]
it will tell you the methods and parameters for that object. In this case, try ubus -v list uci
.
Note that the available methods/parameters are entirely defined by whatever code has registered the object, so there are not necessarily any particular patterns.