I can't connect the Raspberry Pi 2 board with command "raspi('19​2.168.0.33​,'pi','ras​pberry');"

1 回表示 (過去 30 日間)
JangHo Cho
JangHo Cho 2015 年 6 月 5 日
回答済み: Drew Davis 2015 年 6 月 8 日
Hello, I purchased a raspberry pi 2 board recently and I want to connect it to MATLAB. I used 'raspi' function like this
mypie = raspi('192.168.0.33', 'pi', 'raspberry');
But the MATLAB answered like this.
Connection Failed : Connection refused.
I already tried to find the answer here but I can't find the appropriate answer. I 'pinged' 192.168.0.33. It was OK. I connected the board with putty.exe terminal it was OK. Even I can connect the board with 'mstsc' command in the MS Windows. :( Everything is Okay except connection to MATLAB.
What else should I try?
Does MATLAB support Raspberry Pi 2 ?

回答 (1 件)

Drew Davis
Drew Davis 2015 年 6 月 8 日
The Raspberry Pi 2 is supported
Try the following command in the MATLAB command prompt:
mypi = raspi;
rather than:
mypi = raspi('192.168.0.33', 'pi', 'raspberry');
According to the documentation for the support package, the latter call to create the 'mypi' object is used when you want to connect to a board that is using settings that are different than the previous successful connection.
The raspi object reuses the settings from the most recent successful connection to a Raspberry Pi board, including settings created during the setup process so you should be able to use the first call to create the object given that you were able to successfully setup the raspberry pi via the support package installer.

カテゴリ

Help Center および File ExchangeMATLAB Support Package for Raspberry Pi Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by