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

One more question. I now cannot discover sensors on my Horus. I used to be able to. I have not updated my Teensy. Apparently I do not need to for Passthrough telemetry and my widgets are working fine. Just curious if this is normal behavior.

Marc, are you sure that the flash was successful.

Could you possibly show me a screen snip of the error message/s. Perhaps you could tick “verbose”, for compile and upload, in Preferences. Some libraries use pre-compiled C, but the exact .h or .dll is not obvious since I have compiled a lot of the esp-idf examples (outside of the Arduino IDE) on my development PC.

Unfortunately I don’t have a Wemos-Lolin with LED variant board, but I’ve made a folder of information from the link you posted. It looks like a pretty simple board. Remember, some boards don’t auto-flash after compiling. You have to hold down the boot button when the compile finishes, until you see the flash connect take place, then let go. You should then see the flash progress % reported. When completed, swiftly click Tools/Serial Monitor.

I re-installed my Arduino IDE from scratch and started with the latest versions of the Git repo as I want to solve my ESP32 issues. Been a while since I did a fresh install…

Here are the issues I found:

  1. Arduino IDE did not like the My_Patched_ESP32_SD_Library files to be in the src subdirectory so I moved them and the compile error went away.

  2. Not sure I have the Mavlink libraries correctly installed. I just used that link you provided and installed that collection of mavlink libraries from the zipped git download c_library_v2-master.


    Still getting a load of compile errors. See attached. All relate to these librariescompile-error.txt (3.8 KB)

What am I missing here? Something silly as I did not have this issue before.

Thanks again,.

Marc

It looks like I’m having similar problems to what Marc’s seen. WiFi doesn’t configure and start correctly on the ESP32. Here’s the write-up I posted over on rcgroups:

Hello Folks,

I’ve been happily using this with Teensy in a couple of installations, along with an ESP8266. I wanted to get things reduced to a single board, so thought I’d try ESP32.

I’ve not had luck getting Wifi working on two different boards. The MavlinkToFrsky functionality is working fine. The Wifi functionality is not.

I’ve enabled the “Start_WiFi” define.
I’m using AP mode.
I’ve tried this on two completely different ESP32 boards with different pin maps. One which matches the kit here, plus the Heltec Wifi Kit 32. Both with displays (on different pins).
The display shows everything configured the way I set it in the config file. Including the SSID etc.
The board does start wifi, but the SSID which shows up is something like “ESP_NNNNNNN”. Different boards have different SSIDs. There is no password.

I can choose that network on the windows PC i’m using to test, but Mission Planner cannot connect. I’ve tried both UDP and TCP modes.

For the build environment, I’m using a clean install of arduino, with ESP32 board definitions and libraries installed through the library manager function of Arduino as shown here: https://robotzero.one/heltec-wifi-kit-32/
The sample app shown on that page runs fine and will display the wifi networks available when built and run.
The libraries from the MavlinkToFrsky project are copied into my libraries directory.
I’m using the latest 2.34 sources.

Should this be working? Any ideas what I’m doing wrong?

Thanks,
Scott

Edit: As a test, I tried not defining “Start_WiFi” and grounding P15 instead. Behavior was the same.

Edit2: I found that the SoftAP function of ESP_32 silently fails to start correctly if you provide a password of less than 8 characters. Changing that makes the AP start up right, and I can then connect to it, but I don’t get valid Mavlink data. I know the rest of the chain is working because Yaapu sees full valid telemetry, and my other ESP8266 setup works fine with all the rest of the equipment involved.

Edit3: On a hint from “Burgtree” on rcgroups, I changed the udp.BeginPacket() calls to use a hardwired broadcast address of “192.168.4.255” and that got udp mode basically working. The bad news is that it seems to not handle corrupted/dropped mavlink packets nearly as well as the ESP8266 code on the Ardupilot repo. Syncing parameters is MUCH slower using this code as compared to that.

Hi all just about to start with RDF TXMOD ( rdf900x ) using teensy 3.2
pin 9 on teensy is TX in
pin 10 on teensy is TX out
pin 1 on the teensy is for s-port pin on the transmitter ( horus x12s ) bottom pin in the bay

and which firmware for the teensy 3.2 Mav2PT_v2.35.ino or FrSkySPortPT.ino

Matt can you run 2 TX pins
one off the rdf900 as well as the teensy at the same time
may be its getting confused with 2 tx pins ?
i know its ok to run 2 rx pins
my be try to take off the tx pin off the teensy

Matt, I would be happy to help. One thing I noticed is that you are supplying the receiver 3.3v from the Teensy. I got these specifications for the X4r from the 'net:

FrSky X4R - SB - 3/16 Channel Receiver w/ SBUS

  • Dimension: 40x22.5x6mm.
  • Weight: 5.8g.
  • Operating Voltage Range: 4V-10.0V.
  • Operating Current: 100mA@5V.
  • Operating Range: >1.5km (Full Range)

Rather supply 5v to the 4XR from a BEC or directly from the RFP900 supply.

Mav2PT includes a huge amount of optional debugging on the usb serial monitor. It is always a good idea to download and flash the latest version. You will see that the configuration and debugging options now reside in the config.h tab. Even the default status messages would give us a good idea of where to start looking for a problem.

Regarding sharing rx and tx pins of the RFD:

It’s ok for multiple devices to listen on the TX pin of the RFD at the same time, but only one may send to the RX pin.

i am in the middle of adding this to RDF TXMOD unit with teensy 3.2


1 Like

Great stuff Colin! Please keep us updated. :slight_smile:

ok after many hours of testing i could not get to work through the TXmodule the module was getting mavlink messages the light on the teenssy on solid so i put it to the side for now
so setup rdf900x into the teensy then to X8r and used the internal module works fine
so tested it again with feeds to module bay pins again s-port off the teensy and the ground off the teensy to bay pins still will not work the only was i could get it to work is to use internal module on the Taranis by X8R
if you need a Dbug log on usb tell which options to turn on

!

The problem here is that for some things the Teensy must send to the RFD900 rx pin, but the TX Mod also needs to send the the RFD900 rx pin. No can do. That is why I used an ESP32 instead of the TX Mod.

This should work if you have set Mav2PT to Ground Mode. Can you show me the debug monitor status output without options at this stage. Please be sure to download and flash the latest version. :slight_smile:

What D E B U G G I N G O P T I O N S do you wish me to set ?

Ok here is usb log and logic scan of the pin one off the teensy Dbugandlogic scans.zip (29.4 KB)

at this time looks like a framing error or openTx 2.3.1 has an issue

Mat_C, you are on the right track. Sorry I was off line, and I have a very busy day ahead. I’ll check in later today and see how you progressed. We have had several cases of Teensy 3.x S.Port (pin 1) damaged by static. You can also try

#define SPort_Serial 3

and then use pin 8.

Also, be sure you have a good rssi on the Taranis.

You can use this to force a good rssi:

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

I see you are set up for Relay Mode. You could try Ground Mode again, and wire directly to Taranis S.Port (bottom pin) and ground (next pin up from bottom).

Chat later

Ok tested it 2 openTx radios horus on opentx 2.3.1 and a taranis x9d 2.2.4 same out come
if i go through X8R receiver i can get it to work but if i try S-port pin in the module bay no go

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