Raspberry Pi 3 Connection Problem

My pc connects to Pi 3 with Wifi.
And this is working:
mypi = raspberrypi('192.168.88.102', 'pi', '123456')
message = mypi.connect
openShell(mypi,'ssh')
But when I try to use:
mypi = raspi('192.168.88.102', 'pi', '123456')
It is fail.And turns out below:
错误使用 raspi (line 169)
Cannot establish a TCP/IP connection to the board with device address "192.168.88.102".
原因:
错误使用 raspi (line 165)
Cannot create a communication link with the remote server. Please check the input arguments(ADDRESS and PORT) and make sure
the server is running.
Additional Information: 由于目标计算机积极拒绝,无法连接。.
And the supply power is 1A,
Somebody know why?
Thanks a lot.

13 个评论

can you ping your Pi and post the response you getting? Type in Matlab command window
!ping 192.168.88.102
I have try,and it works
正在 Ping 192.168.88.102 具有 32 字节的数据:
来自 192.168.88.102 的回复: 字节=32 时间=9ms TTL=64
来自 192.168.88.102 的回复: 字节=32 时间=7ms TTL=64
来自 192.168.88.102 的回复: 字节=32 时间=9ms TTL=64
来自 192.168.88.102 的回复: 字节=32 时间=9ms TTL=64
192.168.88.102 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 7ms,最长 = 9ms,平均 = 8ms
What Operating system are you running on your PI?
Raspbian
I suspect you have some issues with ports in your network (either PI or computer you are connecting from). In your PI terminal could you run (and post output)?
netstat -t -l -n
Also would you be able to connect pi to different network and/or computer and see whether problem is persistent?
Thanks for your answer, this is the result, Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:18730 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
Apart from connecting to different network and/or computer (maybe plug it directly to computer via Ethernet?) I am out of ideas I am affraid
Now I update the matlab to 2016a,also download the Raspbian Jessie full version. The connection is not working too:
r=raspi;
it turn out:
索引超出矩阵维度。
出错 raspi/getLEDConfiguration (line 684)
trigger = ret{1};
出错 raspi/getAvailablePeripherals (line 897)
obj.LED.(id).Trigger = getLEDConfiguration(obj,name);
出错 raspi (line 202)
So do you have any idea? Thanks.
It seem some problem with the led functon. So I open the raspi function and stop the led function below:
% obj.LED.(id).Trigger =
% getLEDConfiguration(obj,name);%Stop this function by myself.
And the connection is fine.
That's a strange problem, can you please bring it up with matlab support so it can be fixed in future updates?
Yes,it is strange.
I am a new comer. How can I bring the problem to matlab support?
Also,I try to use the system of matlab version for the Pi 3(" * raspbian_jessie_ *lite_02_26_2016_2gb.img**").
It is a lite version.
And Everything works fine in matlab or simulink. Espcial the camera part(V4L2 block) in simulink.
Matlab seems not support the official raspbian full version system.
Please find matlab support page appropriate for your country and click 'contact us'

请先登录,再进行评论。

回答(1 个)

Richard
Richard 2017-8-1
How did you mange to connect raspberry pi to matlab via wifi? I tried multiple methods but none of them works.

类别

帮助中心File Exchange 中查找有关 MATLAB 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