I want to attach an AP_Periph board over serial/MSP to a Linux based FC. I think that it does not matter, but concretely, I have a “Matek M10-L4-3100” which I want to connect to an “OBAL GY-91”.
According to the various documentation options, I created the following configuration:
SERIAL2_PROTOCOL = 32
SERIAL2_BAUD = 115
GPS1_TYPE = 19
BARO_PROBE_EXT = 4096
BARO_PRIMARY = 1
COMPASS_TYPEMASK = 0
When running sudo ./arducopter --serial2 /dev/serial0
, I get plenty of evidence that this is not working:
- I get a “No Compass backends available” log message
- When using
LOG_DISARMED = 1
and analyzing the created logs, none of the MSP sensors is shown or healthy
Checking the /dev/serial0
device config reveals that the baudrate is configured to 0, which definitely seems to be wrong:
$ stty -F /dev/serial0 -a
speed 0 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 0; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke -flusho -extproc
The serial hardware itself seems to be ok. For example, when I run sudo ./arducopter --serial0 /dev/serial0
connecting SERIAL0
to the hardware serial instead, I can receive the “No Compass backends available” message via an FTDI cable connected to the hardware serial. Additionally, the serial device is configured in a more reasonable way then:
$ stty -F /dev/serial0 -a
speed 115200 baud; [...]
Does anyone have any idea what’s going on here? Is MSP not supported on Linux? Or am I overlooking anything?