RUT956/RUT906 Recommended way to read GPIO values in C programmes

Hi,

I am currently reading GPIO values on these RUT-devices via the ubus coomand documented on the wiki page and then parsing the JSON output. I need to monitor the value quite frequently, which causes more load on the device, than reading the value via sysfs which is not there anymore on current firmware version.

Is the ubus command line utility the recommended way to read GPIO values in this situation?

Hello,

Thank you for your inquiry.

You can retrieve the GPIO values from your device using both the ubus commands via the command line interface (CLI) and HTTP POST/GET requests. The POST/GET functionality allows you to read the state and value of an input through HTTP requests, providing additional flexibility.

If you would like to use POST/GET requests from the CLI, you can achieve this with the curl -X command. For further details, including useful examples of the POST/GET functionality, please refer to the RUT956 wiki page: RUT956 Post/Get.

If you have any further questions, feel free to reach out.

Best regards,

1 Like

This topic was automatically closed after 15 days. New replies are no longer allowed.