UKHAS.net data is transmitted within the 863 - 870 MHz license-exempt frequency band, on a centre frequency of 869.500MHz.
Data is modulated using 2000 baud 2FSK encoding, with a total shift of 24kHz (12kHz above the centre frequency for '1', 12kHz below the centre frequency for '0').
Bytes are transmitted most significant bit first.
The low-level framing format consists of:
- Preamble of at least three bytes of
0xAA
. - Two synchronisation bytes:
0x2D 0xAA
. - A single length byte between 0 and 64 (
0x00
and0x40
). - The number of data bytes as described by the length byte, in the format described in the Layer 3 section below.
- Two checksum bytes, calculated as described below.
No Manchester coding or Data Whitening are used, so the application must ensure sufficient bit transitions in the data to retain synchronisation
Checksum is CRC16 with a polynominal 0x1021
and starting bits 0x1D0F
,
XORd with 0xFFFF
at the end, calculated over the length and data fields.
0xAA, 0xAA, 0xAA, 0x2D, 0xAA, Length, Data, Data, Data, …, CRC16, CRC16
The data bytes of the packet contain only ASCII characters. Packets are structured as follows:
- Time-To-Live counter (TTL). A single-byte ASCII integer which
describes how many times the packet can be repeated.
- A repeater node should decrement this number before repeating the packet.
- If a repeater node receives a packet with a TTL of 0, it must not be repeated.
- Nodes broadcasting their own packets are recommended to initially set this counter to 3.
- Sequence Counter. A single lowercase character between
a
andz
.- On startup, a node should transmit a packet with a sequence counter
of
a
. - Subsequent packets should transmit sequential sequence counters
(
b
,c
,d
, ...), wrapping round fromz
tob
. The sequence countera
should only be transmitted on node startup.
- On startup, a node should transmit a packet with a sequence counter
of
- A number of Fields, which, which the exception of the special comment field, consist of a single uppercase letter, followed by a comma-separated list of values. For more information see the list of fields. The data section is variable in length.
- The Path, enclosed within
[
and]
:- When broadcasting a new packet, the node should include its node
ID in the Path (e.g.
[NODEID]
). - When repeating a packet, the repeater node should append a comma,
followed by its node ID to the Path (e.g.
[NODEID,REPEATERID]
).
- When broadcasting a new packet, the node should include its node
ID in the Path (e.g.
The canonical specification of the packet format can be found in the formal grammar.
### Example Packet
2iL51.498,-0.0527T21R0[AB,AA]
Node IDs consist of up to 16 upppercase letters.
When assigning a new Node ID, check that the ID is not already taken on the node list.
A node configured as a repeater should rebroadcast packets it receives. When doing so it must follow these rules:
- If the Time-to-Live counter is 0, do not repeat.
- If the repeater's node ID already exists in the Path, do not repeat.
- If
<packet length> + <repeater node ID length> + 1 > 64
, do not repeat. - Append a comma and the repeater's node ID to the Path.
- Wait for a random interval between 0 and 1000ms, specific to the repeater node, to avoid collisions.
- Broadcast the packet.
A node configured as a gateway should submit all packets it receives to the UKHAS.net server using the packet submission protocol.