GNU Radio Companion - Packet Encoder/Decoder

How to Packetize (encode) transmitted bytes into frames, then decode to extract back the original bytes

Prepared by Dr. Aaron Scher
[email protected]
Oregon Institute of Technology

Back to My collection of GNU radio companion flow graphs
Back to Aaron's home page.

(Last updated: Oct 2015)

Download file: packet_encoder_decoder.grc.

Flow Graph:

Encoder/Decoder

Below is the result of the simulation. The file source is cat_in.png (picture of a cat). The picture was successfully transferred. In this simulation the payload is set to 4 (bytes). This means the encoder takes in four bytes at a time, and these bytes get wrapped into a packet with a header, access code, and preamble, and the packet is sent on to the next block. I found that if I set the payload length to something less than 4, the entire picture does not transfer (I only get a partical cat at the output!). I'm exactly not sure why this is. If I set the payload length to something greater than 4, the transfer still works (and it goes faster).

FM Radio

Here is the result of a second simulation. The source file is a regular .txt file with the phrase "Hello World!". The file source properties are set to repeat (Repeat = "Yes"):

2PAM modulator

Notes