Electronic – How to add ECC to the packets

communicationerror correction

I have been looking into using LDPC's in some of my projects and have had some questions come up. Currently my structure looks something like this:

Message

I am then able to have hardware wake when it sees the preamble, read the length byte, and even check CRC for me before my processor has to handle the packet at all. This takes a lot of load off of processing time as well as code writing time.

What I am wondering is if there is any hardware out there that can use LDPC or any other correction code in a similar manner to what I am currently doing. Preferably it would be included with the wireless module, especially if it is able to do some soft decoding, but I am starting to think there isn't anything out there that does that currently. Because of this I am also open to "in-line" hardware that can assist with this.

So, know of anything?

Best Answer

What is the physical representation of bits being sent? In many cases, intra-packet error-correcting codes will be useless because even a transient glitch will cause many bits to be misinterpreted--quite possibly all bits until the next synchronization mark.

If forward error correction is needed, and packets are of uniform size, the simplest approach may be to send n packets worth of data using n+1 packets--each labeled with a packet number--where the (n+1)th packet contains the xor of the other ones. If the first n packets are read successfully, ignore the extra one. Otherwise, if one packet is missing or corrupted, infer its value by xor'ing the remaining n packets together.

A slight improvement of this approach would be to send 2n packets worth of data using 2n+2 packets, interleaving two sets of n+1 packets, each set being formulated as above. That would guarantee recovery from any single communications glitch which was no longer than the time required to send a single packet (a short glitch might hit the end of one packet and the start of the next, but the two packets would be in different xor-groups).

The biggest limitation with this approach is that packets must be assembled into groups (or, putting it another way, what could otherwise be larger packets must be subdivided into smaller ones). On the other hand, it is robust against glitches that would cause synchronization loss render large amounts of data unreadable.