FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
105 views 0 comments
by anonymous
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?

Thanks

1 Answer

0 votes
by anonymous
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.