Order Tray | Contact Us | Home | SIG Lists

[aprssig] KISS Protocol Question

Brett Friermood brett.friermood at gmail.com
Wed Oct 17 20:20:56 UTC 2012

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?

Brett KQ9N

More information about the aprssig mailing list