How do I change the MatLab (Simulink) connection parameters to a Raspberry Pi
2 views (last 30 days)
Show older comments
I downloaded and installed the two RPi support packages - and Simulink had an additional setup step involving "targetupdater" which attempts to connect to the Pi using username or manually installed parameters (ip address). After completing, the "Test Connection" Failed, but I was able to PUTTY in using SSH.
In the sample to execute Linux commands remotely, the default connection to the Pi did not work. and attempting an ssh link did not work. I modified the connect explicitly to the known IP address and SSH now worked, but the message = h.connect still returns an error.
>> h = raspberrypi('192.168.1.105', '<pi>', '<raspberry>')
h =
LinuxServices with properties:
HostName: '192.168.1.105'
UserName: '<pi>'
Password: '<raspberry>'
BuildDir: '/home/pi'
>> openShell(h,'ssh') (This now works - and opens a terminal window
Then:
>> message = h.connect
Error using realtime.internal.LinuxServices/connect (line 59)
SSH connection to host 192.168.1.105 failed:
The system cannot find the file specified.
Something is missing, but (being new to both Simulink and matlab, I have no idea what :)
Perhaps there is a file or set of files that did not get to the RPi?
0 Comments
Answers (1)
Madhu Govindarajan
on 28 Sep 2015
The suggestions are for R2015a, if you are using other versions please mention that in your message.
Can you try using the following command to connect and share any error messages that you might get -
>> h = raspi(Your RPi's IP address, Your RPi's Username, password)
If this creates a raspi object in your MATLAB command window, you can then follow these examples - http://www.mathworks.com/help/releases/R2015a/supportpkg/raspberrypiio/examples/getting-started-with-matlab-support-package-for-raspberry-pi-hardware.html
See Also
Categories
Find more on 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!