Ubus with uci and uhttpd

Hi everyone,

I need some help, please. I work with Chaos Calmer 15.05.1, IPQ807x and lua.
I use ubus to set and get data I needed with session, uci and network etc.
I can get datas with uci "get" method.
But it always be failed when I use uci "set" method.
Error code will return 2, it seems the invalid arguments.

c = ubus.connect()
-- method 1 (according to command : ubus list -v uci)
c:call('uci', 'set', {config = 'network', section = 'lan', match = {'ipaddr'}, values = {'192.168.0.100'}})

-- method 2 (according to url : https://openwrt.org/docs/guide-developer/ubus/uci)
c:call('uci', 'set', {package = 'network', section = 'lan', option = 'ipaddr', value = '192.168.0.100'})

And the other question is how to use method put and patch with uhttpd?
I knew it can work with new version, but I have to work with 15.05.1.
Have any suggestion?

Thanks a lot.

Your post does not appear to be related to an officially released OpenWrt version, package or supported operation.

It is unlikely that you will receive useful input here.

Please seek advise from the relevant maintainer.

1 Like