I have previously implemented an APRS transmitter from scratch by manually generating the modulated sine wave. In this implementation, I did NZRI encoding over the entire packet (including postamble and preamble), though only the payload bytes were bit stuffed. This approach worked fine, but I'm wondering if this was a coincidence.

I'm looking at making a new APRS transmitter, and now I'm having doubts about whether the flag bytes are NZRI encoded or not. I can't find any documentation that says for sure one way or the other.

  • $\begingroup$ What do you mean by "the flag bytes"? Do you mean 0x7E bytes? $\endgroup$ – Glenn W9IQ Oct 4 '18 at 23:39
  • $\begingroup$ It's NRZI, not NZRI, for what it's worth :) $\endgroup$ – hobbs - KC2G Oct 5 '18 at 1:55

The challenge with the HDLC/Bell 202 "standard" is that it is poorly defined and so it results in varietal implementations. One is often left to test a questionable element against a variety of implementations to find what works best. And often "best" is not the measure but rather "what works well in this circumstance?".

Ken Finnegan, W6KWF compiled perhaps one of the best examinations of the "standard" as a Masters degree student at California Polytech. His paper can still be found on-line on the TAPR website.

If you have found that the flag byte functions without bit stuffing, then you are most likely correct. Ken points out that payload and frame checksum must be bit stuffed. From this one can infer that the flag bytes are not subjected to bit stuffing since they are not part of either. Furthermore, bit stuffing is required after every five 1's and clearly the 0x07e flag byte consists of 6 consecutive 1's so if this has worked for you in the past without bit stuffing, there exists at least some population of the implementations that agrees with your methodology. Go with that until you find a larger population of contrarians.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.