[aprssig] KISS Protocol Question

Lynn W. Deffenbaugh (Mr) ldeffenb at homeside.to
Wed Oct 17 16:33:27 EDT 2012


The AX.25 header portion is bit-shifted ASCII along with some bit flags 
in 7 octet "chunks".  Once you get through those (as flagged by one of 
the bits), the packet payload for APRS packets is straight ASCII, hence 
what you are seeing.

KISS is just a wrapper (and escaper if the boundary character appears 
inside) for a raw AX.25 packet.  You'll need to grok the AX.25 spec to 
be able to interpret the actual packet headers.  And then you'll need to 
grok aprs101.pdf to interpret the APRS packets in the payloads.

http://www.tapr.org/pub_ax25.html links to the PDF for AX.25. Because 
you're doing KISS, you can ignore the descriptions of "bit-stuffing" and 
the FCS (checksum) as those are handled by the TNC.  If you're only 
interested in APRS packets, you can ignore everything about connected 
mode packets and focus solely on UI packets, but the interpretation of 
the header portion is the same.

Just remember that every packet starts with a destination address 
followed by the source address optionally followed by path components 
and finally followed by some sort of payload.  The first two addresses 
are opposite of what we're used to seeing in humanly-readable packet 
interpretations.

Lynn (D) - KJ4ERJ - Author of APRSISCE for Windows Mobile and Win32

On 10/17/2012 4:20 PM, Brett Friermood wrote:
> Hi all,
>
> A little off topic, but figured this might be the best list to try
> first. Hopefully someone else can benefit also.
>
> I decided I wanted to try writing my own interface to a KISS TNC. More
> for fun than anything else at this point, but I do have an idea for a
> couple little projects down the road.
>
> I did a little online research and have read the document written by
> KA9Q. It seems pretty straight forward, but I'm having a little
> difficulty. For a data stream I am using off the air APRS packets.
>
> My understanding of the protocol is data is sent in 8 bit binary. Any
> frames sent from the TNC to the host will be of the format
> "FEND,Port,---packet data---,FEND" where FEND is hex C0 and the Port
> will be hex 00 in my case.
>
> I have written a simple script in Python that reads bytes from the
> serial port. By doing so I get a hex value I can further use. I do
> some processing to use FEND as a delimiter and input the remainder
> into a list. I then print the "raw" strings in that list. Below is one
> such output:
>
> '\x00' '\x82' '\xa0' '\xaa' 'd' 'j' '\x9c' '\xe0' '\x9c' 'r' '\xaa'
> '\x88' '\x9e' '@' '`' '\x9c' 'r' '\xa2' '\x92' '\xa0' '@' '\xf4'
> '\xae' 'r' '\x98' '\xa8' '\x82' '@' '\xf4' '\x9c' 'r' '\x9a' '\x8a'
> '\x82' '@' '\xfe' '\xae' 'r' '\x9c' '\x9c' '\xa6' '@' '\xf0' '\xae'
> '\x92' '\x88' '\x8a' 'f' '@' '\xe1' '\x03' '\xf0' '=' '4' '3' '2' '9'
> '.' '3' '3' 'N' '/' '0' '8' '9' '4' '3' '.' '4' '5' 'W' '-' 'S' 't'
> 'e' 'v' 'e' ' ' 'i' 'n' ' ' 'B' 'a' 'r' 'a' 'b' 'o' 'o' ' ' 'o' 'n''
> ' 'U' 'I' '-' 'V' 'i' 'e' 'w' '\r'
>
> By printing the strings in raw format I was expecting to see all hex
> characters since they had not been converted to ASCII yet, but as
> shown roughly half of the packet is usually displayed as ASCII. I hope
> this is only a phenomenon of being printed and somehow being
> interpreted in ASCII.
>
> The issue, though, is with the remaining hex characters. The first
> element ('\x00') is of course the port part of the KISS frame. However
> the remainder are unprintable hex characters. My understanding is that
> the data portion of the KISS frame would be the ASCII text of the APRS
> packet, in hex.
>
> Can anyone offer any insight? Am I misunderstanding the protocol, or
> just missing some little step?
>
> Thanks,
> Brett KQ9N
>
> _______________________________________________
> aprssig mailing list
> aprssig at tapr.org
> https://www.tapr.org/cgi-bin/mailman/listinfo/aprssig
>





More information about the aprssig mailing list