Clear Filters
Clear Filters

Raspberry Pi Simulink Port Problem

23 views (last 30 days)
Alex83
Alex83 on 3 Mar 2017
Commented: Rami Abousleiman on 10 May 2018
Hello, I am building a vehicle running with Simulink based on raspberry pi. For this, I am using some digital in/out ports and the raspberry pi camera.
I tested GPIO in/out ports and camera board seperately. All worked fine.
Since I am using the the digital in/out blocks and the camera blocks with raspberry pi in external mode it seems that there is an error. I am getting this error message:
The following error occurred during deployment to your hardware board: Another process (PID: 1430) is using the TCP/IP port 17725 selected for External mode communication. Either choose a different port number by opening Hardware Implementation > Target Hardware Resources > External mode pane or kill the process with PID 1430.
I am quite new to Matlab/simulink, hence I do not understand the problem. Is there anybody who could help me?
Kind regards, Alex :)

Answers (2)

Tom Oakes
Tom Oakes on 25 Apr 2017
Edited: Tom Oakes on 25 Apr 2017
Hi, this happened to me not too long go but with the PID of 913.
Assuming you have the same problem as I had, if you type onto the command prompt of the screen the device is connected to;
ps -A
a list of all the processes running on the device is presented and hopefully you should see the process ID of 1430 (In my case it was another Simulink model). If that's the case then simply type;
sudo kill 1430
And hopefully the process should be terminated. If you're unsure type ps -A again and see if it remains.
Hope this helps! Like you I have little experience with MATLAB and Simulink and the errors are a right pain!
  1 Comment
Ascension
Ascension on 11 Jan 2018
Hi Tom, just a small correction, you forgot to add -9 to the command sudo kill -9 XXXX. Thanks!

Sign in to comment.


Sam McDonald
Sam McDonald on 6 Mar 2017
Most error messages in Simulink try to point you to the cause of the issue and give you hints or suggestions to try. Have you tried the suggested action? Choose a different port number by opening Hardware Implementation > Target Hardware Resources > External mode pane and entering in a number between 1024 to 65535. It seems like another process is using that same port number, so you could also try killing that process if you are able to. It depends, of course, on what that process is and if you want to kill it.
If you are looking for more information on the Hardware Implementation settings, visit the MathWorks Documentation page for the Support Package for Raspberry Pi:

Products

Community Treasure Hunt

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

Start Hunting!