I have a running project with various modules. They use shell on SD2 serial line for configuration.
I want to add CANbus for application purposes, and add configuration commands too, in order to configure modules from main controller, a PC, while still keeping the shell on serial serial port.
I plan sending a string through CAN messages, with same format used for serial line. No problems on this.
The question is: when extracted from CAN, how to redirect this string "as is" to the shell parser, so command execution will be done with the same code, as it was comming from serial line ?
Should I sent it to the BaseSequentialStream ?
The second option is to copy few line of the shell thread function, to decode command and parameters, and call the corresponding function.
Some examples would be appreciated.
Regards from a hardware guy
Angelo