Compare commits

..

2 commits

Author SHA1 Message Date
Thomas Kolb 778ac7f815 doc: document connectionless frame type
All checks were successful
/ build-hamnet70 (push) Successful in 30s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Successful in 11s
2024-10-25 20:36:34 +02:00
Thomas Kolb 5848d78272 doc: document data frames
All checks were successful
/ build-hamnet70 (push) Successful in 28s
/ build-doc (push) Successful in 18s
/ deploy-doc (push) Successful in 11s
2024-10-25 20:12:01 +02:00

View file

@ -10,7 +10,7 @@ Thomas Kolb DL5TKL
== Introduction
Hamnet70 intends to provide a network system in the 70 cm amateur radio band that can transfer Internet Protocol (IP) packets at a high speed.
https://git.tkolb.de/amateurfunk/hamnet70[Hamnet70] intends to provide a network system in the 70 cm amateur radio band that can transfer Internet Protocol (IP) packets at a high speed.
The protocols defined here are inspired by the Packet Radio network and Bluetooth Low Energy.
The protocols are designed primarily for centralized infrastructure as they were common in the Packet Radio network.
@ -238,6 +238,49 @@ Due to the long possible bursts, this system can achieve high throughput if ther
=== Frame Definitions
==== Data Frame
Data Frames carry all higher-layer data in a connection.
Each Data Frame transfers a single layer-3 packet.
The layer 2 header of Data Frames is filled as follows:
- Message Type: `000` (Data Frame)
- TX Request: `1` if this is the last packet in the burst, `0` otherwise
- Source Address: the transmitters HAM-64 address
- Destination Address: the target stations HAM-64 address
- TX sequence number: as required by Go-Back-N
- RX sequence number: as required by Go-Back-N
To identify how the encoded packet should be handled, the layer 3 protocol is encoded in the first byte of the layer 2 payload.
The full layer 2 payload therefore is composed as follows:
- Layer 3 protocol ID (1 Byte)
- Layer 3 packet data (variable length)
So far, the following protocols are defined and supported:
[cols="2,1,1", options="header"]
.Layer 3 protocol identifiers. EtherType is given as reference.
|===
| Protocol | Hamnet70 ID | EtherType
| IPv6
| `0x00`
| `0x86DD`
| IPv4
| `0x10`
| `0x0800`
| _undefined/auto_
| `0xFF`
| -
3+|_All other values are reserved._
|===
==== Empty Frame
The Empty Frame does not contain any data and therefore only consists of the header and the CRC.
@ -436,8 +479,8 @@ The layer 2 header is filled as follows:
- TX Request: `1` if this is the last packet in the burst, `0` otherwise
- Source Address: the digipeaters HAM-64 address
- Destination Address: the clients HAM-64 address
- TX sequence number: as counted in the connection
- RX sequence number: as counted in the connection
- TX sequence number: as required by Go-Back-N
- RX sequence number: as required by Go-Back-N
The message contains exactly 1 data byte: `0x04` to indicate that this is a Disconnect Request packet.
@ -460,8 +503,8 @@ The layer 2 header is filled as follows:
- TX Request: `0`
- Source Address: the clients HAM-64 address
- Destination Address: the digipeaters HAM-64 address
- TX sequence number: as counted in the connection
- RX sequence number: as counted in the connection
- TX sequence number: as required by Go-Back-N
- RX sequence number: as required by Go-Back-N
The message contains exactly 1 data byte: `0x05` to indicate that this is a Disconnect packet.
@ -471,6 +514,39 @@ The sequence numbers are sent and handled the same way as in regular connection
When the digipeater receives a disconnect packet in the regular packet flow (i.e. no previous packets are lost), it will immediately drop the connection state and not call this client again.
Therefore, if the client wants to ensure that all previous packets are transmitted, it must wait until the digipeater confirms that by sending the corresponding RX sequence number before sending the Disconnect packet.
==== Connectionless Frame
Connectionless Frames are used to transfer packets between unconnected notes.
They can be used to implement custom protocols (similar to APRS, which is implemented on top of AX.25).
The layer 2 header of Connectionless Frames is filled as follows:
- Message Type: `100` (Connectionless Frame)
- TX Request: `1` if this is the last packet in the burst, `0` otherwise
- Source Address: the transmitters HAM-64 address
- Destination Address: the target stations HAM-64 address
- TX sequence number: user-defined
- RX sequence number: user-defined
The sequence numbers can be used in any way that is useful for the custom protocol.
It is required that the first byte of each Connectionless Frame identify the protocol being used.
Protocol numbers are centrally assigned and are listed below.
Some protocol numbers are reserved for experimentation and development and can be self-assigned temporarily.
[cols="1,3", options="header"]
.Connectionless Frame protocol IDs
|===
|Protocol IDs
|Description
|`0x00 .. 0xF7`
|_reserved_
|`0xF8 .. 0xFF`
|Available for experimentation and developmentfootnote:[If you are developing a new protocol, you can freely pick a number from this range. Please check which temporary IDs are already used around your location and pick a free one. When your protocol reaches a sufficiently stable state, please request an official ID assignment].
|===
=== Message Sequence Charts
==== Connection Establishment