inav icon indicating copy to clipboard operation
inav copied to clipboard

RSSI rescaling issue with ELRS

Open robustini opened this issue 3 years ago • 45 comments

Current Behavior

I had an unexpected failsafe with my long range racer yesterday, checking the log I think I see that the RSSI value went to a fixed 23%, and at that moment the failsafe was activated (first flight in the log). When this drop occurred (at 3:33 in the log), I notice that the rx channels responded without problems and the ELRS link quality was at the maximum values in the sensors on the tx, i.e. at 100, de rest tx and rx were very close, no more than 70 meters in line of air. I noticed that a rescaling has been done, so I wonder if it really works correctly or if I am doing something wrong. Doing bench tests I noticed that AUX12, which in my case is RSSI while AUX11 is LQ, drops dramatically, perhaps too much compared to LQ which remains at maximum. One thing that I think is missing in the configurator is the percentage value of the RSSI processed, it would be very useful to be able to see it clearly.

Steps to Reproduce

  1. Put the power of the tx module to a minimum
  2. Move the tx away from the rx

Expected behavior

AUX16 will drop a lot as you can see from the image while AUX15 always stays at maximum, as if it didn't work.

Suggested solution(s)

Now I have set AUX15 (LQ) to see if this is more reliable. It would be useful to be able to log in addition to the RSSI also LQ, so not only the chosen RSSI source but also the alternative offered by ELRS and CRSF, so we can make comparisons.

Additional context

blackbox_log_2022-07-10_191625.zip

immagine


INAV/ZEEZF7 5.0.0 Jul 4 2022 / 08:25:36 (e3b3e2b9) GCC-10.2.1 20201103 (release)

ELRS V3 RC1 - 12 ch full res

robustini avatar Jul 11 '22 05:07 robustini

The remote control where I made the red circle, no further than 100 meters from the racer. The tx warns me in audio by reading the value when the dynamic power changes, it remained at a minimum that is 10 mW, so the link was good when the RSSI was at that 23% (but shouldn't it go to 0?).

rssi_issue

robustini avatar Jul 11 '22 05:07 robustini

Last time I checked ELRS only supports 12 channels.

And out of interest why are you assigning RSSI and LQ to Aux channels ? I assume you are using the WIDE switch mode ?

breadoven avatar Jul 11 '22 09:07 breadoven

Last time I checked ELRS only supports 12 channels.

And out of interest why are you assigning RSSI and LQ to Aux channels ? I assume you are using the WIDE switch mode ?

ELRS V3.0 RC1, full res at 12 and 16 ch.

robustini avatar Jul 11 '22 09:07 robustini

Haven't checked ELRS stuff for a while, didn't realise that was now available. Maybe RC1 has issues ?

What's the reason for assigning RSSI and LQ to Aux channels though ? I don't use the RSSI channel in INAV with ELRS, doesn't seem relevant since it's available directly from the Rx is it not ?

breadoven avatar Jul 11 '22 10:07 breadoven

https://www.expresslrs.org/2.0/info/signal-health/

robustini avatar Jul 11 '22 10:07 robustini

Like breadoven says, there is no need to assign any AUX channels. RSSI and LQ works out of the box with iNav 5.0

Also try ExpressLRS v2.5.1 v3.0 is still a Release Candidate, although I don't expect any problems regarding RSSI and LQ.

0crap avatar Jul 11 '22 10:07 0crap

Like breadoven says, there is no need to assign any AUX channels. RSSI and LQ works out of the box with iNav 5.0

Also try ExpressLRS v2.5.1 v3.0 is still a Release Candidate, although I don't expect any problems regarding RSSI and LQ.

Ok, and where do log them? Not setting an AUX channel which of the two does it take as a reference for the failsafe? Because if take the RSSI the problem is there, at least here. How to select LQ? Inside the OSD tab?

robustini avatar Jul 11 '22 11:07 robustini

Just enable LQ, RSSI, SNR in the OSD, nothing more to do. Failsafe has nothing to do with AUX channels, just works out of the box. For RX logging I always grab it from my Taranis (OpenTX) radio. RSSI in % can also be found in the iNav BBL, but % does not tell me much. I prefer dBm and that is what the Taranis log will give you.

0crap avatar Jul 11 '22 11:07 0crap

Yes, but this does not eliminate the problem I have reported. If the failsafe is referring to RSSI and not LQ just look at my log to see what happened. Link stable and failsafe trips. I think if i select the AUX channel related to the LQ maybe it takes that as a reference, I try. This because i think the OSD table is for the OSD, not for the RSSI related to a possible failsafe.

robustini avatar Jul 11 '22 11:07 robustini

The receiver will see if there is a failsafe or not. There is nothing you have to setup or do for it to work. You even do not have to setup the OSD for it, but the OSD is handy so you see for yourself if the RX is working fine. You will also learn by looking at the OSD values to see if you are near the end of your range.

0crap avatar Jul 11 '22 11:07 0crap

Have to admit it's not easy trying to find out what does trigger Failsafe with ELRS. I get the impression looking at the INAV code it uses "no pulses" since there doesn't appear to be a Failsafe flag set by the Rx with CRSF when failsafe occurs, it just times out when no frames are received. Could be wrong here. So Failsafe is set by the output INAV receives from the Rx not anything related to values being received via Aux channels.

breadoven avatar Jul 11 '22 11:07 breadoven

So Failsafe is set by the output INAV receives from the Rx not anything related to values being received via Aux channels.

Correct.

0crap avatar Jul 11 '22 11:07 0crap

Have to admit it's not easy trying to find out what does trigger Failsafe with ELRS. I get the impression looking at the INAV code it uses "no pulses" since there doesn't appear to be a Failsafe flag set by the Rx with CRSF when failsafe occurs, it just times out when no frames are received. Could be wrong here. So Failsafe is set by the output INAV receives from the Rx not anything related to values being received via Aux channels.

Then this is in my opinion absolutely wrong. But if you look at my log tell me why it engage the failsafe with a link quality of 100, the max value.

robustini avatar Jul 11 '22 11:07 robustini

Really, forget about the BBL. Try it over with setting up your OSD properly and use the OpenTX logs. Nothing is wrong with iNav and ELRS. Good luck.

0crap avatar Jul 11 '22 11:07 0crap

Why wrong ? INAV simply looks to see if it's receiving a valid signal from the RX based on certain criteria. If those criteria aren't met it decides the signal is bad and goes into Failsafe. Either INAV is misinterpreting the signal from the Rx or the ELRS LQ, RSSI values have an issue.

breadoven avatar Jul 11 '22 11:07 breadoven

Really, forget about the BBL. Try it over with setting up your OSD properly and use the OpenTX logs. Nothing is wrong with iNav and ELRS. Good luck.

In fact unfortunately I had not activated the log on the tx, which I have now set. I'm curious to see if it still happens what the critical values are.

robustini avatar Jul 11 '22 11:07 robustini

You don't use the Aux channel values to trigger Failsafe mode I take it ?

I just set up the ELRS stuff, disabled the RSSI channel, didn't do anything else specific to get Failsafe to work and it just worked all by itself when I turned the Tx off.

breadoven avatar Jul 11 '22 11:07 breadoven

Why wrong ? INAV simply looks to see if it's receiving a valid signal from the RX based on certain criteria. If those criteria aren't met it decides the signal is bad and goes into Failsafe. Either INAV is misinterpreting the signal from the Rx or the ELRS LQ, RSSI values have an issue.

In the BBL I think you can even find that by looking at rxSignalReceived and/or rxFlightChannelsValid.

0crap avatar Jul 11 '22 11:07 0crap

You don't use the Aux channel values to trigger Failsafe mode I take it ?

I just set up the ELRS stuff, disabled the RSSI channel, didn't do anything else specific to get Failsafe to work and it just worked all by itself when I turned the Tx off.

I try and tell you flying what happens, thanks.

robustini avatar Jul 11 '22 11:07 robustini

Why wrong ? INAV simply looks to see if it's receiving a valid signal from the RX based on certain criteria. If those criteria aren't met it decides the signal is bad and goes into Failsafe. Either INAV is misinterpreting the signal from the Rx or the ELRS LQ, RSSI values have an issue.

In the BBL I think you can even find that by looking at rxSignalReceived and/or rxFlightChannelsValid.

Yes, rxSignalReceived go to 0 during the failsafe, rxFlightChannelsValid stay to 1.

robustini avatar Jul 11 '22 11:07 robustini

Check. So for sure you got a failsafe there.

0crap avatar Jul 11 '22 11:07 0crap

Out of interest, if you do use the Aux channels for LQ or RSSI, does that mean they aren't available for anything else, e.g. switches/pots ? Not obvious how this works from the ELRS info.

breadoven avatar Jul 11 '22 11:07 breadoven

Ok, but I still don't understand what could have happened, without the tx log it is not easy to understand. I was in dynamic power with the tx module to do a test, at 10 mW, max 250, the tx it warns me vocally as soon as that value changes, it never said anything, always 10 mW.

robustini avatar Jul 11 '22 11:07 robustini

Out of interest, if you do use the Aux channels for LQ or RSSI, does that mean they aren't available for anything else, e.g. switches/pots ? Not obvious how this works from the ELRS info.

AUX11 (ch15) is RSSI, AUX12 (ch16) is LQ. And they work on the test bench, you see them vary in the rx channels monitor. I put the tx in the microwave and in fact AUX11 goes from the maximum value to the one I posted above, but to get AUX12 down I had to go a long way from the rx, but both work. So what happens if I set the RSSI channel? Do ignore it? Do contemplate it? I don't know....

robustini avatar Jul 11 '22 11:07 robustini

Out of interest, if you do use the Aux channels for LQ or RSSI, does that mean they aren't available for anything else, e.g. switches/pots ? Not obvious how this works from the ELRS info.

What I've seen is that they are always very high up in the AUX range. Never possible to use that for anything at all that I know.

0crap avatar Jul 11 '22 11:07 0crap

AUX11 changes immediately instead. With the tx two meters away from the rx the sensor RSS1 on the tx it is at -50, and AUX11 seems to me to be around 1900, what I mean is that they work.

robustini avatar Jul 11 '22 11:07 robustini

Ok, but I still don't understand what could have happened, without the tx log it is not easy to understand. I was in dynamic power with the tx module to do a test, at 10 mW, max 250, the tx it warns me vocally as soon as that value changes, it never said anything, always 10 mW.

You will never know without the OpenTX log. I'm still on v2.5.1 and use fixed output power. It works much better vs dynamic power.

On v3 they changed how it works by including RSNR in the mix. Not tested that. Will see when v3 is on stable release.

0crap avatar Jul 11 '22 11:07 0crap

Surely testing an RC is not the best, but trusting the failsafe that works nice here the danger is relative. That's why I started testing with dynamic power. Today I try to replicate the problem but with the log on the tx active.

robustini avatar Jul 11 '22 11:07 robustini

AUX11 changes immediately instead. With the tx two meters away from the rx the sensor RSS1 on the tx it is at -50, and AUX11 seems to me to be around 1900, what I mean is that they work.

Really, forget about all this. The only test you should do is this: https://www.expresslrs.org/2.0/quick-start/pre-1stflight/#bench-test

0crap avatar Jul 11 '22 12:07 0crap

And I already did, I have those values.

robustini avatar Jul 11 '22 12:07 robustini