How do I change the MatLab (Simulink) connection parameters to a Raspberry Pi
이전 댓글 표시
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?
답변 (1개)
Madhu Govindarajan
2015년 9월 28일
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
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!