Stacking of failed decoded messages

Hi developers,

As far as i know, messages are transmitted up to 3 times if there is no ACK that they have been decoded earlier at the “other end”, right?
And the Meshtastic code uses FEC, i.e. some redundant bits and such stuff. There is something like a checksum and/or threshold, and if the result of the decodes is below that threshold, the decode is considered to be false and thus dropped, right?
Assuming the S/N is to low to get a decode from one of the 3 message/packet transmissions, it is possible to stack the 3 results (in the end it is a chain of 0 and 1) in the hope that there is a clear decode.

Experts will notice that i’m not really an expert into this stuff but i know some basics about the idea.

Is such a method or attempt already used or has it been tried or is it a totally new idea to the developers? I don’t know but i’m interested of a feedback from those who actually write the code in that Meshtastic project…

When getting a correct decode from 3 false decodes, then this could be expressed in a gain in dB. A factor of 3 would be (up to) 4.77 dB. So this could result in more range, more reability…

Yes, there will be three retransmissions if you did not receive an ACK.

Adding redundant bits for FEC and the checksum (CRC) is all done by the LoRa chip, not in software.
The amount of redundant bits is controlled by the LoRa coding rate, which is already set to the highest for all modem presets in Meshtastic.

If the node did receive something, but there was an error, you will see this in the logs:

ignoring received packet due to error

But it might also be that it didn’t even detect the packet, so then you will not see anything.

All right. Now, if you received a packet which is just a little to weak to be correctly decoded and the second and third one is also just to weak, then one could try to stack these false packets bit-wise and then again try to see if a valid decode appears. You know how i mean?

A simple example could be:

correct: 0110010
1st : 0010110 (2 false bits, no decode))
2nd : 0111001 (3 false bits, no decode)
3rd : 1100011 (3 false bits, no decode)
sum1-3:0110011 (just the last bit is false, the others are correct, but with FEC the correct message can be determined.)

Something like that. I.e.
1+1+1 = 1
0+0+0=0
1+1+0=1
0+0+1=0

Yes, but then you also need to add a CRC yourself, because the LoRa chip only checks it per packet and you only get the real payload, not all raw bits including redundant ones.

And you need a smart way to decide which value the bit really has. Even if two packets report the bit as a 1 and one as a 0, it might still be a 0 especially if the former two packets had a lot of errors and the latter only one.

So there is no chance to request the raw bits from the chip? Can’t imagine that…

Of course that’s right but anyway you could, in some cases, make use of the chance that you are close to a decode. Surely, if there are several errors in any of the transmissions, there is stilll no chance…

If its possible to get the raw bits, then an expert (not like me :wink: ) could do some tests with signals just below the decode limit.
If that would work, Meshtastic transmissions would become more robust / resilient to transient noise bursts.

I have not found it in the datasheet. LoRa is a proprietary protocol, completely closed source so I don’t think they are willing to give you access to this.

Maybe you are right. I can’t contribute to that question. At least i rised it now :wink:
Maybe someone else of the community will confirm or deny and find a way how to start this…

All in all the recent upgrades have improved the project a lot! Especially the remote commands open a lot of possibilities…

1 Like

Oh, even 3 retransmissions, i.e. 4 overall transmissions. This would give even a better chance to find the correct decode, if its possible to get the raw bits…
But the more data to analyse, the more complex the optimal algorithm will be. Anyway, worth to do an attempt, even if the algorithm is simple…

There are even ideas how to try to get a correct decode from just 2 overall transmissions. And if that would work, then the overall traffic on the mesh would be greatly reduced.