# OFDM and FEC

**URL:** <https://www.ruby-forum.com/t/ofdm-and-fec/233021>\
**Category:** GNU Radio\
**Created:** [November 11, 2014, 9:33pm UTC](https://www.ruby-forum.com/t/ofdm-and-fec/233021 "2014-11-11T21:33:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [November 11, 2014, 9:33pm UTC](https://www.ruby-forum.com/t/ofdm-and-fec/233021/1 "2014-11-11T21:33:15Z")

</div>

Hi Folks,

I am attempting to get some FEC working with my GRC OFDM Transmitter  
and Receiver, which I created by modifying the example versions. You  
can see the flowgraphs at:

[http://hal.g7iii.net/GRC/OFDM/ofdm\_rx\_fcd.grc](http://hal.g7iii.net/GRC/OFDM/ofdm_rx_fcd.grc) - GRC FCD RX Flowgraph  
[http://hal.g7iii.net/GRC/OFDM/ofdm\_rx\_fcd.grc.png](http://hal.g7iii.net/GRC/OFDM/ofdm_rx_fcd.grc.png) - FCD RX Screen-shot  
[http://hal.g7iii.net/GRC/OFDM/ofdm\_rx\_fcd.py](http://hal.g7iii.net/GRC/OFDM/ofdm_rx_fcd.py) - Raw python Flowgraph

[http://hal.g7iii.net/GRC/OFDM/ofdm\_tx\_usrp.grc](http://hal.g7iii.net/GRC/OFDM/ofdm_tx_usrp.grc) - GRC USRP TX Flowgraph  
[http://hal.g7iii.net/GRC/OFDM/ofdm\_tx\_usrp.grc.png](http://hal.g7iii.net/GRC/OFDM/ofdm_tx_usrp.grc.png) - USRP TX Screen-shot  
[http://hal.g7iii.net/GRC/OFDM/ofdm\_tx\_usrp.py](http://hal.g7iii.net/GRC/OFDM/ofdm_tx_usrp.py) - Raw Python Flowgraph

Currently they use a UDP Port for convenience, but I will be migrating  
them to use a tuntap PDU in due course. And yes, I know by some  
standards these are very low bandwidths, but 125k is quite high for Ham  
purposes 🙂

There is a USRP receiver as well, but I’m working with some folks that  
only have a Funcube Dongle Pro plus, so am concentrating on that receive  
flowgraph for now.

These flowgraphs do work. I do get data to transfer between the two  
ends, however:

I transmit a test file of 1000 lines. Not all lines make it, some get  
missed, and some get corrupt (missing characters), so having found the  
FEC examples, thought I would try and hack them into my flowgraphs.

The resulting flowgraphs are here:

[http://hal.g7iii.net/GRC/OFDM/ofdm\_rx\_fcd\_fec.grc](http://hal.g7iii.net/GRC/OFDM/ofdm_rx_fcd_fec.grc) [GRC FCD RX w/FEC]  
[http://hal.g7iii.net/GRC/OFDM/ofdm\_rx\_fcd\_fec.grc.png](http://hal.g7iii.net/GRC/OFDM/ofdm_rx_fcd_fec.grc.png) [FCD RX w/FEC s/s]  
[http://hal.g7iii.net/GRC/OFDM/ofdm\_rx\_fcd\_fec.py](http://hal.g7iii.net/GRC/OFDM/ofdm_rx_fcd_fec.py) [Raw Python Flowgraph]

[http://hal.g7iii.net/GRC/OFDM/ofdm\_tx\_usrp\_fec.grc](http://hal.g7iii.net/GRC/OFDM/ofdm_tx_usrp_fec.grc) [GRC USRP TX w/FEC]  
[http://hal.g7iii.net/GRC/OFDM/ofdm\_tx\_usrp\_fec.grc.png](http://hal.g7iii.net/GRC/OFDM/ofdm_tx_usrp_fec.grc.png) [Screenshot]  
[http://hal.g7iii.net/GRC/OFDM/ofdm\_tx\_usrp\_fec.py](http://hal.g7iii.net/GRC/OFDM/ofdm_tx_usrp_fec.py) [Raw Python Flowgraph]

Now, when testing with the dummy encoders, everything behaves exactly  
as if the FEC wasn’t there (Okay, this was good, as it’s exactly what I  
expected, but at least it proved I hadn’t messed up entirely!])

So I got adventurous, and started to play with some of the other  
encoders and decoders. This turned out not so good, as after a number  
of “experiments” I could not get any data transferred when using the CC  
(&CCSDS) encoder and decoder pairs, nor when using the Repetition  
encoder/decoder pair.

However, when running the replicator encoder with the dummy decoder, OR  
the replicator decoder set to 1 replication, I did see 3 copies of each  
character arrive.

When running the CCSDS and CC encoders with the dummy decoder, I saw  
“garbage”, so I must have the code partially correct.

Can anyone tell me where I might not be getting it quite so right ? Or  
even any working examples of OFDM and FEC ?

Best Regards

Iain

---

<div class="post-metadata">

**Author:** ![Iain\_YoungS\_G7III](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3da27b/32.png) [@Iain\_YoungS\_G7III](https://www.ruby-forum.com/u/Iain_YoungS_G7III)\
**Post date:** [November 18, 2014, 2:46pm UTC](https://www.ruby-forum.com/t/ofdm-and-fec/233021/2 "2014-11-18T14:46:11Z")

</div>

Oh wow, I wanted to answer this a while back. Guess I didn’t.

First, have you checked out gr-mac? It looks like you’re duplicating  
those efforts. I know that someone (might have been Tom) has done this  
(OFDM + FEC).

One thing I’ve noticed is that you do FEC-\>CRC on tx, and FRC-\>CRC on  
rx. You might want to make sure the order is inversed on tx and rx.

Cheers,  
M

---

<div class="post-metadata">

**Author:** ![Iain\_YoungS\_G7III](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3da27b/32.png) [@Iain\_YoungS\_G7III](https://www.ruby-forum.com/u/Iain_YoungS_G7III)\
**Post date:** [November 19, 2014, 4:10pm UTC](https://www.ruby-forum.com/t/ofdm-and-fec/233021/3 "2014-11-19T16:10:10Z")

</div>

On Tue, Nov 18, 2014 at 8:44 AM, Martin B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> M  
> Yes, you can check out my fec\_gmsk on my fork of gr-mac. This was really  
> just for my testing purposes of the new FEC API that we put into GNU  
> Radio,  
> so it’s not very clean. But you might be able to see some of the work  
> done  
> there to get the FEC blocks properly integrated.

The OFDM world is a bit more difficult from what I recall. There isn’t  
an  
opening in the flowgraph at the right place to put in the FEC encoder  
and/or decoder. But looking at what I did with the GMSK modems to fit  
them  
in might help clue you in there.

Tom
