Ero sivun ”APRS-AX.25.en” versioiden välillä

Radioamatööriwikistä
Siirry navigaatioon Siirry hakuun
>Oh2mqk
p (HDLC bit-stuffing)
>Oh2mqk
(More notes about HDLC generation)
Rivi 15: Rivi 15:
* Original datastream is at first run thru HDLC encoding, then NRZI encoding, which inverts outgoing bit every time there is zero bit in the original data-stream.
* Original datastream is at first run thru HDLC encoding, then NRZI encoding, which inverts outgoing bit every time there is zero bit in the original data-stream.
* NRZI datastream produces AFSK tones per Bell-202, 1200 Hz (for bit 1) / 2200 Hz (for bit 0)
* NRZI datastream produces AFSK tones per Bell-202, 1200 Hz (for bit 1) / 2200 Hz (for bit 0)
** Some receivers accept also V.23 tones (1300 Hz / 2100 Hz)
** Some receivers accept also V.23 tones (1300 Hz / 2100 Hz), but that is not very common.




Converting HDLC to NRZI (and back) can be done with this circuitry:
Converting HDLC to NRZI (and back) can be done with this circuitry, or equivalent software:
:[[Image:Packet-radio-hdlc-to-nrzi-conv.png|600px]]
:[[Image:Packet-radio-hdlc-to-nrzi-conv.png|600px]]


Rivi 26: Rivi 26:
If more than one data packet is sent, the entire time after first data packet's ending flag until next packet's start flag shall be filled with flags, '''not''' zero bits, nor anything else!
If more than one data packet is sent, the entire time after first data packet's ending flag until next packet's start flag shall be filled with flags, '''not''' zero bits, nor anything else!


NOTE: Should add some notes about HDLC and CRC-16 processing in it.
About HDLC and CRC-CCITT (16 bits):
* HDLC is bit synchronous transmission of data, where payload has never more than 5 consequtive high (1) bits.
* HDLC is bit synchronous transmission of data, where payload has never more than 5 consecutive high (1) bits.
* FLAG sequences in HDLC separate payload frames, and fill also idle time.  The sequence is:  0111,1110
* When payload has more than 5 sequential 1 bits, the bit-stuffing algorithm inserts a zero bit after 5 consecutive one bits. Receiver must remove these inserted zero bits.
* When payload has more than 5 sequential 1 bits, the bit-stuffing algorithm inserts a zero bit after 5 consequtive one bits ....
* FLAG sequences in HDLC separate payload frames, and fill also idle time in between data carrying frames.  The sequence is:  0111,1110.  If more than one data frame is sent in single transmission, those frames can be separated by anything from one to several flags.  Single flag separation is called "back-to-back".
 
* Bytes in HDLC payload are sent low bit first.
* HDLC specification says that data is followed by 16 bits of CRC-16 sent out high bit first. Calculating this with reciprocal polynome permits sending it low bit first, where that may be necessary for extremely memory space sensitive assembly coding.
** Scott A Miller has example codes of this for OpenTracker use at his web: http://n1vg.net/packet/index.php


[[Luokka:APRS]]
[[Luokka:APRS]]

Versio 2. lokakuuta 2009 kello 20.54

Finnish version is at APRS-AX.25 page

APRS uses variation of AX.25-link-layer protocol, which leaves several of AX.25 protocol details ignored.

Most important differences:

  • Three topmost bits on Source and Destination address fields SSID bytes are never validated. Practically any bit values can be used, but recommended version is to use 011 or 111 for both fields.
  • VIA address fields (digipeater fields) can be up to 8, AX.25 v2.2 says that there can be up to two.
  • The topmost bit on SSID bytes of VIA address fields is "Has been digipeated", and the two reserved ones should be "11", but again nobody validates those two reserved bits!


Primary modulation method:

  • NBFM radio on frequency which depends on the continent of operation. 144.390 MHz on USA, 144.800 MHz in Europe, etc.
  • FM carries two audio modem tones at 1200 baud bit-rate. Method is known as AFSK.
  • Original datastream is at first run thru HDLC encoding, then NRZI encoding, which inverts outgoing bit every time there is zero bit in the original data-stream.
  • NRZI datastream produces AFSK tones per Bell-202, 1200 Hz (for bit 1) / 2200 Hz (for bit 0)
    • Some receivers accept also V.23 tones (1300 Hz / 2100 Hz), but that is not very common.


Converting HDLC to NRZI (and back) can be done with this circuitry, or equivalent software:

Packet-radio-hdlc-to-nrzi-conv.png


For preamble before first HDLC flag, there should be at least 16 zero bits, which produce alternating tone pattern, which then quickens bit synchrony detection.

If more than one data packet is sent, the entire time after first data packet's ending flag until next packet's start flag shall be filled with flags, not zero bits, nor anything else!

About HDLC and CRC-CCITT (16 bits):

  • HDLC is bit synchronous transmission of data, where payload has never more than 5 consecutive high (1) bits.
  • When payload has more than 5 sequential 1 bits, the bit-stuffing algorithm inserts a zero bit after 5 consecutive one bits. Receiver must remove these inserted zero bits.
  • FLAG sequences in HDLC separate payload frames, and fill also idle time in between data carrying frames. The sequence is: 0111,1110. If more than one data frame is sent in single transmission, those frames can be separated by anything from one to several flags. Single flag separation is called "back-to-back".
  • Bytes in HDLC payload are sent low bit first.
  • HDLC specification says that data is followed by 16 bits of CRC-16 sent out high bit first. Calculating this with reciprocal polynome permits sending it low bit first, where that may be necessary for extremely memory space sensitive assembly coding.