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

It’s integrated into 10

1 Like

Hi Eric,

I am having issues in “Relay” mode with MavToPass_v2.64.01 on my heltec esp32 with OLED.I compiled using Arduino IDE and everything went well but i can’t make my mission planner connect to my flight controller via wifi UDP. I have excluded dragonlink and connected heltec straight to the flight controller.Also nothing on Sport either.I checked my frsky R-Xsr and inverter with betaflight and Sport is working fine.I tried to flash couple of times but no luck.I am attaching config.h that i used to compile.Not sure if its a bad board.config.h.txt (71.8 KB)

Hi ninja_zx11

I assume you are using an ESP32. After flashing, when you start up the ESP32, the log is printed to serial 0. Could you post it here for me to look at.

Hi Eric,

Yes I am using ESP32 Heltec wifi kit.I will post my serial log as you mentioned.Looks like some kind of bug in the latest as I flashed an older 2.62.7 version and everything started working as it should.Thanks for your work !!!

Hi Eric,

Here is the serial output while booting:

17:31:20.959 -> Starting MavToPass_v2.64.01.ino .....
17:31:20.959 -> Display support activated: Landscape 
17:31:20.959 -> 64x128  TEXT_SIZE=1  CHAR_W_PX=6  CHAR_H_PX=8  SCR_H_CH=8  SCR_W_CH=21
17:31:21.006 -> EEPROM initialised successfully
17:31:21.006 -> EEPROM settings read and adopted
17:31:21.006 -> Relay Mode selected
17:31:21.053 -> Battery_mAh_Source = 3 - Define battery capacities in the LUA script
17:31:21.100 -> RSSI Override for testing = 70%
17:31:21.100 -> Target Board is ESP32 / Variant is Heltec Wifi Kit 32
17:31:21.194 -> Mavlink Serial In
17:31:21.194 -> FrSky Serial Out
17:31:21.241 -> Mavlink WiFi+BT Out - WiFi mode is STA>AP
17:31:21.381 -> Protocol is UDP IP-Targeted
17:31:21.475 -> No Bluetooth options selected, BT support not compiled in
17:31:21.475 -> Mavlink serial on pins rx = 27 and tx = 17
17:31:21.522 -> SPort selected, now expecting regular sport inverted/idle low, baud:57600 half-duplex on pins rx = 13 and tx = 14
17:31:21.522 -> For 1-wire applications a 2-wire to 1-wire converter or diode is required
17:31:22.131 -> WiFi mode set to STA sucessfully
17:31:22.131 -> Trying to connect to MavToPassthru..........
17:31:27.726 -> Failed to connect in STA mode
17:31:27.789 -> Failover to AP. Rebooting ....
17:31:28.900 -> ets Jun  8 2016 00:22:57
17:31:28.900 -> 
17:31:28.900 -> rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
17:31:28.900 -> configsip: 0, SPIWP:0xee
17:31:28.900 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
17:31:28.900 -> mode:DIO, clock div:2
17:31:28.900 -> load:0x3fff0018,len:4
17:31:28.900 -> load:0x3fff001c,len:1216
17:31:28.900 -> ho 0 tail 12 room 4
17:31:28.900 -> load:0x40078000,len:9720
17:31:28.900 -> ho 0 tail 12 room 4
17:31:28.900 -> load:0x40080400,len:6364
17:31:28.900 -> entry 0x400806b8
17:31:31.791 -> 
17:31:31.791 -> Starting MavToPass_v2.64.01.ino .....
17:31:31.791 -> Display support activated: Landscape 
17:31:31.791 -> 64x128  TEXT_SIZE=1  CHAR_W_PX=6  CHAR_H_PX=8  SCR_H_CH=8  SCR_W_CH=21
17:31:31.885 -> EEPROM initialised successfully
17:31:31.885 -> EEPROM settings read and adopted
17:31:31.885 -> Relay Mode selected
17:31:31.885 -> Battery_mAh_Source = 3 - Define battery capacities in the LUA script
17:31:31.885 -> RSSI Override for testing = 70%
17:31:31.948 -> Target Board is ESP32 / Variant is Heltec Wifi Kit 32
17:31:31.994 -> Mavlink Serial In
17:31:32.041 -> FrSky Serial Out
17:31:32.088 -> Mavlink WiFi+BT Out - WiFi mode is STA>AP
17:31:32.229 -> Protocol is UDP IP-Targeted
17:31:32.338 -> No Bluetooth options selected, BT support not compiled in
17:31:32.338 -> Mavlink serial on pins rx = 27 and tx = 17
17:31:32.338 -> SPort selected, now expecting regular sport inverted/idle low, baud:57600 half-duplex on pins rx = 13 and tx = 14
17:31:32.338 -> For 1-wire applications a 2-wire to 1-wire converter or diode is required
17:31:32.463 -> WiFi mode set to WIFI_AP 
17:31:32.463 -> AP IP address: 192.168.4.1  SSID: MavToPassthru
17:31:32.651 -> Begin UDP using STA UDP object  read port:14550  send port:14555
17:31:32.651 -> UDP for AP started, local 192.168.4.1   remote 192.168.4.255
17:31:32.698 -> Web support active on http://192.168.4.1
17:31:32.792 -> SPort detected
17:31:33.073 -> hb_count=1
17:31:34.042 -> hb_count=2
17:31:35.075 -> hb_count=3
17:31:35.075 -> Mavlink good!
17:31:38.466 -> FrPort scheduler buffer full. Check FrPort Downlink to GCS

@ninja_zx11:

Hmm… I can’t seem to pick up the problem here. I’m using the LILYGO® TTGO T-Display board. (my new favourite) :slight_smile:

This is the line you need to see. Last line in my log below.

FrPort read good!

I understand that the older version is working for you, so it’s difficult to say what the issue could be. Sorry, I know it’s a dumb question, but are you sure you had the diode/converter right way around? I get this wrong all the time when I’m switching between idle-high and idle-low telemetry.

Starting MavToPass_v2.64.01 …
Display support activated: Landscape
135x240 TEXT_SIZE=2 CHAR_W_PX=16 CHAR_H_PX=21 SCR_H_CH=8 SCR_W_CH=20
EEPROM initialised successfully
EEPROM settings read and adopted
Relay Mode selected
Battery_mAh_Source = 3 - Define battery capacities in the LUA script
RSSI Override for testing = 70%
Target Board is ESP32 / Variant is Starting MavToPass_v2.64.01 …
Display support activated: Landscape
135x240 TEXT_SIZE=2 CHAR_W_PX=16 CHAR_H_PX=21 SCR_H_CH=8 SCR_W_CH=20
EEPROM initialised successfully
EEPROM settings read and adopted
Relay Mode selected
Battery_mAh_Source = 3 - Define battery capacities in the LUA script
RSSI Override for testing = 70%
Target Board is ESP32 / Variant is LILYGO® TTGO T-Display ESP32 1.14 inch ST7789 Colour LCD
Mavlink Serial In
FrSky Serial Out
WiFi mode is STA>AP
Protocol is UDP IP-Targeted
Mavlink serial on pins rx = 27 and tx = 17
SPort selected, now expecting regular sport inverted/idle low, baud:57600 half-duplex on pins rx = 13 and tx = 15
For 1-wire applications a 2-wire to 1-wire converter or diode is required
WiFi mode set to STA sucessfully
Trying to connect to OmegaOffice…
WiFi connected!
Local IP address: 192.168.1.174
WiFi RSSI:-49 dBm
Begin UDP using STA UDP object read port:14555 send port:14550
UDP for STA started, local 192.168.1.174 remote 192.168.1.255
Web support active on http://192.168.1.174
SPort detected
hb_count=1
hb_count=2
hb_count=3
Mavlink good!
FrPort read good!
ESP32 1.14 inch ST7789 Colour LCD
Mavlink Serial In
FrSky Serial Out
WiFi mode is STA>AP
Protocol is UDP IP-Targeted
Mavlink serial on pins rx = 27 and tx = 17
SPort selected, now expecting regular sport inverted/idle low, baud:57600 half-duplex on pins rx = 13 and tx = 15
For 1-wire applications a 2-wire to 1-wire converter or diode is required
WiFi mode set to STA sucessfully
Trying to connect to OmegaOffice…
WiFi connected!
Local IP address: 192.168.1.174
WiFi RSSI:-49 dBm
Begin UDP using STA UDP object read port:14555 send port:14550
UDP for STA started, local 192.168.1.174 remote 192.168.1.255
Web support active on http://192.168.1.174
SPort detected
hb_count=1
hb_count=2
hb_count=3
Mavlink good!
FrPort read good!

Hi Eric,
Thanks for checking but without touching any hardware,if i flash my heltec with older version,it starts working.So i assume that my hardware including inverter is working correctly.

I am not using RS232 to TTL with diode but i am using this SPort/FPort readymade converter.

I remember once is saw “FrPort readok” and then “FrPort timeout” on the OLED screen.

With the latest firmware. I can’t even connect my mission planner to the arduplane over the wifi link.No Sport telemetry and web interface gets sluggish. Sometimes web interface opens partially.

Thank you for the feedback. I will keep looking.

It occurs to me that the EEPROM map has changed slightly. It would be a good idea to refresh eeprom settings by flashing with

#define Reset_Web_Defaults // Reset settings in eeprom.

Yes i did try "#define Reset_Web_Defaults " options too but same results. But i found that if i flash heltec with #define Reset_Web_Defaults then after bootup, then web interface doesn’t save any changes if you edit some changes via web interface.So you have to reflash again with commenting //#define Reset_Web_Defaults to make web interface save changes.Don’t know if its a normal behaviour? Maybe someone with Heltec board can chime in and help verifying this issue.

Yes, while the macro is active it takes the default #define settings and puts them in EEPROM.

You must immediately thereafter de-activate the macro, before you go to change web settings, or on the reboot they will be overwritten again, not so?.

I still can’t replicate the problem here. Would it be possible to work backwards through the versions until the problem does not show up? Or forward from 2.62.7?

Hi Eric.Yes sure I will try to move forward from my working version and see from which version the issue started.
How can I stop the macro?So does that mean the defaults will be written on every reboot? Sorry I don’t know how these macros and stuff work.Kind of over my head:) Thanks a lot for your efforts my friend!!!

To update the EEPROM from the #define settings, activate the

#define Reset_Web_Defaults

macro, compile, and boot 1 time. De-activate (comment out) the macro, compile, and reboot. Now your settings are refreshed in flash.

THANK YOU!

Got it!!! Thanks.

I will start testing the older firmware’s over the weekend and will let you know the results.

Hi everyone.
I’m in the same situation.
Dragonlink V3 with Mav2PT 2.63.12
Heltec ESP32 with Mav2PT 2.63.12 connected to MFD Crossbow Mini tracker

I was able to send Mavlink data to the Heltec via UDP (“Mavlink good!” and telemetry data shown on the Heltec OSD), but there’s no way the tracker reads the data (no DLINK on the tracker screen).

Dragonlink Mav2PT is configured as Radio Modem and 115200 baud rate, accordingly with the Heltec and the tracker settings. Also tried 57600 but no joy. I Can anyone help me? Thanks in advance!

Hi @Luca_Sodano

I can look at this tomorrow for you. Busy, busy day today.

1 Like

Hi [Luca_Sodano]:

If I understand you correctly, you have configured DL V3 ESP (1) to send UDP, and Heltec ESP (2) to receive UDP. Is this correct? Now you want ESP (2) to relay UDP packets to the Crossbow mini tracker? I must be missing something.

Remember to always match the sending (remote) udp port and the opposite receiving (local) port. There is a very useful UDP monitor on the Google Play store:

Yes Eric, that’s the scenario.
My ESP(2) receiving Mavlink data properly, but I’m missing the part from the ESP serial to Crossbow mini (via pin 17). At this point, I don’t know if this is the right thread or I should look for something more Crossbow related. I’m open to suggestions. :smiley:

Hi Eric, Is it possible to add voltage readout of ground station battery on the stats screen of Heltec ESP32 OLED screen? Thinking of using simple voltage divider and feeding it into any ADC input of ESP32 microcontroller (if available) to have the voltage readout of the ground station battery all the time while running it in a relay mode. Thanks.

Hi Eric. I tried flashing one by one after version 2.62.7 and found that bug started from version 2.63.0. So version 2.62.8 is the last one that is working okay on Heltec ESP32 as a relay mode.

On 2.63.0, i can see mavlink good message but no SPORT telemetry. So something has changed on 2.63.0 that is preventing Sport working as a relay mode. Hopefully this will help you to track down the bug. Thanks.

Hey ninja_zx11

Great. Thank you for the feedback!

Yes, it is certainly possible to add voltage sensing on the analogue pin.

I,m rather tied-up right now, but I will look at this for you.