I tried connecting the Raspberry Pi to my laptop. It says host not found with this error.

12 次查看(过去 30 天)
Error using raspi (line 160) Cannot establish an SSH connection to the board with device address "raspberrypi-DXxpbHI8JG".
Caused by: Error using raspi (line 156) Error executing command: Unable to open connection: Host does not exist I did enable SSH on pi. How do I solve this?

回答(2 个)

Murat Belge
Murat Belge 2015-3-24
Find out the IP address of your Raspberry Pi and try connecting using the IP address instead of the host name. First ping on the MATLAB command line:
>> ping <IP address of your Raspberry Pi>
And if ping is successful:
>> h = raspberrypi;
>> connect(h)
  1 个评论
Abdullah Alkurdi
Abdullah Alkurdi 2018-1-12
>> connect(h) Warning: The connect method of the raspberrypi object will be removed in a future release. You do not need to call the connect method anymore. > In raspberrypi/connect (line 187)

请先登录,再进行评论。


Abdullah Alkurdi
Abdullah Alkurdi 2018-1-12
if true
>> raspi
### Updating Raspberry Pi I/O server...
### Connecting to board...
### Connected to raspberrypi...
### Creating server folder...
### Transferring source files...
### Building MATLAB I/O server...
Error using raspi.internal.updateServer (line 90)
Error executing command "make -C /opt/MATLAB/server_v17.1.1 -f Makefile". Details:
STDERR: In file included from /usr/include/string.h:630:0, from devices.c:4: devices.c:56:11: error: expected identifier or ‘(’ before ‘__extension__’ char strndup(const char *s, size_t n) ^ make: ** [obj/devices.o] Error 1
STDOUT: make: Entering directory '/opt/MATLAB/server_v17.1.1' [Compiling] auth.c gcc -c -O2 -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos -I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam -Winline -pipe -D_DEBUG -D_MATLABIO_ auth.c -o obj/auth.o [Compiling] server.c gcc -c -O2 -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos -I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam -Winline -pipe -D_DEBUG -D_MATLABIO_ server.c -o obj/server.o [Compiling] handler.c gcc -c -O2 -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos -I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam -Winline -pipe -D_DEBUG -D_MATLABIO_ handler.c -o obj/handler.o [Compiling] devices.c gcc -c -O2 -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos -I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam -Winline -pipe -D_DEBUG -D_MATLABIO_ devices.c -o obj/devices.o Makefile:46: recipe for target 'obj/devices.o' failed make: Leaving directory '/opt/MATLAB/server_v17.1.1'
Error in raspi.updateServer (line 1194) raspi.internal.updateServer(varargin{:});
Error in raspi/launchServer (line 794) raspi.updateServer(obj.DeviceAddress,...
Error in raspi (line 203) launchServer(obj);
end

类别

Help CenterFile 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