Mavlink data displayed on Taranis, without converter

3689620635?profile=original

Having already got my OpenLRS set up to send Mavlink data back from my plane (using the gitsly OpenLRS branch), the next step was to get Mavlink data displayed on my Taranis.

The Taranis need inverted levels to serial pin in the module bay so I build an inverter from the schematic here. 

I saw this topic a while back: MAVLink data displayed on OpenTX (9X/9XR/etc) radio screen via OpenLRS, plus telemetry pass-thru to PC and assumed this would also work on Taranis. No such luck! There is no EXT=MAVLINK option for Taranis in the configurator. 

However I managed to get the OpenTX build environment set up on Ubuntu following the instructions here without too many difficulties. Then is was a matter of redirecting the telemetry bytes into the existing mavlink code, and displaying the Mavlink settings and telemetry screens rather than the Frsky ones. I was quite surprised when it all worked however!  The Mavlink serial is also available from the serial connector on the OpenLRS module so that can be connected to a PC or Android device.

In the original 9X Mavlink firmware it was not possible to select which telemetry protocol to use except by reflashing. I need a mixture of S.Port and Mavlink telemetry depending on which plane I'm flying so that didn't suit me too well. I added an option in the model menu telemetry options to use Mavlink rather than S.Port or Dbus, so each model can have it's Mavlink or Frsky telemetry received and displayed :) . 

I also thought it would be useful to have the radio read the flight modes as they are receiver over Mavlink, this wasn't too hard to incorporate either. I created sound files for each Arduplane mode and added code to play them on receipt of a new mode.

Something else I would like do is to copy the Mavlink data into the normal Frsky variables so that they can be used in the normal way, i.e. read out, used in Lua scripts and for vario sounds etc.. It's on the to-do list.

Hopefully this will be useful to some people out there, I will post the code after I get a chance to clean it up slightly as it is a bit of a hack! For now the binary and sound files are here (they need to be in the SOUNDS/en folder):

https://drive.google.com/folderview?id=0B4xnWmfKh4FrVFl4YlU1Zm9nQU0&usp=sharing

Cheers,
Sam

3689620752?profile=original3689620710?profile=original

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Any binaries out there for the gitsly branch?

  • At last I succeded to connect the Taranis through an orange RX 433MHz module running OpenLRSng Gitsly branch with a PC or a smartphone connected via bluetooth to the Orange Tx module and with the telemetry displayed in the remote control.

    This last part is because of your amazing work Sam so THANK YOU VERY MUCH!

    PS: It was not clear for me how to set the baudrate in the Taranis until I found your comment here.

    PS2:I will make a video about all this work and post it on youtube so it might be helpful for the community. One might find my channel by searching NEVdD on YouTube. This specific video will be available probably by August 2015.

  • Hi Sam,

    amazing work! Have you ever tried to commit your work to the upstream OpenTX project? That way your changes would be maintained by the upstream project and your changes would "stay alive" in newer revisions of OpenTX without having to adjust them constantly by yourself.

    Regards,

      Holger

  • Hi

    I have tried setting it up, on openlrsng i set telemetry to "yes" and data buadrate to 19200.

    on APM i set serial1 to 19

    on you Opentx firmwere i set baudrate to 19200 and telemetry type mavlink, but when i flip the mavlink data pages i don't get any data and page 2 show "inv. mav type", i am using arduplane for now not copter (not sure if it matters).

    on openlrs tx module i used BC547 and 3 1kOhm resistors for signal inverter.

    when i connect the openlrs tx module with FTDI i can't connect not with missions planner and not with openlrs configurator.

    any ideas what i am doing wrong ??

    thanks

  • Ok, I have verified it works okay with OpenLRSng gitsly branch at 57000 and 115200 baud. Maybe you can try removing the bt module in case that is pulling the serial line down too far? You definitely have baud rate set correctly (under Radio Setup, below 'Units')?

    The new firmware is bigger because I included Lua and heli support.

  • Hi 

    Yes i can connect, but only with flipflap firmware. On openLRSng v3.7.3 firmware i can connect to apm but telemetry is very slow, i don't know why :/

    Ok,i try with arduplane 3.1.

    Why the new firmware you made for the taranis is two times bigger?

  • Hi,

    Yes the baud rate in the radio menu needs to match what the LRS or APM is outputting.

    Are you able to connect to Mission Planner to verify that the serial link is working?

    I'm using Arduplane 3.1. 

  • After several test, I have not managed to display the telemetry on the radio.
    I tried different value for the resistor of the inverter (between 1k and 4.7k)
    I also trying the openLRSng v3.7.3 firmware and connect directly the apm  to the radio with different datarate.
    Baudrate setting in the radio menu matter?
    I have to check lua script in opentx before flashing the radio?
    I use ArduCopter v3.2, and you?

    I must receive a FrSky receiver in the week so I can check if the telemetry work.

    Thank you.

  • By the way, for anyone wanting to compile from source the options I use are 

    make PCB=TARANIS HELI=YES LUA=YES EXT=FRSKY-MAVLINK

    My next goal is to copy all the mavlink telemetry data into the frsky telemetry variables consistent to how it is done in this project http://diydrones.com/forum/topics/amp-to-frsky-x8r-sport-converter

    That way the Lua scripts developed to display mavlink data using the frsky variables can work with the mavlink serial input.

    Cheers,

    Sam

  • Hi Sam,

    Yes, I have build a inverter with a 2n222 in Taranis and a bt module, so i can check if the telemetry work or not with mission planner.
    I tried with the same firmware that you (openlrsng) but I can not seem to run the telemetry.
    I must try again with different setting.
    No, i'm not able to configure output to 57600 baud witch this firmware.
    I try your new firmware immediately

    Thank you very much ;)

This reply was deleted.