Mavlink to FrSky S.Port Passthru Converter for LRS or PX4 Pro

Colin, I need more information. Did you flash with ground mode when you test directly to Taranis?

ok buddy thanks for you time
here is the config.h file i used
config.h (21.7 KB)

Ok, I just flashed v2.35 with your config.h and tested with a Teensy 3.2 into my Horus and it works fine here.

However, I did make 2 changes to config.h:

#define RSSI_Source 3 // Dummy RSSI - fixed at 70%

activate (un-comment) purely for testing, and to ensure we have RSSI

//#define Request_Missions_From_FC // Un-comment if you need mission waypoint from FC - NOT NECESSARY RIGHT NOW

Comment out. Not needed.

20191026_081832%20(Small)

Note the display voltages are low because my test Pixhawk on the window sill is powered only by the usb cable. :slight_smile:

Here is your config.h after the changes and the one I used for the test:
config.h (21.7 KB)

Here is the usb debug monitor output:

MaTt_C

That’s great news! Yes that board is supported and configured if you choose option 1 here:

//*********************************************************************************************
//********************* S E L E C T E S P 3 2 B O A R D V A R I A N T *******************

#define ESP32_Variant 1 // ESP32 Dev Module - there are several sub-variants that work
//#define ESP32_Variant 2 // Wemos® LOLIN ESP32-WROOM-32_OLED_Dual_26p

//********************************************************************************************

1 Like

Thanks buddy i just recompiled it with that config.h file
up loaded it to teensy its working now :+1:
i will load it to the RDF TXMOD later on tonight its dinner time and the wife is calling



well works great on the taranis and the horus X12S
Thanks Eric

link to the mod for others how two

Thanks for the pics Colin. :+1::smile:

no thank you for all the time you have put into it the project
is there a way for Is there a way of injecting frsky sensors into it mavlink ? like lipo + airspeed + fuel level + temp + rpm i would like to use RDF900x modems but they only works mavlink messages so i will lose all my frsky sensors on some of my large UAVs

Well, for about a third the cost, maybe a Jumper T16 would fit the bill. It did for me.

Good luck.

1 Like

Would you mind creating a step-by-step How-to instructions for the RFD900 conversion? This would be a great integration/partnership with the Yaapu LUA.

Thanks.

Ok just put it here

Thanks for sharing this Colin, very well done!

Hello,

we had a strange problem today, hope someone could help me out with this.

We used this amazing script from Alex with the Horus X12 and the X8R Receiver together with the Teensy. Worked great all the time!

We now used it with the R9M and R9 for longrange. We receive the telemetry, but it stops transfering it after a couple of minutes. I still can control the drone, but don´t receive any new telemetry data. Only after I disconnect and connect the receiver or the battery from the drone, the transfer of the telemetry starts again.

We used than the same remote control again with the X8R receiver and it worked fine.

Does anybody know, where the problem could be?

Hi Christian, I personally have been using the R9M/R9 with a Horus and Alex’s lua for several months. Can you please tell me more about your configuration. I assume you now do not need the Teensy, but set serial in your FC to protocol 10, and use an inverter/converter.

If you are using the Teensy instead, that’s ok, but what version? Please flash the latest from GiHub.

I am having some trouble setting up the mav2pt converter. I followed this guide to get telemetry on a horus X10S Express, but there is no telemetry shown. I simply uploaded the precompiled

Mav2PT_v2.46.ino.TEENSY31.hex

firmware to a Teensy 3.2, but it doesn´t work. How is the precompiled hex firmware configured? Any ideas what I could try next? The Teensy led does blink once every second.

Hi David

EDIT 2019/12/21 am

I checked the default configuration in v2.46 and found that the default mavlink baud rate was 921600. It’s now changed to 57600, and also AutoBaud is activated, so that it should match your Mavlink baud rate regardless. You should get the LED on solid when the Teensy sees good Mavlink telemetry.

So please give it a try now.

It would be better in the long run to set up the Arduino IDE, and compile and flash. That way you will have full control of configuration, and see all the status messages

Hi Eric,

I set up the Arduino IDE and uploaded a compiled version and now the led is solid, but I still don´t get any telemetry data on the yaapu widget. I have connected Pin 1 on the Teensy straight to the bottom pin of the Horus. Does it need a level shifter on the S.Port? Also could you please take a look at my config.h? I am using v2.49 now.

#define mvBaudFC 57600 // Mavlink to/from the flight controller - max 921600 - must match FC or long range radio
#define frBaud 57600 // S.Port baud setting - default 57600
#define AP_Name “Mav2Passthru” // The AP SSID that we advertise ====>
#define AP_Pw “password” // Change me!
#define STA_Name “OmegaOffice” // Target AP to connect to <====
#define STA_Pw “targetPw”

/*
“EZ-WifiBroadcast” / “wifibroadcast”
“TXMOD-54-DD-FE” / “txmod123”
*/

// Do not enable for FlightDeck
#define PlusVersion // Added support for 0x5009 Mission WPs, 0x50F1 Servo_Channels, 0x50F2 VFR_Hud

// Choose only one of these three modes
#define Ground_Mode // Translator between Taranis and LRS tranceiver (like Dragonlink, ULRS, RFD900…)
//#define Air_Mode // Translator between FrSky receiver (like XRS) and Flight Controller (like Pixhawk)
//#define Relay_Mode // Translator between LRS tranceiver (like Dragonlink) and FrSky receiver (like XRS) in relay box on the ground

// Choose only one of these Flight-Controller-side I/O channels
// How does Mavlink telemetry enter this translator?
#define FC_Mavlink_IO 0 // Serial Port (default)
//#define FC_Mavlink_IO 1 // BlueTooth Classic - ESP32 only
//#define FC_Mavlink_IO 2 // WiFi - ESP32 or ESP8266 only
//#define FC_Mavlink_IO 3 // SD Card / TF - ESP32 only

// Choose only one of these GCS-side I/O channels
// How does Mavlink telemetry leave this translator?
// These are optional, and in addition to the S.Port telemetry output
#define GCS_Mavlink_IO 9 // NONE (default)
//#define GCS_Mavlink_IO 0 // Serial Port - Only Teensy 3.x and Maple Mini have Serial3
//#define GCS_Mavlink_IO 1 // BlueTooth Classic - ESP32 only
//#define GCS_Mavlink_IO 2 // WiFi - ESP32 and ESP8266 only
//#define GCS_Mavlink_IO 3 // WiFi AND Bluetooth simultaneously - ESP32 and ESP8266 only

// NOTE: The Bluetooth class library uses a great deal of application memory. During Compile/Flash
// you may need to select Tools/Partition Scheme: "Minimal SPIFFS (1.9MB APP …)

//#define GCS_Mavlink_SD // SD Card - ESP32 only - mutually inclusive with other GCS I/O

//#define BT_Master_Mode true // Master connects to BT_Slave_Name — false for BT Slave Mode
const char* BT_Slave_Name = “Crossfire 0277”; // Example

//#define Start_WiFi // Start WiFi at startup, override startWiFi Pin

// Choose one protocol - for ESP32 only
//#define WiFi_Protocol 1 // TCP/IP
#define WiFi_Protocol 2 // UDP

// Choose one mode for ESP only - AP means advertise as an access point (hotspot). STA means connect to a known host
#define WiFi_Mode 1 //AP
//#define WiFi_Mode 2 // STA

#define AutoAP // If we fail to connect in STA mode, start AP instead

//#define Battery_mAh_Source 1 // Get battery mAh from the FC - note both rx and tx lines must be connected
//#define Battery_mAh_Source 2 // Define bat1_capacity and bat2_capacity below and use those
const uint16_t bat1_capacity = 5200;
const uint16_t bat2_capacity = 0;
#define Battery_mAh_Source 3 // Define battery mAh in the LUA script on the Taranis/Horus - Recommended

#define SPort_Serial 1 // Teensy port1=pin1, port3=pin8. The default is Serial 1, but 3 is possible

// RSSI_Source is Automatic. Order of precedence:
// First: #109 SiK style RADIO_STATUS
// Second: #65 RC_CHANNELS
// Third: 35 RC_CHANNELS_RAW

//#define RSSI_Override // Dummy RSSI - fixed at 70%

//#define SiK_Rssi_Percent // #109 RSSI is already %, not relative to (0xff/100)

// Status_Text messages place a huge burden on the meagre 4 byte FrSky telemetry payload bandwith
// The practice has been to send them 3 times to ensure that they arrive unscathed at the receiver
// but that makes the bandwidth limitation worse and may crowd out other message types. Try without
// sending 3 times, but if status_text gets distorted, un-comment the next line
//#define Send_status_Text_3_Times

//#define Send_Sensor_Health_Messages
#define AutoBaud // UART Serial Only - Auto detect FC_Mavlink telemetry baud

//#define Request_Missions_From_FC // Un-comment if you need mission waypoint from FC - NOT NECESSARY RIGHT NOW

//#define Data_Streams_Enabled // Requests data streams from FC. Requires both rx and tx lines to FC. Rather set SRn in Mission Planner
#define Max_Waypoints 256 // Note. This is a global RAM trade-off. If exceeded then Debug message and shut down

// ****************************** Set your time zone here ******************************************
// Date and time determines the TLog file name only
//const float Time_Zone = 10.5; // Adelaide
const float Time_Zone = 2.0; // Jo’burg
bool daylightSaving = false;

Hi David, try this to see if the problem is Rossi related

#define RSSI_Override // Dummy RSSI - fixed at 70%

Also, I have had more than a few reports of port1 being damaged on the Teensy 3.xx. You could try:

#define SPort_Serial 3 // Teensy port1=pin1, port3=pin8. The default is Serial 1, but 3 is possible

If I define RSSI_Override it finally works!

Is this a problem related to the Teensy, or the RFD Modules? My setup is a Horus X10S Express with OpenTX 2.3.4 and the RFD868X Modules with the 3.07 firmware.

David, your RFD900 is not sending an RSSI record type in the telemetry stream. Make sure you have set the RSSI parameters correctly in Mission Planner. Follow the RFD900 setup instructions on the web. The is an option to debug RSSI in the config.h if you still have a problem.