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

Some packet loss is common on a radio link, and since the FC is sending repeating groups of situational data many times a second, you likely won’t notice.

Nevertheless, understandably we would all prefer zero packet loss. Packet loss can occur and is measured between the FC and the GCS by detecting missing packet sequence numbers. In your case, if you are using WiFi, you have two radio links, possibly in the same room. Even radios on different bands, but with a few watts of power (30dBm) located within a few metres of each other will interfere. Wifi and Bluetooth both use 2.4 GHz and other nearby Wifi appliances could affect your Wifi link from the ESP to the GCS. Computers also generate a lot of rf hash. Try download Wifi Analyzer onto you phone and check which WiFi channels near you are occupied, and in MavToPT go to WiFi setup and try a different channel. I think I set the default to ch 9. Move your aircraft at least 20m away and set the radios to low power. Try to get the antennas in the clear, away from computers, routers or switches. Make sure no one is using a microwave oven nearby(ch 6 on the wifi band).

Lowered power to 10dbm on radios, moved plane away by 30 feet, and still getting huge amounts of packet loss.

image

Zero packet loss when using usb ftdi. Perhaps there is something wrong with the network setup? I’m using udp with broadcasting disabled - should I try tcp?

I have now tried another network with the exact same results. Unusably high packet loss, 25-50%. Do you think that it could be possible that my wifi kit 32 is doa?

Yes, it’s easy enough to try TCP/IP. Some cheap boards do have poor rf performance, but you would need to decide. Do you get lost packets when using QGC on an android tablet?

How did you go with the buttons

The TTGO T-Display board buttons done on latest github

1 Like

Got an issue with v2.61.7 i connect to GCS let it load works but as soon as turn on the TX after about 10 sec i get GCS Heartbeat lost GCS stops but Yaapo is working on the tx fine

Mavlink from FC #22 Param_Value: param_id=STAT_RUNTIME param_value=145298.0000 param_count=1065 param_index=-1
Mavlink from FC #22 Param_Value: param_id=GND_ABS_PRESS param_value=99466.6875 param_count=1065 param_index=-1
[E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
[E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
[E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
[E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
[E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
[E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
[E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:353] _eventCallback(): Reason: 10 - DISASSOC_PWRCAP_BAD

and the only way i can get it to start again is reboot esp32 dont turn on the tx can only use one at time
buttons work great

You can disregard the message. What is means is that Mission Planner or QGC is not connected and not sending a heartbeat. It’s just for debugging.

Comment out all the Debug_xxxx macros, and this one under Experimental

#define Support_MavLite

what would cause mission planer to stop when i turn the TX on ?
and and i cant get it to reconnect till i turn off the tx and reboot the esp32 ?

Maybe RF interference?

yes it was my Bad it was in STA mode lol :man_facepalming:

Yeah, lol, I know, it happens to me too.

Hi Eric,

i am trying to connect a tracker to the Heltec module. If Mavlink is received via WiFi (which works) and Mavlink is to be output via the pin on the Heltec module again, which pin is right for this? Pin 17?

What is Support_MavLite actually for?

Hi Reinhard

Ah, you got me!

I coded a serial out for completeness, but never finished it off. I guess I could not imagine your scenario with wifi (or BT) in and serial out. Let’s see if I can finish it off in the next day or two.

Mavlite is Alex’s lite two-way protocol using FrSky telemetry to support a LUA mini GCS on the Taranis etc screen. In mav2pt it is still work in progress.

:grin:, I was wondering why it didn’t work. I would be happy if that would work too, that’s what makes Mav2PT really round :+1:

I have also noticed that the module often crashes / restarts when the Web-GUI is called and if not at the latest when logging in to the Web-GUI. I did not integrate Bluetooth, because I know about the memory problem. In any case I never managed to call the configuration page. I can put my config.h at your disposal …

If you could post your configuration.h it would be helpful. Also, the monitor log, including the crash data could be useful.

My config.h:
config.h (54.2 KB)

Heltec Wifi Kit 32
Mavlink WiFi in
Mavlink serial out
only STA modus (connection to mobile router)

Monitor log including crash data:

Starting MavToPass_v2.61.8 …
Display support activated
EEPROM initialised successfully
EEPROM settings read and adopted
Target Board is ESP32 / Variant is Heltec Wifi Kit 32
Ground Mode
Battery_mAh_Source = 3 - Define battery capacities in the LUA script
RSSI Override for testing = 70%
Mavlink Serial Out
Mavlink WiFi In
WiFi mode is STA
Protocol is UDP
No Bluetooth options selected, BT support not compiled in
S.Port on ESP is inverted on tx pin = 14
Wi-Fi mode set to STA sucessfully
Trying to connect to RHS_FPV_MOBIL.
WiFi connected!
Local IP address: 192.168.1.94
WiFi RSSI:-45 dBm
UDP started, listening on IP 192.168.1.94, UDP port 14555
Web support active on http://192.168.1.94
S.Port scheduler buffer full. Check S.Port downlink
Client connected: Remote UDP IP: 192.168.1.255 Remote UDP port: 14550
Heartbeat from GCS timed out! GCS not connected
Guru Meditation Error: Core 1 panic’ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400014fd PS : 0x00060430 A0 : 0x80116088 A1 : 0x3ffd0d60
A2 : 0x00000000 A3 : 0xfffffffc A4 : 0x000000ff A5 : 0x0000ff00
A6 : 0x00ff0000 A7 : 0xff000000 A8 : 0x00000000 A9 : 0x3ffd1030
A10 : 0x00000003 A11 : 0x00060423 A12 : 0x00060420 A13 : 0x9e97f63c
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x00000008 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff

Backtrace: 0x400014fd:0x3ffd0d60 0x40116085:0x3ffd0d70 0x4011410d:0x3ffd1080 0x400d5faf:0x3ffd1140 0x400d62a3:0x3ffd1170 0x4017fa11:0x3ffd1190 0x400dec3b:0x3ffd11b0 0x400dece1:0x3ffd11d0 0x400ded4e:0x3ffd1200 0x400deeb7:0x3ffd1250 0x400d8eb1:0x3ffd12a0 0x400d901b:0x3ffd12d0 0x400e2a19:0x3ffd1330 0x4008e1d5:0x3ffd1350

Rebooting…
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6364
entry 0x400806b8

Starting MavToPass_v2.61.8 …
Display support activated
EEPROM initialised successfully
EEPROM settings read and adopted
Target Board is ESP32 / Variant is Heltec Wifi Kit 32
Ground Mode
Battery_mAh_Source = 3 - Define battery capacities in the LUA script
RSSI Override for testing = 70%
Mavlink Serial Out
Mavlink WiFi In
WiFi mode is STA
Protocol is UDP
No Bluetooth options selected, BT support not compiled in
S.Port on ESP is inverted on tx pin = 14
Wi-Fi mode set to STA sucessfully
Trying to connect to RHS_FPV_MOBIL…
Failed to connect in STA mode
No web support possible
S.Port scheduler buffer full. Check S.Port downlink

Hi Eric,

I’ve tried to setup the simple ground Teensy 3.2 converter (for Taranis telemetry with no GCS) but I think I’m missing something since the S. port has only two or maximum four messages every second - the same messages although the converter LED turns on (stop flashing).
If I understand correctly, the converter Tx line has to poll request the Cube FC (Mavlink 1/2 protocol) and the Mavlink answer from the FC enters the converter by its Rx line.

Is it possible just to use the downlink (Rx) channel of RFD900 for telemetry so that the uplink channel can be used for other usage?

Hi Yaniv

The converter will work using the FC tx to rx only, with one or two drawbacks.

1 The converter cannot request battery capacity parameters from the FC, but you can work around that.

2 Yaapu’s great LUA script cannot request waypoints.

3 The converter cannot request data streams. You must setup the SRx parameters through Mission Planner

That’s about it I guess.

Two to four messages a second sounds far too slow. Have you selected Ground or Air mode? If you could post your monitor log, and perhaps a TLog would be helpful.

Thanks for this Reinhard. I made some progress on this today. I’ll get back to you.