This is an Arduino Sketch for converting FrSky S.Port telemetry data into the more common MAVLink format to be used with various groundstation applications. This should provide full telemetry as well as a functional moving map. S.Port data should be provided from a FrSky Transmitter such as the Taranis X9D.
Note that the sketch is currently in Beta state, as there is still more testing to be done.
Here's how to wire up an Arduino Nano for this project. Note that for other Arduinos, pinouts may vary. This graph assumes the arduino is powered with 5V via USB - you can power it directly from the TX module as well (by connecting to + on the S.Port), but make sure the voltage matches what your Arduino supports! Bluetooth was tested with a HC-05 module at 38400 bauds, others will most likely work as well. If you need a different baud rate, make sure to change it in the setup{}. You might need to use a voltage divider for your HC-05's RXD pin, as it may use 3.3V logic. Mine works without one for some reason.
You do not need to use a TX module for this to work, you can also connect the Arduino directly to the module bay pins if using the internal module. Check Google for the correct module bay pinout.
Tested with:
Simply flash the .ino file on any Arduino (tested on Arduino Nano), don't forget to include the provided libraries. The Arduino will then provide MAVLink telemetry data through its USB port at 115200 bauds, as well as at 38400 bauds on the optional Bluetooth module.
From your groundstation application, simply choose the appropriate COM port (or bluetooth device), set baud rate to 115200 for USB or 38400 for Bluetooth and hit "connect". If you are using Mission Planner, you might have to skip parameter fetching, as the Arduino does not output any parameter data.
The following groundstation applications have been tested and are known to be working with this sketch:
If you find any further problems, feel free to open an issue!
(c) 2019 David Wyss
Base Arduino to MAVLink code from https://github.com/alaney/arduino-mavlink
S.Port conversion library and sample code by Pawelsky from https://www.rcgroups.com/forums/showpost.php?p=29439177&postcount=1