New version of oXs - Rf link quality

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
mstrens
Posts: 1434
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

New version of oXs - Rf link quality

Post by mstrens » Tue Oct 27, 2020 10:22 am

I just put on github a new version of oXs (in Master branch).
I added the possibility to measure the quality of the 2.4Ghz link between TX and RX.

This requires to use a free PWM channel on the RX and to configure the TX in such a way that the signal on this channel changes continuously (e.g. using a triangle wave form).
When a frame sent by the TX can't be decoded by the RX, the RX generates a PWM pulse that has the same width than the previous one (except when several consecutive frames are lost and the RX is configured with predefined failsafe values instead of Hold mode)

When the new feature (Rf link quality) is activated, oXs compares the width of the PWM signal on a channel.
If the width does not change, oXs registers an error.
Every X (e.g. 50) pulses, oXs calculates:
- the quality in % (100 mean no error, 76 = 24% of errors, 0 = connection lost)
- the max number of consecutive errors. The higher this value, the slower the servos reacts to TX commands.

The 2 new measurements are filled in oXs internal fields TEST_1 and TEST_2.
Currently those 2 fields can be transmitted (e.g. as TEMP1 and TEMP2) but only for FRSKY protocol.
Later on, it would probably be possible to add this feature to other protocols (e.g. Jeti).

More details is given as usual in file oXs_Config_description.h

Note: there are other (more sophisticated) projects that used the SBUS data to monitor the Rf link quality but It is not possible for oXs to decode the SBUS because the Arduino pro mini (or nano) being used is not powerful enough to combine reading the SBUS with other oXS functionalities in a single Arduino.
Here is a link to such another project that provided me the idea to add this new feature to oXs:
https://www.rcgroups.com/forums/showthr ... -for-FrSky


Christoph
Posts: 9
Joined: Tue Apr 14, 2015 5:56 pm
Country: Germany

Re: New version of oXs - Rf link quality

Post by Christoph » Thu Oct 29, 2020 11:43 am

Great, i will test next weekend.

But two questions :
The PWM signal needs a additional input on arduino or is it used from SPORT?
How "fast" should the triangled wave on PWM change?

I am already using a sensor for link quality with a separate arduino via SBus and i'm happy to combine it with my vario/GPS.

Best regards
Christoph

mstrens
Posts: 1434
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New version of oXs - Rf link quality

Post by mstrens » Thu Oct 29, 2020 12:03 pm

The Rf link quality based on PWM needs an additional input on Arduino. It uses the arduino pin 2 or 3 (has to be defined as PIN_PPM).
In fact the name PPM in oXs project is wrong. It would have been named PWM. So pin 2 or 3 has to be connected to a channel on the RX (just like a servo).
All instructions including my setup for the triangle wave is given in file oXs_config_description.h (in section 13)

Christoph
Posts: 9
Joined: Tue Apr 14, 2015 5:56 pm
Country: Germany

Re: New version of oXs - Rf link quality

Post by Christoph » Tue Nov 03, 2020 11:42 am

Test complete, it runs. The test in the air is open, because of weather.
But in most of my sailplanes (F3B, F3F) i'm using a 6 chanal rx, so there is no PWM port free.
Do you see a possibility to use S-Port for input?

Best regards
Christoph

mstrens
Posts: 1434
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New version of oXs - Rf link quality

Post by mstrens » Tue Nov 03, 2020 12:44 pm

Sorry but it is not possible to use S-Port to measure the link quality because it could be that s-port frames would be lost while frames used to drive the servos (PWM) would not be lost. The opposite is true too.


JanRy
Posts: 38
Joined: Mon Dec 28, 2015 8:59 pm
Country: -

Re: New version of oXs - Rf link quality

Post by JanRy » Sun Nov 08, 2020 11:30 am

Is this feature also enabled for Frsky hub telemetry?

mstrens
Posts: 1434
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New version of oXs - Rf link quality

Post by mstrens » Sun Nov 08, 2020 6:49 pm

JanRy wrote:
Sun Nov 08, 2020 11:30 am
Is this feature also enabled for Frsky hub telemetry?
Yes

JanRy
Posts: 38
Joined: Mon Dec 28, 2015 8:59 pm
Country: -

Re: New version of oXs - Rf link quality

Post by JanRy » Sun Nov 08, 2020 11:10 pm

Hmm, I must be doing something wrong.
I can get the OXS to report the proper values of Vfas and RF link quality using S.port enabled receivers.
The same OXS (re-flashed with PROTOCOL FRSKY_HUB) reports correct Vfas values, but RF link quality (Temp1) is persistently showing 0.
Any help would be appreciated.

mstrens
Posts: 1434
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New version of oXs - Rf link quality

Post by mstrens » Tue Nov 10, 2020 4:05 pm

I never tested with Frsky Hub protocol but it should normally work.
I just checked the code and I did not find a reason why it should not work.

I would have to debug the program to check.

Note: I expect that the only change you made is activating the FRSKY_HUB (instead of FRSKY_SPORT). So, you still have activated the line //#define FILL_TEST_1_2_WITH_LQ

JanRy
Posts: 38
Joined: Mon Dec 28, 2015 8:59 pm
Country: -

Re: New version of oXs - Rf link quality

Post by JanRy » Tue Nov 10, 2020 7:30 pm

yes, the only difference is the define option in basic config.
I've tried the FRSKY_SPORT_HUB too, but I couldn't get it to work with HUB protocol (OpenTX did not find the sensors).

#ifndef OXS_CONFIG_BASIC_h
#define OXS_CONFIG_BASIC_h

#define PROTOCOL FRSKY_HUB
//#define PROTOCOL FRSKY_SPORT


Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”