Matlab does not connect with my PandaBoard

2 ビュー (過去 30 日間)
xxxxx
xxxxx 2013 年 3 月 20 日
コメント済み: Andreas 2014 年 7 月 11 日
I am trying to connect the PandaBoard with matlab using:
h = panda
h.connect
Matlab then gives te following error:
Error using LinuxServices.connect (line 58)
SSH connection to host 192.168.0.103 failed:
FATAL ERROR: Network error: Connection refused
if I try to connect with the PandaBoard using Putty, there is no problem connecting. Firewall is off, IP-adresses are good and they are directly connected.
Does anyone have any idea how to solve this?
  2 件のコメント
Matthias
Matthias 2013 年 6 月 11 日
I have exactly the same problem. Did you solve it?
I can access the PandaBoard with Putty and VNC, but not from within Matlab. I tried R2013a and R2012b, but no difference.
Ugur Yildiz
Ugur Yildiz 2013 年 6 月 16 日
I faced with the same problem with Raspberry Pi. I can connect with Putty and even get/put files via MATLAB command prompt as
C = raspberrypi;
C.getFile('/home/pi/ocr_pi.png');
but cannot connect
>> C.connect
Error using LinuxServices.connect (line 58)
SSH connection to host 192.168.2.76 failed:
FATAL ERROR: Network error: Connection refused
Anybody solved?
Windows 7 x64, R2013a, MATLAB installed on E drive, not the system drive.

サインインしてコメントする。

回答 (3 件)

Murat Belge
Murat Belge 2013 年 7 月 24 日
編集済み: Murat Belge 2013 年 7 月 24 日
Execute the following commands on a MATLAB prompt after replacing your MATLAB install location and the IP address:
>> cmd = 'echo y| "C:\Work\R2013ad\matlab\toolbox\idelink\foundation\hostapps\plink" -ssh -v -pw "raspberry" -P 22 pi@192.168.0.1 "echo Connection successful"'
>> system(cmd)
This will display verbose output while connecting to the board. This is exactly the same command "connect" method executes with the addition of "-v" switch that turns on the verbose output option. Post the output here. I might be able to diagnose the issue.
One thing you might want to try is to start MATLAB in administrator mode and try to connect.
  1 件のコメント
Pallab Maji
Pallab Maji 2013 年 9 月 28 日
I had similar problem. I did as you said and got following output:
>> system(cmd) Looking up host "" Connecting to fe80::f8ef:e403:1465:b44d%11 port 22 Failed to connect to fe80::f8ef:e403:1465:b44d%11: Network error: Connection refused Connecting to fe80::f8ef:e403:1465:b44d%11 port 22 Connecting to fe80::f8ef:e403:1465:b44d%11 port 22 Connecting to fe80::f8ef:e403:1465:b44d%11 port 22 Failed to connect to fe80::f8ef:e403:1465:b44d%11: Network error: Connection refused Network error: Connection refused FATAL ERROR: Network error: Connection refused
ans = 1

サインインしてコメントする。


Pallab Maji
Pallab Maji 2013 年 9 月 29 日
Hi,
I had a similar problem and solved it today. I was using a LAN splitter (which was connected to my router) to connect the pi and my pc to my local network. Now when I removed the splitter and connected both PC and the pi to the router, I was able to program it properly from Matlab. I don't know exactly why I am not able to connect to the pi from Matlab using the splitter because I could use putty to connect to my pi from my pc in this case. Any idea?

Ugur Yildiz
Ugur Yildiz 2013 年 10 月 11 日
編集済み: Ugur Yildiz 2013 年 10 月 11 日
Run Putty.exe in MATLAB tree "matlab\toolbox\idelink\foundation\hostapps\". If you have "Default Settings" with any Host name and with a connection type other than SSH, then clear hostname, select SSH and save the new "Default Settings".
@Murat Belge: Thanks for the source code of the pcode-secured "connect" method.
  1 件のコメント
Andreas
Andreas 2014 年 7 月 11 日
Thanks to your advice I solved my Problem with the Pi in External Mode. Thank you.:)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCommunications Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by