Error while running raspi function to connect to external Raspberry Pi 3.

3 vues (au cours des 30 derniers jours)
Diego Sanchez Franco
Diego Sanchez Franco le 1 Mai 2018
Commenté : Ege Gediksiz le 2 Sep 2022
How can I solve the following issue? Thanks :)
mypi = raspi('xxxx','xxxxx','xxxxx')
### Updating Raspberry Pi I/O server...
### Connecting to board...
### Connected to xxxxx...
### Installing nanomsg Library (this might take a while)...
### Creating server folder...
### Transferring source files...
### Building MATLAB I/O server...
Error using raspi.internal.updateServer (line 114)
Error executing command "make -C /opt/MATLAB/server_v18.1.0 -f Makefile".
Details:
STDERR: auth.c: In function âverifyHashâ:
auth.c:28:5: warning: ignoring return value of âftruncateâ, declared
with attribute warn_unused_result [-Wunused-result]
ftruncate(fileno(fp), 0);
^
server.c:14:24: fatal error: nanomsg/nn.h: No such file or directory
compilation terminated.
make: *** [obj/server.o] Error 1
STDOUT: make: Entering directory '/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] 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
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_
-DNANOMSG_TRANSPORT=1 server.c -o obj/server.o
Makefile:53: recipe for target 'obj/server.o' failed
make: Leaving directory '/opt/MATLAB/server_v18.1.0'
Error in raspi.updateServer (line 1290)
raspi.internal.updateServer(varargin{:});
Error in raspi/launchServer (line 861)
raspi.updateServer(obj.DeviceAddress,...
Error in raspi (line 207)
launchServer(obj);

Réponses (5)

Carroll Guertin
Carroll Guertin le 11 Juil 2018
Modifié(e) : Walter Roberson le 5 Mar 2019
ssh or use command line in pi's desktop
Run these commands:
sudo apt-get update
sudo apt-get install libnanomsg-dev libasound2-dev
  3 commentaires
francois crafford
francois crafford le 19 Juil 2021
Thank you so much this also worked for me.
Ege Gediksiz
Ege Gediksiz le 2 Sep 2022
This also worked for me.

Connectez-vous pour commenter.


afagh mohagheghi
afagh mohagheghi le 21 Jan 2019
Same issue here, tried everything suggested, it did'nt work, any suggestions?
  1 commentaire
Carroll Guertin
Carroll Guertin le 22 Jan 2019
Hi afagh,
What is the error message now?
Did the "nanomsg/nn.h" error go away?

Connectez-vous pour commenter.


David
David le 3 Mar 2019
Hi,
Did you solve the problem? I'm facing the same issue here. I have installed the required packages through MATLAB Support Package for Raspberry Pi Hardware. The set up seemed to be completed, but when I try to create de raspi object with raspi() I get the same error than you do.
  4 commentaires

Connectez-vous pour commenter.


Osman Ertunc
Osman Ertunc le 27 Juin 2019
Hello guys, Did anybody solve this I have been trying for ages. Please write something here if you found a solution. I don't even have to know the solution. It is enough for me to know that there is a solution for this.
  2 commentaires
Carroll Guertin
Carroll Guertin le 27 Juin 2019
Hi Osman, Have you tried the apt-get commands and/or the "Hardware Setup" app that I wrote about in other comments?
Osman Ertunc
Osman Ertunc le 27 Juin 2019
Yes, I’ve tried it. It gives the same error. Is there any other solution that you could suggest. Genuinely, I am stuck. Also when I try with matlab raspbian image SD card keeps changing the partition. I can’t see what I wrote to SD card. I’ve formatted it in FAT32. But I can’t format it in FAT even with format applications. Currently, I am using 16gb raspberry manufactured SD Card. Any suggestion is fine please let me know!!

Connectez-vous pour commenter.


Omar Hadeed
Omar Hadeed le 18 Avr 2020

Community Treasure Hunt

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

Start Hunting!

Translated by