MSP protocol support

@yaapu,

I have been using your test branch for yaapu CRSF telemetry (https://github.com/yaapu/ardupilot/releases/tag/ver_0.8) and it works great!.
I also have a Matek 3901 in hands and want to try our on my kakute F4.
Is it possible to combine updates in these two test branches at this stage?

*I have no idea how much work it may add to you, so my apologies if this request sounds inconsiderate.

Hi,
MSP has been added to master which is the official ArduPilot dev version, you should download from https://firmware.ardupilot.org/Plane/latest/KakuteF4

Alex

1 Like

Hi,

So currently only the Dev Build (4.1.0+) supports MSP protocol?

I tried the dev build, but for the matek H743, during the initial install windows started installing drivers for it which resulted in 2 com ports showing up for the board and in QGC I couldn’t connect at all. Is that some Matek issue or what’s going on there?

Yes MSP is only in master 4.1.x

F7/H7 boards which support CAN are detected as dual serial ports,

The ArduPilot firmware provides two software USB interfaces, accessed simultaneously from the single physical USB connector. In Mission Planner, you will see two COM ports assigned to the autopilot (if not, see Troubleshooting section below). One is for the SLCAN interface, the other for the normal MAVLink based Ground Control Station (GCS) connection.

more info here SLCAN Access on F7/H7 Based Autopilots — Copter documentation

1 Like

Thanks!

Yea I got the Master build 4.1.0 insalled and can access with MP.

While the MSP_OPTIONS and MSP_OSD_NCELLS has appeared, the options for SERIALX_PROTOCOL doesn’t show options 32 and 33, also I don’t see FLOW_TYPE options for 7. I’ve set them anyway, but the status is still showing BadLidar Health and in the status i see rangefinder1 with status 0 and opt_m_x, opt_m_y, opt_qua, opt_x and opt_y are all 0 with and without movement of the quad.

Seems like something is still a miss. I’m using Matek H743-WING and the maek 3901 optical flow sensor. I’ve got it wired up the Serial 5 with 5v, GND, RX and TX.

EDIT: Alright, I figured it out. I was powering the FC with USB only and forgot to power it up with the battery causing the 3901 to not have power. After I powered it up I started getting readings from the sensor to the named fields that were all 0.

1 Like

Not sure if this is the correct thread for this, but there’s a strange anomaly in the log file, that the zero points for the graphs are offset. I did already put in the recommended value for flowxscaler = -800 so maybe I should start by zeroing those, but I’ll share this just in case:

EDIT: I double checked the flow_xy_scaler and the parameter wasn’t written will do another test and will post if fixed.

Yes the suggested parameter for FLOW_FXSCALER = -800 and FLOW_FYSCALER = -800 resulted in much better looking graphs as shown below. However the difference between X and Y is still apparent and the Y axis zero points are still a bit off. Can anyone suggest what value change would be appropriate for FLOW_FYSCALER as that seems to be the one that’s almost there but not quite.

X axis graph / Y axis graph (2 images available following the link):

1 Like

Just for others attempting this, I was able to get the Y axis right by using the FLOW_FYSCALER with -775 as value.
I did notice that once I removed the optical flow the EKF3 kept demanding optical flow sensor, even though I switched to EKF2 and disabled all the optical flow stuff that I could find. To solve that I ended up switching to older firmware.

1 Like

hello, I use latest firmware, matek405-std . All DJI OSD is good
But ESC Temperature is not update,it display 1 ℃,
I use ESC Telemetry , RPM Voltage Current Temperature is good ,I can see them in MP
what can i do? or it is bug?

Hi guys. Would it be possible to use the Matek OpFlow 3901-LOX sensor with an Arduino using bits of the code from here? I’m using a library that enables MSP on the Arduino, but I’m unsure how to pull the data from the sensor, as there is no datasheet that I can find. I’m unsure which section of the code here is pulling data from the optical sensor but I feel that I may be able to adapt this to work with an Arduino. Unsure if this is possible though so any feedback would be appreciated.

I have a Kakute F7 flight controller with a Matek OpFlow 3901-LOX sensor. I built the master branch with the following flags:
HAL_MSP_ENABLED
HAL_MSP_OPTICALFLOW_ENABLED // otherwise flow sensor was not found
HAL_MSP_RANGEFINDER_ENABLED // otherwise range finger was not found

The scale factor of the optical flow sensor seemed correct but there was a offset between the OF.FlowY and OF.BodyY graphs. The rangefinder data on the log also seemed very erratic. I’ll upload data logs in a couple of days.

The position hold was a lot worse when the optical flow sensor was enabled.

Any suggestions to improve stability?

Long time coming but I was finally able to test the range finder. It seems to work fine when the quad is connected by USB to Mission Planner, and the accuracy seems good. I know it’s good up to at least 1m. In flight however I’m getting this in consistent result after just a few cm. I was flying in POS-Hold and it was pretty clear the range finder wasn’t working. I was flying mostly over hard snow, but I also got over wet grass, mud and slush. Looking at the file none of that seemed to make much difference.

I have disabled the optical flow because it was my understanding it’s better to get one sorted out before trying both.

I’d appreciate any suggestions, or corrections to my settings.

Here’s the log:
https://cp.sync.com/dl/9a2a5cd60/6eqr5bg7-4qe3hwzd-bg92yxkq-zh6w78ng

Hello Alex,

I have struggling to get the DJI OSD on my Matek F405, I search lots of post on ardupilot website, but still no luck, I flashed the MSP protocol support test branch version 0.7 firmware, and enable protocal to 33, OSD TYPE MSP, MSP OPTIONS=0 pulliing mode, and set goggles display to customized OSD, but still no OSD.

and I flashed the 4.1 dev version firmware, and setting is same, still no luck, the baudrate is 115200.
can you check the setting for me and let me know which part is wrong?
MATEKF405WING DJI OSD.param (18.7 KB)

Hi, params look ok to me, but you are using serial2 which on your F405 board is UART5 which by default is TX only unless you define BRD_ALT_CONFIG= 1 which you did not, it’s in the official docs
https://ardupilot.org/copter/docs/common-matekf405.html
So either switch port or define BRD_ALT_CONFIG=1

Note: sorry, my mistake you’re using serial2 (UART4) and not UART2. UART4 is OK and should work just fine @115k. Also please note that custom OSD must be enabled in SETTINGS->DISPLAY->CUSTOM OSD menu of goggles.

Hello Yappu, thanks for your reply, I change the wiring, swith to UART3, and set serial1 protocal to 33 and Buadrate to 115k, still no luck, actually I flash the firmware to betafligt and enable the MSP, the betaflight OSD is working, So there is no issue with wiring and goggles setting.

Note, I just checked this https://ardupilot.org/copter/docs/common-matekf405-wing.html, Im using MATEKF405WING, so no need change the wiring, the MATEKF405 STD need change the UART.

@IcemanDZ Hi.
Im using also f405 wing. For me the osd is working with 4.1.0 dev Arduplane (NOT copter) fw. On serial 5 (uart 5) serial5_protocol 33…osd type 3, msp=0
Have you checked tx to rx and rx to tx connection between uart and vtx unit? Also a reboot needed after the settings.

Im sure the connection is Okay, I reflash to inav and betaflight, the MSP OSD is working, but however, its not working on Arduplane.
Could you please share your settings?

Sorry for bother you again, still no luck, I flashed the MSP protocol support test branch version 0.7 3 firmware, and enable protocal to 33, OSD TYPE MSP, MSP OPTIONS=0 pulliing mode, and set goggles display to customized OSD, but still no OSD. and I flash the firmware back to Betaflight and Inav without change the wirings, the MSP OSD is working fine. That makes me very confused, becaused I already PMed you in the form, and send you the parameter, you said the settings seems Okay, and I tried another F405WING, still no luck. and the DJI goggles and Air unit are both in latest firmware. and I enabled the cutom OSD on goggles.F405WING OSD.param (19.4 KB)

Could you please check the parameter again, and let me know which part I need change? also which firmware I need flash?

Hi, you need to use latest official ardupilot firmware, for plane it would be ArduPilot firmware : /Plane/latest

I did all the development on the matekF405-wing so pretty sure it works all right, I need to test your setup on my board or send you a working param file, but I don’t have much time lately so please be patient :frowning:

Alex

Great! flash the latest firmware, its working now! in the first time I try to use the latest firware, this is no protocal 33 and MSP options, anyway, thanks a lot.

2 Likes