Update MQTT broker address and simulation parameters after deploying a simulink model in raspberry pi
Show older comments
Hi Everyone,
I have a simulation deployed in raspberry pi (s) (Model 5). Which will be passed on to the engineers outside our network. They would like to connect to their very own MQTT brokers (not a things speak broker) and update simulation parameters such has battery size, max charge and discharge rates, etc. They do not have access to Matlab-simulink products. I do not have access to their network.
I would simply life to provide them with a generic ELF (.elf) file generated from my Simulink model to start in their Raspberry pi. They should be able to modify the MQTT broker address and the simulation parameters within the ELF file or some other dependancies so the engineers can use the raspberry pi with deployed code within their systems.
How would you recommend I achieve this? I am at my wits end.
2 Comments
Neal
on 16 Oct 2025
Hi Neal,
Currently, this parameter as suggested is not tunable by design. You can check out Embedded coder and hook methods. By inserting your custom code into the hook methods, you can inject target-specific commands that modify or finalize the generated code before it becomes the final embedded executable.
I hope, it helps.
Answers (0)
Categories
Find more on MATLAB Support Package for Raspberry Pi Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!