AX 25 and HDLC Framing and deframing

Hello all,

I am currently exploring the amateur protocols and found multiple sources on web on the details of encoding and it was slightly confusing as I am new to this domain

Could some one help me any existing tool or code that helps in framing and deframing as per the standard protocols

Please share standard references for usage of these protocols in amateur satellites,

Thanks in advance.

Looking forward to your help!

Have you tried Not Black Magic’s AX.25 and HDLC Frame Encoder/Decoder yet?

Yes I did

I couldn’t understand which crc polynomial is used there

Also I had a doubt in the information field, if the information field is hex itself let us say some host is sending the hex payload to the module, then I think the info section is taking it as ASCII and equivalent hex is being used when ax.25 is generated

Again bit reversal lsb to msb during hdlc Framing

Can you please confirm is this is the way and understanding is correct?

For the FCS, the CRC polynomial x16+x12+x5+1 = (0x1021) is used with Initial and Final XOR: 0xFFFF
You may use sunshine2k.de to generate a CRC.

As for the information field, it depends on how the information is handed over to the modem/TNC.
For example, you could pass a (complete) frame (holding the information field) with echo 'c000a8b0a6b2a06ae088986e9c88a4e09e966098a6a46103f0607e5a5f1c201c792f22c0' | xxd -r -p | nc -N 127.0.0.1 8001 to your on port 8001 listening modem. Then the information field will be exactly the hex string 607e5a5f1c201c792f22. [c000 and c0 is the kiss framing]
A terminal programm will interpret this hex string as ASCII and hands it over to the modem as 36 30 37 65 35 61 35 66 31 63 32 30 31 63 37 39 32 66 32 32.

HDLC (and therefore also AX.25) uses a LSB first bit order, except for the FCS field which is MSB first.

Thank you so much!!

Will try this.

1 Like

@dl7ndr Hi

Could you refer any built in tools inside GNU radio or existing flowgraphs which does hdlc Framing and deframing perfectly.?

Thanks in advance.

I am trying to match the output of hdlc framer blocks inside the GNU and the output from the website(not black magic one)

Or could you also suggest any satellite data for working on? And validating the ax.25/hdlc framing and deframing ?

@dl7ndr hi


I am tyring this way. Kindly check if I can proceed this way

This way I am trying to test the framer and deframer

Try gr_satellites with blocks HDLC Framer and HDLC Deframer.

Feel free to take any AX.25 packet from the network of SatNOGS, for example from this observation.
Just klick on data_obs.... to download the hex file to feed GNU Radio.

Please take a look at fsk.grc from gr_satellites.