10879 questions

12963 answers


26149 members

0 votes
44 views 0 comments
Firmware version TRB2_R_GPL_00.07.00

When I change the value of one of the IO ports (or any other setting, like direction) by using the ubus command on the cli, it does not seem to remember that setting after reboot. I checked the config file /etc/config/ioman and this file is not changing when I execute for instance this command:

ubus call ioman.gpio.dio1  update '{"value": "1"}'

The command is executed correctly and the state really changes (also in the webpage), but it is not saved.

However, doing this from the web interface, it does seem to update the file (most of the time???). Is this expected behaviour? I would expect that the module would return to its last known state before rebooting. What can I do to save the state?


1 Answer

0 votes
OK, I think I found it myself. I looked at the calls made by the web UI when changing the IO state and found that it posts a key called "save_conf" with value true. I tried to do the same with the ubus call and surprise: it saves the state in de config! So the call would be like this:

ubus call ioman.gpio.dio1  update '{"value": "1", "save_conf": true}'

I tried to look it up, but it doesn't seem to be documented. Apparently without this key, it does not persist any changes to the io configuration.