How do I change the MatLab (Simulink) connection parameters to a Raspberry Pi

2 views (last 30 days)
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?

Answers (1)

Madhu Govindarajan
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)
  1 Comment
Camilla Aristizabal
Camilla Aristizabal on 29 Sep 2015
Thanks for the response. I was using r2015a - and the installation package. And ... the Pi was wirelessly connected to my network using an 802.11AC adapter not supported in the 3.18 Pi kernel. I did get it to work - if anyone else asks: At the point at which we move to the 'target updater' phase, I stopped, and did a kernel update to 4.1.6-v7 and reinstalled the wifi driver. Then, having selected the 'home network auto' the software was able to locate the pi and finish the last step to connect the MatLab server on the Pi. You may wonder, if I can get the kernel updated, why I could not use the same method to 'finish' your install. So do I. :) It cones down to needing a way to tell the install software what the correct IP address of the Pi is AFTER you enter the 'Targetupdater" phase. BTW - I did know what ip it was going to be assigned on the other network - but entering that in the 'manual' cycle of installation also did not work. In any event its all good now - and I am looking forward to experimenting with the Pi and MatLab. Thanks!

Sign in to comment.

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!