I have custom shell commands that I’d like to call remotely from the Golioth RPC interface. Is there an example somewhere showing how to do this?
Hey @john.stuewe ,
You can use the shell_execute_cmd() API to run commands directly from a user application. You’ll find more details about it here.
Keep in mind that the command you want to execute must already be registered with the shell subsystem. If it’s a custom command, make sure it’s properly implemented and registered using SHELL_CMD_REGISTER()
.
This isn’t a common use case, and I haven’t seen specific examples for it, but shell_execute_cmd()
is often used for testing the shell subsystem. For instance, you can look at how it’s used to test the RTC driver and use that as a reference for your implementation.
Thank you. I was able to implement it and it’s working properly.
1 Like