MATLAB Answers

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

37 views (last 30 days)
Madhumitha
Madhumitha on 22 Mar 2015
Commented: Abdullah Alkurdi on 12 Jan 2018
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?

  0 Comments

Sign in to comment.

Answers (2)

Murat Belge
Murat Belge on 24 Mar 2015
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 Comment

Abdullah Alkurdi
Abdullah Alkurdi on 12 Jan 2018
>> 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)

Sign in to comment.


Abdullah Alkurdi
Abdullah Alkurdi on 12 Jan 2018
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

Translated by