Simulink Code Deployed to Raspberry pi 4 but cannot run without internet

7 views (last 30 days)
I made a Simulink model to create a standalone execution on raspi. However, when I remove the ethernet cable, the code didn't run-on-boot.
~~~~~~
Set-up:
  • Raspberry Pi 4 B+,
  • Simulink and Matlab support packages for Raspi,
  • raspi connected to router through ethernet cable,
  • speaker is connected to raspi through AUX cable for code testing.
Steps taken:
  1. Have downloaded the support package, the right compiler
  2. Tested my model using the external mode: the program run on raspi
  3. Select the run-on-boot for automatic run after reboot
  4. Clicked on the build, deploy, start button to deploy the code into raspi
  5. Closed the matlab program
  6. Shutdown the raspi
  7. Remove the ethernet cable
  8. Turned on the raspi
Result: Nothing happened
Trial 2:
  1. Clicked on the build, deploy, start button to deploy the code into raspi (with ethernet connected)
  2. Remain the matlab program open
Result: The code run on pi
Trial 3:
  1. Continued from trial 2, switched off the raspi
  2. Close the MATLAB program
  3. Turned on the raspi (still connected to ethernet)
Result: after 24s, the raspi tells the IP address, the code doesnt run
Trial 4:
  1. Switch off the raspi, wait for 1 minute
  2. Turn it on
Result: after 24s, the raspi tells the IP address, the code doesnt run
Trial 5:
  1. Turn on MATLAB/Simulink program, connect raspi from MATLAB with code: raspi
  2. Open the simulink model and deploy again: The code run
  3. Close the MATLAB/Simulink program: the still run
Trial 6:
  1. Switch off the raspi, waited for 1 minute
  2. Turn on the raspi (still connected to ethernet)
Result: raspi say the IP address, the Code run
Trial 7:
  1. Switch off the raspi
  2. Remove the ethernet cable
  3. after 1 minute, turned on the raspi
  4. Waited for 5 minutes
Result: Nothing happened
Does anyone know what is the proper way to deploy, run and stop the code on raspi? And, hopefully make it work without internet after code deployement.

Answers (1)

Srija Kethiri
Srija Kethiri on 13 Dec 2022
Hi Ainul,
I understand that you want to deploy Simulink code on the Raspberry pi using the ethernet cable
Hope this helps!

Categories

Find more on Raspberry Pi Hardware in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!