# FEC in LoRa/LoRaWAN

**URL:** <https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941>\
**Category:** End Devices (Nodes)\
**Created:** [February 19, 2019, 6:39pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941 "2019-02-19T18:39:54Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![snehasg95](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/snehasg95/32/20484_2.png) [@snehasg95](https://www.thethingsnetwork.org/forum/u/snehasg95)\
**Post date:** [February 19, 2019, 6:39pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/1 "2019-02-19T18:39:54Z")

</div>

Hello,

I am curious to know what type of FEC is used in the LoRa phy or LoRaWAN MAC layer. Is it plain hamming codes?

Is there a way I can read about this instance when instantiating a LoRa class.?

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [February 19, 2019, 7:20pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/2 "2019-02-19T19:20:50Z")

</div>



---

<div class="post-metadata">

**Author:** ![snehasg95](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/snehasg95/32/20484_2.png) [@snehasg95](https://www.thethingsnetwork.org/forum/u/snehasg95)\
**Post date:** [February 19, 2019, 7:22pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/3 "2019-02-19T19:22:10Z")

</div>

Hello Thanks for sharing this. I had gone through this already. I was just wondering if it is possible to implement any other type of error control coding over lora.?

is this possible?

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [February 19, 2019, 7:30pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/4 "2019-02-19T19:30:59Z")

</div>

my guess is NO, that’s not possible.

---

<div class="post-metadata">

**Author:** ![snehasg95](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/snehasg95/32/20484_2.png) [@snehasg95](https://www.thethingsnetwork.org/forum/u/snehasg95)\
**Post date:** [February 19, 2019, 7:40pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/5 "2019-02-19T19:40:02Z")

</div>

if you could share with me your thoughts it will be helpful. I am just starting to explore lora.

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [February 19, 2019, 7:58pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/6 "2019-02-19T19:58:45Z")

</div>

> [@snehasg95](#):
>
> if you could share with me your thoughts

I just did 🕶

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [February 19, 2019, 8:41pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/7 "2019-02-19T20:41:21Z")

</div>

> [@snehasg95](#):
>
> I was just wondering if it is possible to implement any other type of error control coding over lora.?

FEC is part of LoRa at the hardware level.

I guess you could take a payload and add your own bespoke FEC coding, the FIFO will have the packet even if it has bit errors and fails CRC.

Going from 4:5 to 4:8 already increases time on air by 25%.

What the application ?

---

<div class="post-metadata">

**Author:** ![snehasg95](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/snehasg95/32/20484_2.png) [@snehasg95](https://www.thethingsnetwork.org/forum/u/snehasg95)\
**Post date:** [February 19, 2019, 8:51pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/8 "2019-02-19T20:51:31Z")

</div>

Currently just testing the transmission of data packets from one lopy node to the other. Otherwise, in future we may implement it or our IOT systems.

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [February 19, 2019, 9:10pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/9 "2019-02-19T21:10:25Z")

</div>

> [@LoRaTracker](#):
>
> the FIFO will have the packet even if it has bit errors and fails CRC

But then one would also need to configure the gateways to forward such messages, despite the bad CRC. So I’d guess that adding an application-level error correction is not possible on the community network?

(Except for redundancy distributed over multiple uplinks, to mitigate uplinks that go missing altogether.)

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [February 20, 2019, 5:36am UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/10 "2019-02-20T05:36:19Z")

</div>

> [@arjanvanb](#):
>
> But then one would also need to configure the gateways to forward such messages, despite the bad CRC

Indeed, and that sounds impractical for TTN application, I would have thought. You would need to apply the ‘custom FEC’ tothe packet before the gateway could forward the packet.

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [February 20, 2019, 5:41am UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/11 "2019-02-20T05:41:16Z")

</div>

I have done some link tests at the various FEC levels, and the signal gains are small compared to the increase in packet length, which is not a good idea.

If your intention is to implement an additional FEC layer for TTN, which is what this forum is about, its difficult to see that such a change would be agreed, there seems to be no benefit.

---

<div class="post-metadata">

**Author:** ![snehasg95](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/snehasg95/32/20484_2.png) [@snehasg95](https://www.thethingsnetwork.org/forum/u/snehasg95)\
**Post date:** [February 20, 2019, 4:14pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/12 "2019-02-20T16:14:10Z")

</div>

Hello,

Thanks for your thoughts. I was just keen in exploring other error control codes , say instead of FEC, if I would use Incremental Forward error correction how would that affect the data rates.

Just to clarify are you saying that any community level thoughts / modifications cannot be implemented with TTN? I am relatively new to TTN as well, and not sure how it works.

---

<div class="post-metadata">

**Author:** ![snehasg95](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/snehasg95/32/20484_2.png) [@snehasg95](https://www.thethingsnetwork.org/forum/u/snehasg95)\
**Post date:** [February 26, 2019, 5:44pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/13 "2019-02-26T17:44:28Z")

</div>

hello,

I tried to implement Reed solomon code on lora and it does not work that effectively compared to FEC using hamming code. Any suggestions as to what you had used?

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [February 26, 2019, 5:57pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/14 "2019-02-26T17:57:02Z")

</div>

I had checked the reception difference between the different FEC levels built into the LoRa device firmware, 4:5 to 4:8.

How are you intending to implement this changed FEC within TTN ?

---

<div class="post-metadata">

**Author:** ![snehasg95](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/snehasg95/32/20484_2.png) [@snehasg95](https://www.thethingsnetwork.org/forum/u/snehasg95)\
**Post date:** [February 26, 2019, 6:08pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/15 "2019-02-26T18:08:41Z")

</div>

I am afraid there is a provision to do so. Right now it is just over the physical layer of lora.

---

<div class="post-metadata">

**Author:** ![system](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/6/2/6250ea44fd2b0d6259489e1a92748df681e1f970.png) [@system](https://www.thethingsnetwork.org/forum/u/system)\
**Post date:** [April 27, 2019, 6:16pm UTC](https://www.thethingsnetwork.org/forum/t/fec-in-lora-lorawan/22941/16 "2019-04-27T18:16:55Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
