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

조회 수: 13 (최근 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);


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