For some time now it has become obvious that the original AK1A protocol has
become stretched to beyond breaking point. Some attempts have been made to
extend it, but none have done what is actually required: which is to throw it
away completely and start from scratch.
This is an attempt at starting again.
Each protocol line is separate and distinct. This is a "datagram" style protocol. Each protocol line is called a "sentence" and begins with the string "DX" in upper case, followed by two digits. The sentence is terminated by a <cr> or a <lf> character or both. Internally, the terminating characters should be discarded completely and the sentence processed without.
The character set used shall be ISO-Latin-1, with only the characters 0x20 -> 0x7e permitted within a sentence. All other characters shall be "HTML Escaped" which is that they shall be replaced by the three character scheme of '%', <hex digit>, <hex digit>.
The sentence is split up into <fields> which are delimited by the '|' character (0x7c). If the '|' character occurs within a <field> it shall be replaced by the string '%7C'.
There is no intrinsic maximum length of a sentence. Having said that, there will be some underlying maximum lengths implied by the transport mechanisms employed. Because one of those transport mechanisms is likely to be AX25 in UI mode. It is recommended that broadcast sentences shall be no more than 200 bytes in length.
All sentences shall have a <checksum> in a separate <field> at the end. The checksum is simply the sum, modulo 256, of all the characters of the sentence except for the final <field> separator and the two <hex digits> of the checksum itself. The purpose of the checksum is to check that no intermediate node has changed the sentence. It is assumed that the underlying transport mechanisms will deal with communications errors.
All sentences shall have an <origin>, a <serial> and a <destination> number. The <destination> can be empty which implies that this sentence is to be broadcast. The <serial> number is a global number, which is used for all sentences originating at a node, that is incremented modulo 10000, and is used to determine duplicate or out of date sentences.
So the generic form of a sentence is:-
DX99|<origin>|<serial>|<destination>|...|<cs>
Some examples:-
DX01|GB7TLH|0|GB7DJK|DXSpider 1.48/53.287|DE450A30|F4
DX01|GB7DJK|345|GB7TLH|DXSpider 1.49/60.45|4532DA56|A1
DX11|GB7TLH|1||G1TLH|FR0G|164563|14001.1|Easy|53
DX10|GB7TLH|2||G1TLH|SYSOP|GB7TLH rebooting|4A
DX02|GB7TLH|3|GB7MBC|1|98012349|5D
DX02|GB7MBC|9356|GB7TLH|0|GB7DJK/0.76,GB7BAA/1.2|AE