Error using raspi - raspi.inte​rnal.updat​eServer

4 visualizaciones (últimos 30 días)
Marek Cherubin
Marek Cherubin el 2 de Dic. de 2017
Comentada: Marek Cherubin el 22 de En. de 2019
After successful installation of "MATLAB Support Package for Raspberry Pi Hardware"
- ssh working, targetupdater passed its upgrade process fine,
I get errors after executing
mypi = raspi()
Did anyone experienced similar problem and found the solution?
my system: Windows 7 x64
I found similar error described in "Comments and Ratings" here:
suggested FIX doesn't solve my problem
error message below:
### Updating Raspberry Pi I/O server...
### Connecting to board...
### Connected to 192.168.0.58...
### 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.2.0 -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.2.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
-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.2.0'
Error in raspi.updateServer (line 1205)
raspi.internal.updateServer(varargin{:});
Error in raspi/launchServer (line 805)
raspi.updateServer(obj.DeviceAddress,...
Error in raspi (line 205)
launchServer(obj);

Respuestas (1)

Mulia Pratama
Mulia Pratama el 3 de En. de 2018
Hi...I have exactly the same problems with you. But I managed to solve it by rather in a cowboy way. I realize that when we try to connect to Pi, matlab transfer some source files to be compiled and failed, in this case the 'devices.c' file. I also realize that when matlab transfers these files it simply overwrite the files that already exist in Pi at /opt/MATLAB/server folder from the previous connecting attempt. My idea is to replace original 'devices.c' with the modified one check : https://www.mathworks.com/matlabcentral/fileexchange/45145-matlab-support-package-for-raspberry-pi-hardware anyway...here is what I did:
1) After I execute the command: mypi=raspi('xxx.xxx.x.x','yy','zzzzzz')
2)Then I wait for the computer to transfer the source files to the Pi (you can see the status from the matlab command console). At this short time window, just before the file transfers finish, you should be able to replace the file 'devices.c' that has been modified by means of commenting out "#ifndef HAVE_STRNDUP ... #endif" section in devices.c in the '/opt/MATLAB/server_vxx.x.x'
yes, it should happen in a short time window to replace the file, including to click the overwrite button in the following pop up message. But, here is the trick...
at first attempt, the failed one, in your raspberry, you copy the file devices.c to other location and modify the file as mentioned before. After that, you right click and copy the modified file. point the file explorer to /opt/MATLAB and prepare/station your pointer position at the 'server' folder in left pane. Back to matlab in your computer, execute the command (step 1) and then wait for the right moment to paste the file in your raspberry. don't forget to hit the overwrite button.
I had to do this way two or three times before success.
  2 comentarios
afagh mohagheghi
afagh mohagheghi el 21 de En. de 2019
Same issue here, tried everything suggested, it did'nt work, any suggestions?
Marek Cherubin
Marek Cherubin el 22 de En. de 2019
My solution (worked in v2017b) based on replace of raspi.m and devices.c files.
Try to find correct versions.
After replacing of these files, execute the following commands at MATLAB command window:
clear pcode;
clear classes;
rehash path;
rehash toolbox;
rehash pathreset;
rehash toolboxreset;
rehash toolboxcache;

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB Support Package for Raspberry Pi Hardware en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by