View Single Post
  #9   Report Post  
Old July 7th 03, 08:16 AM
Paul Keinanen
 
Posts: n/a
Default

On 6 Jul 2003 19:46:48 -0700, (R C) wrote:

In ordinary RS-232 asynchronous communication the start bit is "0"
SPACE, interrupting the idle MARK state, followed by the data bits
with LSB sent first. The stop bit is "1" or MARK, which then transfers
to a MARK idle state if no more characters are to be transmitted.


That part I figured out from APRS packets recorded off the air. Start
is definately 1200 hz, stop is 2200 hz.


How did you determine this ?

APRS is definitively AX.25, which is a version of the X.25 protocol,
which are all members of the HDLC protocol family. These protocols
are _synchronous_ protocols, thus, they do not contain any start or
stop bits. The AX.25 protocol sends 8 bit octets (bytes) packed
immediately side by side without any bits in between them forming a
multiple octet frame. The whole frame starts with on octet with the
"01111110" bit pattern (the flag pattern) and it also ends with the
same pattern (or a single flag is used as a _frame_ separators, if
multiple frames are sent at once). In order to avoid false flag
detection within the data part of the frame, the 0 bit is inserted
after five consecutive 1 bits.

To illustrate how synchronous protocols work and how the bit stuffing
is done in HDLC, here is a simplified example (use fixed font).

Assume that you want to send the characters "a?b" which is 0x61 0x3F
0x62. First convert to bits (LSB first)

10000110 = 'a'
11111100 = '?'
01000110 = 'b'

Put them side by side

100001101111110001000110
.........^^^^^...........

Check for 5 consecutive 1 bits and add the bit stuffing.

1000011011111010001000110
_____________I___________

Add the flag octets

01111110100001101111101000100011001111110

It should be noted that the checking for five 1 bits must be done
after the bytes are put into a single bit stream, since sending two
consecutive bytes such as 00001111 11110000 do not violate the
five1bit rule separately, but when the bytes are combined into a bit
sequence, you would end up with 0000111111110000, bit stuffing must be
inserted 00001111101110000. Sending 11111111 11111111 requires three
stuff bits: 1111101111101111101

This a very simplified example, a real AX.25 frame would contain the
address fields and the CRC field at the end.

When you say that the APRS frame starts with a Mark and ends with a
Space, are you sure you are not seeing some effects of TxDelay, i.e.
the Tx is on but no data (or some preamble) is sent.

Paul OH3LWR