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

Radioamatööriwikistä
Siirry navigaatioon Siirry hakuun
>Oh2mqk
(re-formatting text)
>Oh2mqk
(About modulation details on AFSK as used by APRS.)
Rivi 21: Rivi 21:
* 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), but that is not very common.
** Some receivers accept also V.23 tones (1300 Hz / 2100 Hz), but that is not very common.
There is no well known and recognized standard on what deviation signal should be produced by these tones, and when one listens on audio, this is apparent with varying tone volume when different systems are sending packetsOn FM this means the signal deviations vary, which then appears at varying signal volumes and only observing S/Nb0 is telling if the signal is really from too far away, and too weak to be properly detected by the FM detector.
On modulation front there are two major way incompatible modes, and third which is a compromise in between:
* Unmodified NBFM voice radios with microphone pre-emphasis and speaker de-emphasis, which results varying deviations (FM's presentation of signal amplitude) per modulated AFSK tones.
* Modified NBFM voice radios, and systems with integrated modems without emphasis in AFSK->FM-modulator path.  This includes Kenwood D7/D70/D700 series.
* Third way modified systems with voice emphasis about half of normal value, which produces received signal tones with less difference than either normal voice de-emphasis receiver, or all flat receiver.
The microphone emphasis affects deviation so that 2200 Hz tone has deviation about double of that of 1200 Hz tone.  Without this emphasis both tones have same deviation.
* Similar emphasis systems receive tones with same amplitudes
* When voice emphasis transmits, flat receiver hears two different amplitudes, high tone having about double amplitude of low tone.
* When flat modulator transmits, a voice de-emphasis hears the low tone at about twice the amplitude of high tone.
* A well functioning receiver needs to have dynamics to handle both cases without encountering distortion in the audio waveform, and the AFSK demodulator must be able to handle this radically different sinewave amplitude. This means that audio signal path to AFSK demodulator must have enough headroom to receive "excessively strong" tones, and simultaneously to have high enough audio level for weaker tone to be demodulated correctly.
* Technically speaking, a flat (non-emphasized) modulator does produce better quality FM signal, but existing voice radios treat the received result in nasty ways.
In every case the modulation should have its deviation fitting within center 5 kHz of 25 kHz channel.  There is no good definition of how to fit this modulation on narrower 12.5 kHz channel without partial signal overlap.




Rivi 40: Rivi 50:
Converting HDLC to NRZI (and back) can be done with this circuitry, or equivalent software:
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]]


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

Versio 3. lokakuuta 2009 kello 01.07

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. Taking hint from APRS specification v2.2 they could be 111 for destination, and 011 for source.
    • In practice all 64 mixes are apparent in radio networks. Receiver really must ignore them.
  • 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!

After the AX.25 address fields, used control byte is always 0x03, and used PID byte is 0xF0. These are validated very commonly, so always do use correct values here!

There are special meanings on some values as used in VIA (digipeater) fields of address header, these include "WIDEn-N", and "TRACEn-N".


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.

On modulation front there are two major way incompatible modes, and third which is a compromise in between:

  • Unmodified NBFM voice radios with microphone pre-emphasis and speaker de-emphasis, which results varying deviations (FM's presentation of signal amplitude) per modulated AFSK tones.
  • Modified NBFM voice radios, and systems with integrated modems without emphasis in AFSK->FM-modulator path. This includes Kenwood D7/D70/D700 series.
  • Third way modified systems with voice emphasis about half of normal value, which produces received signal tones with less difference than either normal voice de-emphasis receiver, or all flat receiver.

The microphone emphasis affects deviation so that 2200 Hz tone has deviation about double of that of 1200 Hz tone. Without this emphasis both tones have same deviation.

  • Similar emphasis systems receive tones with same amplitudes
  • When voice emphasis transmits, flat receiver hears two different amplitudes, high tone having about double amplitude of low tone.
  • When flat modulator transmits, a voice de-emphasis hears the low tone at about twice the amplitude of high tone.
  • A well functioning receiver needs to have dynamics to handle both cases without encountering distortion in the audio waveform, and the AFSK demodulator must be able to handle this radically different sinewave amplitude. This means that audio signal path to AFSK demodulator must have enough headroom to receive "excessively strong" tones, and simultaneously to have high enough audio level for weaker tone to be demodulated correctly.
  • Technically speaking, a flat (non-emphasized) modulator does produce better quality FM signal, but existing voice radios treat the received result in nasty ways.

In every case the modulation should have its deviation fitting within center 5 kHz of 25 kHz channel. There is no good definition of how to fit this modulation on narrower 12.5 kHz channel without partial signal overlap.


For preamble before first HDLC flag, there should be at least 16 zero bits, which produce alternating bit pattern from NRZI encoding resulting then an alternating tone pattern, which enables quick bit synchronization achievement. Duration of the preamble depends on transmitter, in particular on how long it takes to stabilize on correct center-frequency. Stabilization should be achieved for at least 4/1200 seconds before end of preamble.


About HDLC and CRC-CCITT (16 bits):

  • Bytes in HDLC payload are sent low bit first.
  • HDLC is bit synchronous transmission of data, where encoded payload has never more than 5 consecutive high (1) bits.
  • When payload would have 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 flag sequence is: 0111,1110, and is separated from payload's raw representation by the zero-bit-stuffing rule.
  • 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".
  • 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!
  • 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.


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

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