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

No worries Eric. I appreciate your work!!

Hi Eric

First off: thank you so much for all the hard work, which must go into Mav2Pass - so great!

It’s my first time here and I just got around compiling the Mav2Pass via Arduino IDE, so I hope I am doing everything right.
I think I found a fluke in the code and a workaround for it, please see below:

This is likely a fluke in the code, when choosing the HelTec ESP32 to be a MavLink Switch (Mav2Pass 2.64.0):

  • uncommenting this line in the config.h will not assign a GPIO pin to be used for S.Port telemetry out:
    #define FrSky_Port_Type 0 // No FrSky Port support needed. Now I’m a “Mavlink Switch”

  • upon compiling the code with this option, it produced the error:
    ’FrPort’ was not declared in this scope

  • by commenting out “//” the corresponding code line in the MavToPass sketch and compiling the code, I got a usable binary and the HelTec does function as a MavLink Switch (no S.Port/F.port telemetry out)

  • when choosing any other option in the config.h file in the section // Choose either S.Port or F.Port or None, the code compiles just fine without the error message above

I hope this will help in identifying a possible error.

happy to assist, if help is needed.

Hi Luca

I got the setup you are intending to use to work just yesterday. Maybe I can be of assisstance.

To be honest, I have not live tested the setup but at least, I get: DLink= 100% showing up on the mini Crossbow.

I’m not sure that this forum is the right place to discuss this though. I have also made a post on RCgroups.com in the MyFlyDream mini Crossbow thread and contacted you via PM there.

Cheers
Sebastian

Gentlemen, good morning.

I have not been able to get to my PC for a few days as we have a lot going on, with a house and business move looming in the next few weeks.

I’m planning to publish updates in the next day or two. ECO_R1, thanks for the heads up. I shall include your patch.

The main improvement in the incoming update is to detect FrSky port polarity (inverted or not because F.Port is not inverted like S.Port ) which is a pre-condition to detecting baud, and then protocol. A recent update added FrSky telemetry for the tracker, including F.Port 1 and 2, and I added F.Port 2 to Mav2PT. @Luca, my apologies for not getting back to you. I hope you have found a suitable solution.

Great Eric!

Maybe you could help me with something specific, as I have two issues.

Setup:
DragonLink internal ESP flashed with Mav2Pass 2.60.0 and setup to send MavLink data via WiFi only (UDP). Heltec flashed with Mav2Pass 2.64.0 in MavLink Switch mode (listening via WiFi (UDP)) and transmitting via serial to my antenna tracker.

Issue 1:
The setup above is working fine and HelTec receives and passes on MavLink data. However, as soon as I fire up Missionplaner and connect via UDP local port to display the information on my groundstation as well, the HelTec immediately looses its heartbeat and connection.
Are there any settings that could make this work?

Issue 2:
The Heltec does not display any RSSI information (stays at 0), battery voltage and position information is displayed just fine and in agreement with what I see on the Yaapu Lua script.
I have selected the following in the config.h:
#define Rssi_Pacemaker 200 // mS. RSSI 0xF101 frame sent with this period regardless of rate of RSSI arrival
#define RSSI_Override 70 // Only if (RSSI == 0) force it to value, but only sent when Mavlink good.)

Thanks so much!

Hi Sebastian,
Issue 1: v2.60.0 is quite old now (May 2020). Multiple targeted UDP clients were added in V 2.62.2 (Sep 2020).
Issue 2: Hmm. Could you post the serial log please.

My recommendation is to first flash 2.64.03 (which I will post tomorrow) on both boards.

Super, I will check out the V 2.64.03 as soon as available.

You’ll have to help me out here: how do I get access to the serial log?

@Eco_R1 Just read serial log from Heltec’s serial 0 using USB to serial adaptor during the boot up.

Made correction to my post above. Serial log is available on its “serial 0” port.

Oops. Latest is v2.64.04.

Also, the most recent boards update on the Arduino IDE screws up the Heltec_WiFi_Kit_32 optional partition schemes. We need to select “Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)”.

  • Find a patched boards.txt file here

  • Navigate to the boards folder in the IDE storage space. Mine is here: C:\Users\Eric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.5\

  • Copy the boards_Heltec_wifi_kit_32_fix.txt from the above link into this folder.

  • Rename boards.txt to something like boards_original.txt

  • Rename boards_Heltec_wifi_kit_32_fix.txt to boards.txt

  • Restart the IDE

EDIT: Unfortunately my second Heltec WiFi Kit board expired, and I can’t find any reasonably priced ones to the 'net right now.

I have been recently using these boards. Full colour, with scrolling buttons, and very affordable.

Hi Eric

So is the v2.64.04 ready for use?

Also thanks for the patch. A workaround is to select the ESP32 Dev module and select the options (including the minimal SPIFFS option) there. Compilation has worked just fine.
Just a thought, if people don’t want to patch their Arduino IDE

Also to reward all of your hard work, I have just made a donation to the Mav2Passthru github wiki. Only people like you make our hobby great for us “simpletons” - Thank you!
Cheers

1 Like

You are a scholar and a gentleman Sir. V2.64.04 will be posted shortly, and thanks for the Dev Kit info. Useful to know.

I’m still busy tidying up details and don’t want to post before I do some more checking. I should be able to post in the morning.

V2.64.4 is posted. I did quite a bit of testing, but it remains beta for now.

Hey Eric
Thanks for that - much appreciated.

I have a very basic question:
I use the HelTec as a MavLink Switch (reading data via WiFi and transmitting via serial - GPIO pin 17). The HelTec is listening for MavLink data sent by Mav2Pass from the DragonLink internal ESP32. This works beautifully, if I am connected to my home network.
Both devices are setup in the STA>AP mode. In my understanding, the ESP first tries to connect in STA mode , and if it does not find a network topples into AP mode, creating its own access point.

In my current setup (both set to STA>AP mode) the HelTec would not connect to the DL AP, which may be the obvious mistake, but I don’t see how to set it up, right now. Do I need to set the HelTec up in STA mode only with the AP SSID and Password of the DragonLink module?

What do I need to set my HelTec WiFi settings to in order to also connect to the DL AP in the field?

Hi Sebastian

With the DL ESP in AP mode, you should be able to connect from the Heltec in SAP or STA>AP modes, as long as you have the correct SSID and password. You don’t mention if you are using UDP or TCP/IP. In UDP, the DL ESP should stream to 192.168.4.255, in other words should broadcast to all hosts on the 192.168.4/24 subnet. If a cleint application responds, the DL ESP should thereafter target the sending IP. In TCP, a client/server session is established for each and every client.

But first things first. Does the Heltec physically achieve a connection to the DL? What does the log say?

Hi Eric

I selected UDP as I understand this is more stable/better?

When you say correct SSID and passwort: Which SSID should be entered on the HelTec side? Right now the STA SSID on the HelTec is set to my home network and password. As is the one for the DL.
I think the problem I have is that both devices are trying to setup an access point, when really only the DL should do so and the HelTec should connect to it, right?

The DL, if it is in AP mode, will advertise its AP SSID. The Heltec, as a station, STA mode, must connect directly to the DL ESP. The Heltec STATION SSIS and pw must match he DL AP SSID and password.

Thanks Eric

That worked beautifully, sorry again for the noob question. I had almost thought it out the same way, but it’s good to get confirmation (and proof by it actually working).

My pleasure Sebastian. Glad it’s all working for you.