MSP protocol support

Hello everyone, noob question here and i appreciate your help. I setup correctly my first arduplane based wing, and i am trying to setup MSP to get OSD/telemetry on my DJI Digital FPV goggles. I am using UART 6 on holybro kakute F4 v2 (Serial 1), so i setup serial1_protocl = 30 and serial1_baud = 115. I have also setup MSP_options to 1. I wired DJI air unit TX to uart 6 RX and RX to uart6 TX. I still cannot see any osd in my goggles. Am i missing any step here ? Thanks

Hi, fyi it’s seems to have a bug in the display.
MSP_OSD_GPSD parameter show the speed gauge and no.

In parallel, I have an impossibility to move the Flight mode display. Iit’s like there a column shift/offset with Flight mode and GPS longitude

As a side effect, only longitude is display and not latitude.

I’m running your ArduPlane V4.1.0dev (ab5cf8ac). I didn’t see any update lastly so I suppose it’s the last build (but I could mistake)

Thanks for your support.

Jean

I add my param file attached if help. 20200827_19h13_ranger1600_flaperon_DJIFPV_v2.param (19.4 KB)

I want to add some comments: since last DJI updates firmware, RX AND TX lines must be wired (not only TX from FC to RX Air unit)

Hi, sorry but no ETA, still under review…let’s hope soon :slight_smile:

1 Like

Hi, unfortunately I don’t have that board so cannot be of much help, params look good to me!

Hi Jean, you’re the first one to report problems with GSPD, unfortunately I no longer have a test unit so I can’t even try to reproduce your issues :frowning:
As for lat/lon position I remember that not all positions could be used and as soon as you moved to the right they would disappear, it’s a dji issue for I did the very same test with betaflight.

There’s a more recent version which does not add any features but it’s integrated with ardupilot OSD, OSD positions can be adjusted using mission planner OSD editor, it’s the version being reviewed by the dev team for inclusion in master, the branch is here configuration is quite different, you need to enable built in OSD and configure widgets on screen 1 using ardupilot standard OSD items, serial protocol is 33 and OSD_TYPE must be set to 3
Edit: for boards that do not have built in OSD you need to add “define OSD_ENABLED 1” at the end of the board hwdef file in /libraries/AP_HAL_Chibios/hwdef/


BMAC
Brian MacCleery

4h

Hi Alex,

Thank you so much for all your incredible work on this. It is a tremendous benefit to have a first class OSD on my DJI FPV headset.

I wanted to let you know that build 0.9 is not working on my F765-WING. No data appears on the DJI headset and I don’t see the MSP parameters listed in Mission Planner.

Hi Brian, there’s no msp build 0.9, latest is 0.7 unless you build it yourself from the PR branch as explained a couple posts back.

Hey Alex,

Could you add a build for Heli+Matek-f765?

I can see that Flow and range data is coming through. Thanks!

Hi Chris, I added the heli build on github

1 Like

Hi Alex,

Can you please compile arducopter + msp for matek h743?

I’ve now merged MSP support into master. New builds should appear on firmware.ardupilot.org in a couple of hours.
Huge thanks to @yaapu for the amazing work he has done on this feature!

3 Likes

Thanks @tridge it’s been a lot of fun but without your help it would not have been possible !

1 Like

Hey Alex, just wondering if there is any idea on having a working horizon line at all? Dark / night time flying could use this.

Other than that, it has been working extremely well for me for many flights now on F765-wing FC’s - thanks!

Hi all,
now that @Tridge merged MSP support in master MSP OSD parameters are shared with ArduPilot integrated OSD, older MSP_OSD_ parameters will no longer work!

Matek 3901.L0X

SERIAL_PROTOCOL = 32
SERIAL_BAUD = 115 (should be already set as default)
RNGFND_TYPE = 32
FLOW_TYPE = 7

DJI FPV Goggles or Goggles RE

SERIAL_PROTOCOL = 33
SERIAL_BAUD = 115 (should be already set as default)
MSP_OPTIONS = 0 use both TX/RX (default and preferred way)
MSP_OPTIONS = 1 only TX needed

OSD_TYPE = 3 (MSP)

OSD1_ENABLE = 1
OSD1_ALTITUDE_EN = 1
OSD1_ARMING_EN = 1
OSD1_ASPEED_EN = 1
OSD1_BATTBAR_EN = 1
OSD1_BATUSED_EN = 1
OSD1_BAT_VOLT_EN = 1
OSD1_BLHTEMP_EN = 1
OSD1_BTEMP_EN = 1
OSD1_CELLVOLT_EN = 1
OSD1_CLK_EN = 1
OSD1_CRSSHAIR_EN = 1
OSD1_CURRENT_EN = 1
OSD1_FLTMODE_EN = 1
OSD1_GPSLAT_EN = 1
OSD1_GPSLONG_EN = 1
OSD1_GSPEED_EN = 1
OSD1_HOMEDIR_EN = 1
OSD1_HOMEDIST_EN = 1
OSD1_MESSAGE_EN = 1
OSD1_PITCH_EN = 1
OSD1_POWER_EN = 1
OSD1_ROLL_EN = 1
OSD1_RSSI_EN = 1
OSD1_SATS_EN = 1
OSD1_SIDEBARS_EN = 1
OSD1_VSPEED_EN = 1
OSD1_WIND_EN = 1

Note: OSD positions can be adjusted using mission planner OSD configurator

Artificial horizon:

  • OSD_SIDEBARS ladders
  • OSD_CRSSHAIR crosshair
  • horizon line is unsupported (DJI firmware does not support it)

Ardupilot specific “features” and notes

  • OSD_MESSAGE enables the display of status text messages as a scrolling 12 chars text (12 is the maximum allowed by the DJI system). Each message is displayed up to SD_MSGTIME, then it is hidden. The OSD_MESSAGE widget is also used to display the current ardupilot flight mode (STAB, MANU, LOIT, etc) when there are no messages displayed. Upon flight mode changes the flightmode name will flash for 3 seconds even if there’s a text message scrolling, after the 3 seconds scrolling will resume for the remaining scrolling time.
    The same text area is used to display wind speed and direction.
  • OSD_SATS (gps sats number) will flash if there’s no fix (DJI issue shows 14 sats when no fix)
  • OSD_HOMEDIR and OSD_HOMEDIST will flash if HOME is not set.
  • OSD_ASPEED (airspeed) is supported as override of the OSD_GSPEED item, so if you enable airspeed display you’ll loose groundspeed display.
    Airspeed will flash if no estimate available.
  • clock will flash id no GPS lock (required for valid date/time)
  • cell and battery voltage will flash on battery failsafe
2 Likes

Thanks Brady!
unfortunately screen rendering is totally up to DJI, we only provide the telemetry info and the goggles render them on screen, so for the horizon line we’ll need to wait a DJI firmware update supporting it!

That makes sense, it hadn’t actually occured to me that it’s a rendering issue rather than anything else.

Fingers crossed DJI include that in the next round of FW updates, along with other options people are asking for.

1 Like

@yaapu thanks for this awesome addition first of all! i’d appreciate help on how to run the osd mockup in SITL (WSL/Ubuntu). running sim_vehicle.py --osd on master i do get the standard maxchip osd mockup on OSD_TYPE = 2, but i can’t seem to wrap my head around how to get the MSP OSD running on AP_MSP/Tools/msposd.py?

thanks in advance,

basti.

EDIT: nevermind, got it running by typing
./../libraries/AP_MSP/Tools/msposd.py & sim_vehicle.py --osd
when starting SITL from vehicle folder.
working great, thanks again!

1 Like

I believe Henry will be documenting this soon, but here is a rough guide:

  • build with sim_vehicle.py with --osd option
  • param set OSD_TYPE=3
  • param set MSP_OPTIONS=1
  • param set SERIAL2_PROTOCOL=33
  • restart SITL
  • in a separate terminal, run libraries/AP_MSP/Tools/msposd.py
  • optionally load parameters from libraries/AP_MSP/Tools/osdtest.parm to get more elements displayed

You can also run on a real board. I find it useful to run against OTG2 on F7/H7 boards. Just set SERIALn_PROTOCOL=33 for the last SERIALn port and connect to the 2nd USB endpoint for the board using msposd.py --port /dev/XXXXX

1 Like

thanks @tridge actually it’s the additional terminal i’m struggling with under wsl/ubuntu. combining commands with a & separator from a single command line seems like a quite convenient alternative, requiring no additional settings.

one thing i could’t figure intuitively was how to bring the flightmodes on screen. reading code told me i’d find them in the message panel. would it be an option to put the flightmodes into the actual flightmode panel?

cheers and thanks again for those great additions!

Hi basti, that’s not possible because DJI goggles render only a very limited set of flightmodes based on a bitmask STAB,HORIZON, HEAD, FS and RESCUE.
What I’ve done is hide all modes except for failsafe which is rendered as !FS! by the goggles (and makes sense for ardupilot users)
We have no control on how the goggles render items we feed telemetry and the goggles render them on screen .

1 Like