connect matlab to raspberry pi 3 B

Hi guys,
I am planing to connect raspberry pi with matlab. when i installed matlab sopported package. and then run belove command. its giving the error like below.
rpi = raspi('192.168.1.35', 'pi','raspberry')
### Updating Raspberry Pi I/O server...
### Connecting to board...
### Connected to 192.168.1.35...
### Creating server folder...
### Transferring source files...
### Building MATLAB I/O server...
Error executing command "make -C /opt/MATLAB/server_v18.2.1 -f Makefile". Details:
STDERR: In file included from I2C.c:10:0:
/usr/include/linux/i2c-dev.h:37:8: error: redefinition of ‘struct i2c_msg’
struct i2c_msg {
^~~~~~~
In file included from I2C.c:9:0:
/usr/include/linux/i2c.h:68:8: note: originally defined here
struct i2c_msg {
^~~~~~~
In file included from I2C.c:10:0:
/usr/include/linux/i2c-dev.h:89:7: error: redefinition of ‘union i2c_smbus_data’
union i2c_smbus_data {
^~~~~~~~~~~~~~
In file included from I2C.c:9:0:
/usr/include/linux/i2c.h:131:7: note: originally defined here
union i2c_smbus_data {
^~~~~~~~~~~~~~
I2C.c: In function ‘I2C_open’:
I2C.c:31:23: warning: unused variable ‘i2c_funcs’ [-Wunused-variable]
unsigned long i2c_funcs = 0;
^~~~~~~~~
I2C.c: In function ‘EXT_I2C_readRegister’:
I2C.c:83:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
msg[0].buf = ®
^
I2C.c: In function ‘EXT_I2C_writeRegister’:
I2C.c:122:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
msg[0].buf = ®
^
I2C.c:126: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:156:19: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
msg.buf = data;
^
make: *** [obj/I2C.o] Error 1
STDOUT: make: Entering directory '/opt/MATLAB/server_v18.2.1'
[Compiling] auth.c

2 Kommentare

Scott Huang
Scott Huang am 19 Jan. 2019
Bearbeitet: Scott Huang am 20 Jan. 2019
  1. similar errors when connecting 2018b to RPi 3 B+
  2. and the error message can't show the correct "font"
Scott Huang
Scott Huang am 21 Jan. 2019
ok ~, i solved this by using Matlab customized image(MathWorks Raspbian image).
but official Raspbian still can't work with matlab...no answer yet...
未命名.png

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Antonio Garcia
Antonio Garcia am 6 Jun. 2019

0 Stimmen

I also have similar problems when trying to connect Raspberry Pi 3B+ with Matlab 2018a and it seems impossible to solve the problem, but when I used Matlab 2019 (the las version), it works well. So, I think it's a matlab version problem.

Kategorien

Mehr zu MATLAB Support Package for Raspberry Pi Hardware finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by