Raspberry pi connection error

4 views (last 30 days)
Yujin Goto
Yujin Goto on 18 Jan 2019
I am trying to connect MATLAB to the Raspberry pi by with following command, but this error happens.
I choose "Customize the existing ..." when I select Linux operating system, bacause it didn't work well with the other way(tried all network selection). And all peripheral modules are enabled now.
How can I solve this?
>> rpi = raspi('xxx.xxx.xxx.xxx', 'pi', 'xxx');
### Updating Raspberry Pi I/O server...
### Connecting to board...
### Connected to 172.20.10.5...
### Creating server folder...
### Transferring source files...
### Building MATLAB I/O server...
Error executing command "make -C /opt/MATLAB/server_v18.1.0 -f Makefile". Details:
STDERR: server.c: In function ‘bindSocket’:
server.c:44:13: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness
[-Wpointer-sign]
sprintf(serverAddr, "tcp://*:%d",port);
^~~~~~~~~~
In file included from server.c:1:0:
/usr/include/stdio.h:366:12: note: expected ‘char * restrict’ but argument is of type ‘unsigned char
*’
extern int sprintf (char *__restrict __s,
^~~~~~~
server.c:55:25: warning: pointer targets in passing argument 2 of ‘nn_bind’ differ in signedness
[-Wpointer-sign]
ret = nn_bind(sock, serverAddr);
^~~~~~~~~~
In file included from server.c:14:0:
/usr/local/include/nanomsg/nn.h:352:15: note: expected ‘const char *’ but argument is of type
‘unsigned char *’
NN_EXPORT int nn_bind (int s, const char *addr);
^~~~~~~
server.c: In function ‘main’:
server.c:128:15: warning: unused variable ‘thread’ [-Wunused-variable]
pthread_t thread;
^~~~~~
server.c:127:15: warning: unused variable ‘clientSock’ [-Wunused-variable]
int sock, clientSock;
^~~~~~~~~~
handler.c: In function ‘receiveRequest’:
handler.c:232:26: warning: passing argument 2 of ‘sockRecv’ from incompatible pointer type
[-Wincompatible-pointer-types]
ret = sockRecv(sock, req, sizeof(REQUEST_Header_t));
^~~
handler.c:116:12: note: expected ‘char *’ but argument is of type ‘REQUEST_t * {aka struct <anonymous>
*}’
static int sockRecv(int sock, char *req, int size)
^~~~~~~~
handler.c: In function ‘executeCommand’:
handler.c:588:13: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation]
while(fgets(tempBuff,40 ,fp)!=NULL);
^~~~~
handler.c:589:13: note: ...this statement, but the latter is misleadingly indented as if it is guarded
by the ‘while’
{
^
handler.c:694:60: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
I2C.c: In function ‘I2C_open’:
I2C.c:29:23: warning: unused variable ‘i2c_funcs’ [-Wunused-variable]
unsigned long i2c_funcs = 0;
^~~~~~~~~
I2C.c: In function ‘EXT_I2C_readRegister’:
I2C.c:81:22: warning: assignment discards ‘const’ qualifier from pointer target type
[-Wdiscarded-qualifiers]
msg[0].buf = &reg;
^
I2C.c: In function ‘EXT_I2C_writeRegister’:
I2C.c:120:22: warning: assignment discards ‘const’ qualifier from pointer target type
[-Wdiscarded-qualifiers]
msg[0].buf = &reg;
^
I2C.c:124:22: warning: assignment discards ‘const’ qualifier from pointer target type
[-Wdiscarded-qualifiers]
msg[1].buf = data;
^
I2C.c: In function ‘EXT_I2C_write’:
I2C.c:154:19: warning: assignment discards ‘const’ qualifier from pointer target type
[-Wdiscarded-qualifiers]
msg.buf = data;
^
joystick.c: In function ‘EXT_JOYSTICK_INIT’:
joystick.c:45:25: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
for(ii=0; ii<100 & glob_buffer.gl_pathv[i] != '\0'; ii++)
~~^~~~
joystick.c: In function ‘EXT_JOYSTICK_READ’:
joystick.c:82:17: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
for(ii=0;(ii<100 & sh_evdevName[ii] != '\0');ii++)
~~^~~~
frameBuffer.c: In function ‘EXT_FRAMEBUFFER_INIT’:
frameBuffer.c:45:24: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
for(ii=0;ii<100 & glob_buffer.gl_pathv[i] != '\0';ii++)
~~^~~~
frameBuffer.c: In function ‘EXT_FRAMEBUFFER_WRITEPIXEL’:
frameBuffer.c:71:9: warning: unused variable ‘ii’ [-Wunused-variable]
int ii ;
^~
frameBuffer.c: In function ‘EXT_FRAMEBUFFER_DISPLAYIMAGE’:
frameBuffer.c:98:17: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
for(ii=0; ii<100 & sh_fbname[ii] != '\0'; ii++)
~~^~~~
frameBuffer.c:96:10: warning: variable ‘fileName’ set but not used [-Wunused-but-set-variable]
char fileName[100];
^~~~~~~~
frameBuffer.c:95:9: warning: unused variable ‘pxllocation’ [-Wunused-variable]
int pxllocation=0;
^~~~~~~~~~~
alsa_rdwr.c: In function ‘set_hwparams’:
alsa_rdwr.c:155:47: warning: pointer targets in passing argument 2 of
‘snd_pcm_hw_params_get_buffer_size’ differ in signedness [-Wpointer-sign]
snd_pcm_hw_params_get_buffer_size(params, &audioData->bufferSize);
^
In file included from /usr/include/alsa/asoundlib.h:54:0,
from alsa_rdwr.c:24:
/usr/include/alsa/pcm.h:841:5: note: expected ‘snd_pcm_uframes_t * {aka long unsigned int *}’ but
argument is of type ‘snd_pcm_sframes_t * {aka long int *}’
int snd_pcm_hw_params_get_buffer_size(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TimerBasedRecorder.c: In function ‘allocateDataMemory’:
TimerBasedRecorder.c:183:35: warning: pointer targets in assignment differ in signedness
[-Wpointer-sign]
tmpPdata->FileMemBuff = (char *)malloc((TIME_STAMP_BYTES + GPIO_VALUE_BYTES +
GPIO_SUB_TOKEN_SIZE));
^
TimerBasedRecorder.c:197:21: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in
signedness [-Wpointer-sign]
sprintf(tmpPdata->memBuff,"gpio%d|", pData->perId);
^~~~~~~~
In file included from TimerBasedRecorder.c:1:0:
/usr/include/stdio.h:366:12: note: expected ‘char * restrict’ but argument is of type ‘unsigned char
*’
extern
STDOUT: make: ディレクトリ '/opt/MATLAB/server_v18.1.0' に入ります
[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
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DNANOMSG_TRANSPORT=1 auth.c -o
obj/auth.o
[Compiling] alsa_rdwr.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
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DNANOMSG_TRANSPORT=1 alsa_rdwr.c -o
obj/alsa_rdwr.o
[Compiling] TimerBasedRecorder.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
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DNANOMSG_TRANSPORT=1
TimerBasedRecorder.c -o obj/TimerBasedRecorder.o
[Compiling] UdpRecorder.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
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DNANOMSG_TRANSPORT=1 UdpRecorder.c -o
obj/UdpRecorder.o
[Compiling] AudioRecorder.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
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DNANOMSG_TRANSPORT=1 AudioRecorder.c -o
obj/AudioRecorder.o
[Compiling] recorder.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
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DNANOMSG_TRANSPORT=1 recorder.c -o
obj/recorder.o
echo [Linking]
[Linking]
Makefile:63: ターゲット 'build' のレシピで失敗しました
make: ディレクトリ '/opt/MATLAB/server_v18.1.0' から出ます
  1 Comment
Walter Roberson
Walter Roberson on 18 Jan 2019
the pointer type conflict for sockRecv is the only thing I see that would concern me. There are a series of warnings based on the theoretical difference between char and unsigned char but I have not seen any os use signed char since SunOS (before Solaris even).

Sign in to comment.

Answers (2)

Alexander
Alexander on 19 Feb 2019
Have you already resolved the problem? I have the same problem and cannot find any result.

Yujin Goto
Yujin Goto on 21 Feb 2019
I haven’t yet. Although I found a Github page that may be related to this error recommends to run some shell scripts to setup Raspbian OS manually, it stops until the script. Please try running shell scripts corresponding to your Raspberry pi OS version.
  1 Comment
chaitanya addala
chaitanya addala on 3 Apr 2019
i am facing the same issue. Github refers to some other library error. Can anyone help

Sign in to comment.

Categories

Find more on MATLAB Support Package for Raspberry Pi Hardware in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!