Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is the APRS-IS format specified? #1

Closed
MarneeDear opened this issue Feb 9, 2019 · 3 comments
Closed

Where is the APRS-IS format specified? #1

MarneeDear opened this issue Feb 9, 2019 · 3 comments

Comments

@MarneeDear
Copy link

In the Wiki you talk about the packets in this format:

A>B,C,D,E:hi there

I am assuming this is the data storage format used by APRS-IS database, but I can't find where or how this format is specified. Where is this format specified? Do you have a reference? I need this for an APRS project I am working on.

Thank your for this documentation. It is helping me a lot with my own APRS project.

@MarneeDear
Copy link
Author

MarneeDear commented Feb 9, 2019

I think I finally found it on the APRS-IS specification.

http://www.aprs-is.net/Specification.aspx

TNC2 monitor format (SENDER>DEST,PATH:rest of packet)

@n2ygk
Copy link
Owner

n2ygk commented Feb 9, 2019

In the Wiki you talk about the packets in this format:

A>B,C,D,E:hi there

I am assuming this is the data storage format used by APRS-IS database, but I can't find where or how this format is specified. Where is this format specified? Do you have a reference? I need this for an APRS project I am working on.

This is the way APRS-IS transmits the messages and is an extension of the TAPR TNC 2 ASCII textual representation of the actual AX.25 UI frame wire protocol.
'A' is the sender, 'B' is the destination, source-routed via digipeater path 'C', 'D' and 'E'. "hi there" is the data. When you put a TNC2 into "MONitor" mode, any packets received are displayed using this format, which became the defacto standard for representing APRS data on the Internet.

See here for an example of how this message is parsed into its component parts:

aprs-bigdata/aprs.py

Lines 76 to 90 in 8392dd6

def parse(l,clock=None):
"""parse a packet into constituent parts and insert into call[<callsign>]
returns from_call"""
s = re.match('^(?P<from_call>[^>]+)>(?P<to_call>[^,]+),*(?P<digis>.*),(?P<gtype>[^,]+),(?P<gate>[^:]+)(:)(?P<info>.*)$',l)
if s:
fc = s.group('from_call')
if fc not in call: print fc
tm = int(time.time()) if clock == None else clock;
call[fc].append(Packet(from_call=fc,gate=s.group('gate'),info=s.group('info'),
full=l,clock=tm,gtype=s.group('gtype'),
digis=s.group('digis').split(','),to_call=s.group('to_call')))
return fc
else:
if l[0] != '#': print 'Eh? >>>{}<<<'.format(l)
return None

See https://www.tapr.org/pdf/APRS101.pdf which describes how APRS overloads the meaning of the various address and data fields. It's pretty kludgy. See also https://tapr.org/aprs_information.html and ftp://www.tapr.org/projects/mic-edev/software/mic-e-proto.html

APRS-IS further overloads the digipeater notation to indicating gateways between over-the-air and the Internet via "IGATEs". See for example this recent packet trace:

2019-02-08 18:52:33 EST: KC2ASA-9>TQ0X4X,WB2ZII*,WIDE1,WIDE2-1,qAR,WB2ZII-15:`f&{pI$>\`"5#}145.170MHz T114 -060 Voice Alert, DMR & D*_" 
2019-02-08 18:54:36 EST: KC2ASA-9>TQ0X2T,WB2ZII*,WIDE1,WIDE2-1,qAR,WB2ZII-15:`f&<0x1d>mqP>\`"5%}145.170MHz T114 -060 Voice Alert, DMR & D*_" 
2019-02-08 18:58:17 EST: KC2ASA-9>TQ0W0S,WB2ZII*,WIDE1,WIDE2-1,qAR,N2MH-15:`fa&mSW>\`"5!}145.170MHz T114 -060 Voice Alert, DMR & D*_"
2019-02-08 18:58:17 EST: KC2ASA-9>TQ0W0S,WB2ZII*,WIDE1,WIDE2-1,qAR,WB2ZII-15:`fa&mSW>\`"5!}145.170MHz T114 -060 Voice Alert, DMR & D*_" 

In the above, station KC2ASA-9 (a vehicle) is using the Mic-E compression format to transmit its position which is partially encoded within the first-hop destination callsign (TQ0X4X, TQ0X2T, ... as it moves along). The second hop callsign was probably something like WIDE1-1 which was then substituted by the first-hop digipeater (WB2ZII) as a means of identifying who heard and retransmitted his packet. This goes on with a number of callsign aliases and then you see the qAR inserted by an APRS-IS gateway which basically says this packet came from over-the-air. The callsign following the qAR is the Internet-connected gateway that pushed the data to an APRS-IS data collector.

The stuff that looks like line-noise after the : (which indicates the "data" portion) is more of the compressed position data followed by a message that basically says the driver is currently monitoring (voice) on 145.170 MHz.

The * is significant in the digipeater callsign list as that is the last digipeater to repeat the packet over the air. In this case, WB2ZII was first and last heard before it got sent to APRS-IS by WB2ZII-15. These are different digipeaters (the 1 or 2-digit "SSID" is what distinguishes them -- zero is not shown)

Thank your for this documentation. It is helping me a lot with my own APRS project.

Glad you found it useful.

@n2ygk n2ygk closed this as completed Feb 9, 2019
@MarneeDear
Copy link
Author

Thank you so much. This is very helpful.

73s 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants