update stale documentation in config files; update yaml schema json file for talkgroup_rules; add documentation files for deep descriptions of talkgroup rules and lookup files; update documentation files;
parent
5eaf8c1f84
commit
7a2eca9ca7
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,753 @@
|
||||
# Digital Voice Modem
|
||||
|
||||
## Technical Note
|
||||
### Modem Protocol
|
||||
|
||||
Document Identifier: TN.1001
|
||||
|
||||
Author: Bryan Biedenkapp, N2PLL
|
||||
|
||||
Editors: Bryan Biedenkapp, N2PLL
|
||||
|
||||
Contributors: N/A
|
||||
|
||||
Abstract: Describes high-level concepts and procedures for the Modem Protocol.
|
||||
|
||||
Status: Draft
|
||||
|
||||
## 1. Introduction
|
||||
This document describes, in high-level, the general concepts and procedures for the Modem Protocol used by DVM projects.
|
||||
|
||||
## 2. Technical Note
|
||||
|
||||
### 2.1 Definitions
|
||||
- DVM: Digital Voice Modem
|
||||
|
||||
### 2.2 General Concept
|
||||
The DVM Modem Protocol defines a common and standard communications protocol between a host application and a dedicated modem hardware device (usually based around a STM32F446 or similar).
|
||||
|
||||
The core purpose of the protocol is to provide a common serial communications between the host application and the dedicated modem hardware.
|
||||
|
||||
### 2.3 Modem Packet Framing
|
||||
The modem protocol implements a very simplistic framing mechanism for transmitting data between the host and modem (and vice versa).
|
||||
|
||||
| Frame Type | Opcode | Description |
|
||||
| --- | --- | --- |
|
||||
| Short | $FE | This frame type uses a one-byte total-length field and therefore carries frames up to 255 bytes, including the three-byte frame header. |
|
||||
| Long | $FD | This frame type uses a two-byte big-endian total-length field for frames that do not fit the short form. |
|
||||
|
||||
#### Modem Packet - Short Frame
|
||||
```text
|
||||
Byte 0 1 2 3
|
||||
Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Frame Type | Length | Opcode | ... |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| <Variable Length Data> |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
3-byte header (frame type, total length, and opcode)
|
||||
```
|
||||
|
||||
#### Modem Packet - Long Frame
|
||||
```text
|
||||
Byte 0 1 2 3
|
||||
Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Frame Type | Length | Opcode |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| <Variable Length Data> |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
4-byte header (frame type, two-byte total length, and opcode)
|
||||
```
|
||||
|
||||
It is important to note the Length parameter of the packet buffer should be the length of the **entire** packet not just the payload.
|
||||
|
||||
#### 2.3.1 Modem Opcodes
|
||||
The opcode defines which operation/command being transmitted.
|
||||
|
||||
| Function Name | Opcode | Description |
|
||||
| --- | --- | --- |
|
||||
| Get Version | $00 | This function is used for retrieving the firmware version from the modem. |
|
||||
| Get Status | $01 | This function is used for retrieving the current status from the modem. |
|
||||
| Set Configuration | $02 | This function is used for setting configuration parameters to the modem. |
|
||||
| Set Mode | $03 | This function is used for setting the operational mode parameter to the modem. |
|
||||
| Set Symbol Level Adjustment | $04 | This function is used for setting the symbol level adjustment parameters to the modem. |
|
||||
| Set Rx Level Adjustment | $05 | This function is used for setting the receive level adjustment parameter to the modem. |
|
||||
| Set RF Parameters | $06 | This function is used for setting the RF parameters to the modem. (Hotspot Only) |
|
||||
| Calibration Data | $08 | This function is used for setting calibration data to the modem when operating in a calibration mode. |
|
||||
| RSSI Data | $09 | This function is used for receiving RSSI data from the modem. |
|
||||
| Send CW ID | $0A | This function is used to cause the modem to emit a CWID burst of morse code. |
|
||||
| Set FIFO Buffers | $0F | This function is used for setting the internal FIFO ringbuffer sizes on the modem. |
|
||||
| DMR Slot 1 Data | $18 | This function is used for sending/receiving DMR Slot 1 protocol data to/from the modem. |
|
||||
| DMR Slot 1 Lost | $19 | This function is used for signalling loss of synchronization for DMR Slot 1 protocol data. |
|
||||
| DMR Slot 2 Data | $1A | This function is used for sending/receiving DMR Slot 2 protocol data to/from the modem. |
|
||||
| DMR Slot 2 Lost | $1B | This function is used for signalling loss of synchronization for DMR Slot 2 protocol data. |
|
||||
| DMR Short LC | $1C | This function is used for sending/receiving DMR Short LC protocol data to/from the modem. |
|
||||
| DMR Start | $1D | This function is used for providing transmitter control and starting the DMR data stream. |
|
||||
| DMR Abort | $1E | |
|
||||
| DMR CACH AT Control | $1F | This function is used for setting the DMR CACH AT bit on or off. |
|
||||
| DMR Slot 1 Clear | $20 | This function is used for commanding the modem to clear the DMR Slot 1 FIFO buffers. |
|
||||
| DMR Slot 2 Clear | $21 | This function is used for commanding the modem to clear the DMR Slot 2 FIFO buffers. |
|
||||
| Project 25 Data | $31 | This function is used for sending/receiving Project 25 protocol data to/from the modem. |
|
||||
| Project 25 Lost | $32 | This function is used for signalling loss of synchronization for Project 25 protocol data. |
|
||||
| Project 25 Clear | $33 | This function is used for commanding the modem to clear the Project 25 FIFO buffers. |
|
||||
| Project 25 Phase 2 Slot 1 Data | $34 | This host-side function is used for sending/receiving Project 25 Phase 2 Slot 1 protocol data. It is not implemented by the current air-interface modem firmware. |
|
||||
| Project 25 Phase 2 Slot 1 Lost | $35 | This host-side function signals loss of synchronization for Project 25 Phase 2 Slot 1 data. |
|
||||
| Project 25 Phase 2 Slot 2 Data | $36 | This host-side function is used for sending/receiving Project 25 Phase 2 Slot 2 protocol data. It is not implemented by the current air-interface modem firmware. |
|
||||
| Project 25 Phase 2 Slot 2 Lost | $37 | This host-side function signals loss of synchronization for Project 25 Phase 2 Slot 2 data. |
|
||||
| Project 25 Phase 2 Slot 1 Clear | $38 | This host-side function clears the Project 25 Phase 2 Slot 1 FIFO. |
|
||||
| Project 25 Phase 2 Slot 2 Clear | $39 | This host-side function clears the Project 25 Phase 2 Slot 2 FIFO. |
|
||||
| NXDN Data | $41 | This function is used for sending/receiving NXDN protocol data to/from the modem. |
|
||||
| NXDN Lost | $42 | This function is used for signalling loss of synchronization for NXDN protocol data. |
|
||||
| NXDN Clear | $43 | This function is used for commanding the modem to clear the NXDN FIFO buffers. |
|
||||
| Ack | $70 | This function is used for acknowledging a command. |
|
||||
| Nack | $7F | This function is used for negative acknowledgment of a command. |
|
||||
| Flash Read | $E0 | This function is used for reading 256 bytes of data from the flash storage partition of the modem. (Only on supported hardware.) |
|
||||
| Flash Write | $E1 | This function is used for writing 256 bytes of data to the flash storage partition of the modem. (Only on supported hardware.) |
|
||||
| Reboot MCU | $EA | This function is used for triggering a reboot of the modem MCU. |
|
||||
| Debug 1 | $F1 | This function is used for receiving debug data from the modem. (1 byte) |
|
||||
| Debug 2 | $F2 | This function is used for receiving debug data from the modem. (2 byte) |
|
||||
| Debug 3 | $F3 | This function is used for receiving debug data from the modem. (3 byte) |
|
||||
| Debug 4 | $F4 | This function is used for receiving debug data from the modem. (4 byte) |
|
||||
| Debug 5 | $F5 | This function is used for receiving debug data from the modem. (5 byte) |
|
||||
| Debug Dump | $FA | This function is used for receiving a variable-length debug byte dump from the modem. |
|
||||
|
||||
#### 2.3.2 Modem Operational States
|
||||
The operational state defines which mode/state the modem is currently in.
|
||||
|
||||
| State Name | State | Description |
|
||||
| --- | --- | --- |
|
||||
| IDLE | 0 | This is the default state for a modem, the modem is not in any active mode in this state. |
|
||||
| DMR | 1 | When in this mode the modem is actively Rx/Tx DMR protocol data. |
|
||||
| Project 25 | 2 | When in this mode the modem is actively Rx/Tx Project 25 protocol data. |
|
||||
| NXDN | 3 | When in this mode the modem is actively Rx/Tx NXDN protocol data. |
|
||||
| CW | 10 | When in this mode the modem is actively Tx CWID morse data. |
|
||||
| Project 25 Calibration 1K | 92 | |
|
||||
| DMR DMO Calibration 1K | 93 | |
|
||||
| DMR Calibration 1K | 94 | |
|
||||
| DMR Low Frequency Calibration | 95 | |
|
||||
| RSSI Calibration | 96 | |
|
||||
| Project 25 Calibration | 97 | |
|
||||
| DMR Calibration | 98 | |
|
||||
| NXDN Calibration | 99 | |
|
||||
|
||||
#### 2.3.3 Negative Acknowledgement Reasons
|
||||
This table defines the reasons a negative acknowledgement may be sent.
|
||||
|
||||
| Reason Name | Reason Code | Description |
|
||||
| --- | --- | --- |
|
||||
| OK | 0 | |
|
||||
| NAK | 1 | General Failure. |
|
||||
| Illegal Length | 2 | Packet received was of an illegal length, and was discarded by the modem. |
|
||||
| Invalid Request | 4 | Packet received was an invalid request, and was discarded by the modem. |
|
||||
| Ringbuffer Full | 8 | Sent when a command attempts to write to a FIFO buffer that is full. |
|
||||
| Invalid FDMA Preamble | 10 | Sent by the Set Configuration command typically, to indicate the FDMA preamble value was out of range. |
|
||||
| Invalid Mode | 11 | Sent by either Set Configuration or Set Mode command to indicate a mode was specified that is invalid. |
|
||||
| Invalid DMR Color Code | 12 | Sent by the Set Configuration command typically, if the DMR color code is out of range. |
|
||||
| Invalid DMR Slot | 13 | Sent by the modem to indicate the DMR slot value was out of range. |
|
||||
| Invalid DMR Start | 14 | |
|
||||
| Invalid DMR Rx Delay | 15 | Sent by the modem to indicate the DMR Rx Delay value was out of range. |
|
||||
| Invalid P25 Correlation Count | 16 | Sent by the modem to indicate the P25 Correlation Count value was out of range. |
|
||||
| No Internal Flash | 20 | Sent by the modem when the hardware does not support the Flash Read or Flash Write operations. |
|
||||
| Flash Erase Failed | 21 | Sent by the modem when the configuration partition of the flash was unable to be erased. |
|
||||
| Flash Write Failed | 22 | Sent by the modem when the configuration partition of the flash was unable to be written. |
|
||||
| Flash Write Too Big | 23 | Sent by the modem when the data sent to be written to the configuration partition of the flash was too large to be written. |
|
||||
| DMR Disabled | 63 | Sent by the modem to indicate DMR operations are disabled. |
|
||||
| P25 Disabled | 64 | Sent by the modem to indicate P25 operations are disabled. |
|
||||
| NXDN Disabled | 65 | Sent by the modem to indicate NXDN operations are disabled. |
|
||||
|
||||
### 2.4 General Opcode Specifications
|
||||
|
||||
#### 2.4.1 Get Version
|
||||
This opcode is utilized to retreive the hardcoded (at compile time) version string from the firmware.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 3 | Length |
|
||||
| Get Version Opcode | 1 | |
|
||||
|
||||
Upon reception, the modem shall transmit in response:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 3 | Length |
|
||||
| Get Version Opcode | 1 | $00 |
|
||||
| Protocol Version | 1 | |
|
||||
| CPU Type | 1 | |
|
||||
| CPU UDID | 16 | Universal Device Identifier |
|
||||
| Baked Firmware Version String | 83 | |
|
||||
|
||||
#### 2.4.2 Get Status
|
||||
This opcode is utilized to retreive the various interesting operational runtime values from the modem.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 3 | Length |
|
||||
| Get Status Opcode | 1 | $01 |
|
||||
|
||||
Upon reception, the modem shall transmit in response:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 3 | Length |
|
||||
| Get Status Opcode | 1 | $01 |
|
||||
| Protocol Enablement Flags | 1 | This byte contains flags that indicate which digital protocol is enabled on the modem. |
|
||||
| Modem State | 1 | Current operational state. |
|
||||
| Operation Flags | 1 | This byte contains various operation flags. |
|
||||
| Reserved | 1 | |
|
||||
| DMR Slot 1 FIFO Space | 1 | This byte contains the FIFO space available in DMR frames. |
|
||||
| DMR Slot 2 FIFO Space | 1 | This byte contains the FIFO space available in DMR frames. |
|
||||
| Reserved | 1 | |
|
||||
| Project 25 FIFO Space | 1 | This byte contains the FIFO space available in P25 LDU frames. |
|
||||
| NXDN FIFO Space | 1 | This byte contains the FIFO space available in NXDN frames. |
|
||||
|
||||
#### 2.4.3 Set Configuration
|
||||
This opcode is utilized to set the general configuration of the modem.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 24 | Length |
|
||||
| Set Configuration Opcode | 1 | $02 |
|
||||
| Flags 1 Byte | 1 | This flags byte represents various states (see below). |
|
||||
| Flags 2 Byte | 1 | This flags byte represents various states (see below). |
|
||||
| FDMA Preamble Length | 1 | |
|
||||
| Initial Mode | 1 | This sets the initial mode of the modem, the mode can be changed with Set Mode at any time. |
|
||||
| Rx Level | 1 | |
|
||||
| CW ID Tx Level | 1 | |
|
||||
| DMR Color Code | 1 | |
|
||||
| DMR Rx Delay | 1 | |
|
||||
| P25 NAC | 2 | |
|
||||
| DMR Tx Level | 1 | |
|
||||
| P25 Correlation Count | 1 | |
|
||||
| P25 Tx Level | 1 | |
|
||||
| Tx DC Offset | 1 | |
|
||||
| Rx DC Offset | 1 | |
|
||||
| NXDN Tx Level | 1 | |
|
||||
| Rx Coarse Softpot Setting | 1 | This currently only applies to DVMV1 modems. |
|
||||
| Rx Fine Softpot Setting | 1 | This currently only applies to DVMV1 modems. |
|
||||
| Tx Coarse Softpot Setting | 1 | This currently only applies to DVMV1 modems. |
|
||||
| Tx Fine Softpot Setting | 1 | This currently only applies to DVMV1 modems. |
|
||||
| RSSI Coarse Softpot Setting | 1 | This currently only applies to DVMV1 modems. |
|
||||
| RSSI Fine Softpot Setting | 1 | This currently only applies to DVMV1 modems. |
|
||||
|
||||
#### Flags 1 Byte
|
||||
| Name | Flag Bit | Description |
|
||||
| --- | --- | --- |
|
||||
| Rx Invert | $01 | |
|
||||
| Tx Invert | $02 | |
|
||||
| PTT Invert | $04 | |
|
||||
| Modem Debug | $10 | |
|
||||
| Simplex Operation | $80 | |
|
||||
|
||||
#### Flags 2 Byte
|
||||
| Name | Flag Bit | Description |
|
||||
| --- | --- | --- |
|
||||
| DC Blocker | $01 | |
|
||||
| COS Lockout | $04 | |
|
||||
| DMR Enabled | $02 | |
|
||||
| P25 Enabled | $08 | |
|
||||
| NXDN Enabled | $10 | |
|
||||
|
||||
Upon reception, the modem shall perform whatever operations necessary to transition to the requested mode and transmit a ACK or NACK in response.
|
||||
|
||||
If the operation fails the modem shall:
|
||||
|
||||
- Respond with a NACK and the "Illegal Length" if packet from the host is improperly sized.
|
||||
- Respond with a NACK and the "Invalid FDMA Preamble" if the FDMA preamble parameter is out of range.
|
||||
- Respond with a NACK and the "Invalid DMR Color Code" if the DMR color code is out of range.
|
||||
- Respond with a NACK and the "Invalid DMR Rx Delay" if the DMR receive delay is out of range.
|
||||
- Respond with a NACK and the "Invalid P25 Correlation Count" if the P25 correlation count is out of range.
|
||||
|
||||
#### 2.4.4 Set Mode
|
||||
This opcode is utilized to set the operational mode of the modem.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 4 | Length |
|
||||
| Set Mode Opcode | 1 | $03 |
|
||||
| Operational Mode | 1 | $00 |
|
||||
|
||||
Upon reception, the modem shall perform whatever operations necessary to transition to the requested mode and transmit a ACK or NACK in response.
|
||||
|
||||
#### 2.4.5 Set Symbol Level Adjustment
|
||||
This opcode is utilized to set the symbol level adjustments on the modem.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 9 | Length |
|
||||
| Set Symbol Level Adjustment Opcode | 1 | $04 |
|
||||
| DMR +3/-3 Symbol Level Adjustment | 1 | This is a unsigned value of 0 to 255 representing an adjustment of -128 to 128. |
|
||||
| DMR +1/-1 Symbol Level Adjustment | 1 | This is a unsigned value of 0 to 255 representing an adjustment of -128 to 128. |
|
||||
| P25 +3/-3 Symbol Level Adjustment | 1 | This is a unsigned value of 0 to 255 representing an adjustment of -128 to 128. |
|
||||
| P25 +1/-1 Symbol Level Adjustment | 1 | This is a unsigned value of 0 to 255 representing an adjustment of -128 to 128. |
|
||||
| NXDN +3/-3 Symbol Level Adjustment | 1 | This is a unsigned value of 0 to 255 representing an adjustment of -128 to 128. |
|
||||
| NXDN +1/-1 Symbol Level Adjustment | 1 | This is a unsigned value of 0 to 255 representing an adjustment of -128 to 128. |
|
||||
|
||||
Upon reception, the modem shall perform whatever operations necessary to set the Rx level and transmit a ACK or NACK in response.
|
||||
|
||||
If the operation fails the modem shall:
|
||||
|
||||
- Respond with a NACK and the "Illegal Length" if packet from the host is improperly sized.
|
||||
- Respond with a NACK and the "Invalid Request" if parameters are out of range.
|
||||
|
||||
#### 2.4.6 Set Rx Level Adjustment
|
||||
This opcode is utilized to set the Rx level on the modem.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 4 | Length |
|
||||
| Set Rx Level Opcode | 1 | $05 |
|
||||
| Rx Level | 1 | |
|
||||
|
||||
Upon reception, the modem shall perform whatever operations necessary to set the Rx level and transmit a ACK or NACK in response.
|
||||
|
||||
If the operation fails the modem shall:
|
||||
|
||||
- Respond with a NACK and the "Illegal Length" if packet from the host is improperly sized.
|
||||
|
||||
#### 2.4.7 Set RF Parameters (Hotspot Only)
|
||||
This opcode is utilized to set the RF parameters for a hotspot modem.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 18 or 22 | Length of 18 does not set AFC parameters, length of 22 sets AFC parameters. |
|
||||
| Set RF Parameters Opcode | 1 | $06 |
|
||||
| Rx Frequency (in Hz) | 4 | |
|
||||
| Tx Frequency (in Hz) | 4 | |
|
||||
| Tx Power (value from 0 to 255) | 1 | |
|
||||
| DMR Discriminator Bandwidth Adjustment | 1 | This is a unsigned value of 0 to 255 representing an adjustment of -128 to 128. |
|
||||
| P25 Discriminator Bandwidth Adjustment | 1 | This is a unsigned value of 0 to 255 representing an adjustment of -128 to 128. |
|
||||
| DMR Post Demodulation Bandwidth Adjustment | 1 | This is a unsigned value of 0 to 255 representing an adjustment of -128 to 128. |
|
||||
| P25 Post Demodulation Bandwidth Adjustment | 1 | This is a unsigned value of 0 to 255 representing an adjustment of -128 to 128. |
|
||||
| AFC Gain Mode | 1 | This represents the AFC gain mode: 0 = Auto, 1 = Auto (Linear), 2 = Low, 3 = High. |
|
||||
| NXDN Discriminator Bandwidth Adjustment | 1 | This is a unsigned value of 0 to 255 representing an adjustment of -128 to 128. |
|
||||
| NXDN Post Demodulation Bandwidth Adjustment | 1 | This is a unsigned value of 0 to 255 representing an adjustment of -128 to 128. |
|
||||
| AFC Enable, KI and KP | 1 | This value represents whether or not AFC is enabled ($80 bit), the AFC KI (lower 4 bits), the AFC KP (upper 4 bits). |
|
||||
| AFC Range | 1 | |
|
||||
|
||||
Upon reception, the modem shall perform whatever operations necessary to set the RF parameters and transmit a ACK or NACK in response.
|
||||
|
||||
If the operation fails the modem shall:
|
||||
|
||||
- Respond with a NACK and the "Illegal Length" if packet from the host is improperly sized.
|
||||
- Respond with a NACK and the "Invalid Request" if parameters are out of range.
|
||||
|
||||
#### 2.4.8 Calibration Data
|
||||
This opcode is bidirectional. The host uses it to start or stop transmission of the test pattern selected by the modem's current calibration state. A modem may also use it to report sampled calibration levels to the host.
|
||||
|
||||
The host shall transmit:
|
||||
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | `$FE` |
|
||||
| Length | 1 | `4`, including the complete frame |
|
||||
| Calibration Data Opcode | 1 | `$08` |
|
||||
| Transmit | 1 | `1` starts the selected calibration transmission; any other value stops it |
|
||||
|
||||
The command is valid only while the modem is in a DMR, P25, or NXDN calibration state. The selected calibration implementation requires exactly one payload byte. The modem responds with ACK when the command is accepted. It responds with NAK and `Illegal Length` when the payload length is not one byte or the command cannot be handled by the current calibration state.
|
||||
|
||||
The standard level-report payload consumed by the setup host is:
|
||||
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | `$FE` |
|
||||
| Length | 1 | `8`, including the complete frame |
|
||||
| Calibration Data Opcode | 1 | `$08` |
|
||||
| Inverted | 1 | `0x80` indicates an inverted signal; other values indicate non-inverted |
|
||||
| Maximum Sample | 2 | Unsigned 16-bit maximum sample, most-significant byte first |
|
||||
| Minimum Sample | 2 | Unsigned 16-bit minimum sample, most-significant byte first |
|
||||
|
||||
The host derives the peak-to-peak difference as `maximum - minimum` and the center value as `(maximum + minimum) / 2`. Calibration telemetry is informational and is not acknowledged by the host.
|
||||
|
||||
#### 2.4.9 RSSI Data
|
||||
This modem-to-host opcode reports received signal-strength samples while the modem is in the RSSI calibration state (`STATE_RSSI_CAL`). It is telemetry rather than a request and is not acknowledged by the host.
|
||||
|
||||
The modem shall transmit:
|
||||
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | `$FE` |
|
||||
| Length | 1 | `9`, including the complete frame |
|
||||
| RSSI Data Opcode | 1 | `$09` |
|
||||
| Maximum RSSI Sample | 2 | Unsigned 16-bit maximum sample, most-significant byte first |
|
||||
| Minimum RSSI Sample | 2 | Unsigned 16-bit minimum sample, most-significant byte first |
|
||||
| Average RSSI Sample | 2 | Unsigned 16-bit arithmetic mean, most-significant byte first |
|
||||
|
||||
The air-interface firmware accumulates 24,000 samples per report. Hotspot firmware samples the hardware RSSI value periodically and reports the maximum, minimum, and average after six readings. The values are raw modem samples; conversion to calibrated power units is hardware-specific.
|
||||
|
||||
The firmware suppresses this frame outside RSSI calibration mode. Its serial helper rejects a payload that would exceed the implementation's short-frame buffer with NAK and `Illegal Length`; the standard payload is always six bytes.
|
||||
|
||||
#### 2.4.10 Send CWID
|
||||
This opcode is utilized to transmit a CW ID morse message from the modem.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 4 or More | Length, the length is typically 3 + the length of the CWID to send. |
|
||||
| Send CWID Opcode | 1 | $0A |
|
||||
| ... | ... | ... |
|
||||
| CWID Letters | 1 | |
|
||||
| ... | ... | ... |
|
||||
|
||||
Upon reception, the modem shall perform whatever operations necessary to transmit a CWID with the given letters and transmit a ACK or NACK in response.
|
||||
|
||||
If the operation fails the modem shall:
|
||||
|
||||
- Respond with a NACK and the "Illegal Length" if packet from the host is improperly sized.
|
||||
|
||||
#### 2.4.11 Set FIFO Buffers
|
||||
This opcode is utilized to set the size of the FIFO buffers on the modem.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 6 | Length |
|
||||
| Set FIFO Buffers Opcode | 1 | $0F |
|
||||
| DMR Buffer Size | 2 | This is a unsigned 16-bit value representing the FIFO buffer size. |
|
||||
| P25 Buffer Size | 2 | This is a unsigned 16-bit value representing the FIFO buffer size. |
|
||||
| NXDN Buffer Size | 2 | This is a unsigned 16-bit value representing the FIFO buffer size. |
|
||||
|
||||
Upon reception, the modem shall perform whatever operations necessary to resize the FIFO buffers and transmit a ACK or NACK in response.
|
||||
|
||||
If the operation fails the modem shall:
|
||||
|
||||
- Respond with a NACK and the "Illegal Length" if packet from the host is improperly sized.
|
||||
- Respond with a NACK and the "Invalid Mode" if buffers are attempted to be resized while not in an IDLE state.
|
||||
|
||||
#### 2.4.12 Acknowledgement
|
||||
This opcode is utilized by the modem to notify the host of a positive acknowledgement of a command.
|
||||
|
||||
The modem shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 4 | Length |
|
||||
| Ack Opcode | 1 | $70 |
|
||||
| Opcode Being Acknowledged | 1 | $00 |
|
||||
|
||||
#### 2.4.13 Negative Acknowledgement
|
||||
This opcode is utilized by the modem to notify the host of a negative acknowledgement of a command.
|
||||
|
||||
The modem shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 5 | Length |
|
||||
| Nack Opcode | 1 | $7F |
|
||||
| Opcode Being Acknowledged | 1 | $00 |
|
||||
| NACK Reason Code | 1 | $00 |
|
||||
|
||||
#### 2.4.14 Flash Read
|
||||
This opcode is utilized to read data from the modem's configuration partition on the flash.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 3 | Length |
|
||||
| Flash Read Opcode | 1 | $E0 |
|
||||
|
||||
The modem shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 249 | Length |
|
||||
| Flash Read Opcode | 1 | $E0 |
|
||||
| Variable Length Data | 249 | ... |
|
||||
|
||||
#### 2.4.15 Flash Write
|
||||
This opcode is utilized to write data from the modem's configuration partition on the flash.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 254 | Length |
|
||||
| Flash Write Opcode | 1 | $E1 |
|
||||
| Flash Data | <Variable> | ... |
|
||||
|
||||
Upon reception, the modem shall perform whatever operations necessary to write data to the flash and transmit a ACK or NACK in response.
|
||||
|
||||
If the flash operation fails the modem shall:
|
||||
|
||||
- Respond with a NACK and the "Flash Write Too Big" if more then 254 bytes are attempted to be written.
|
||||
- Respond with a NACK and the "Flash Write Failed" if a write error occurs.
|
||||
|
||||
#### 2.4.16 Reset MCU
|
||||
This opcode is utilized to reboot the MCU of the modem.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 3 | Length |
|
||||
| Reset MCU Opcode | 1 | $EA |
|
||||
|
||||
Upon reception of this opcode the modem should immediately issue a MCU restart. No response back from the modem shall be expected.
|
||||
|
||||
### 2.5 DMR Opcode Specifications
|
||||
|
||||
#### 2.5.1 Slot 1 Data
|
||||
This opcode is utilized by both the host and modem to transmit DMR Slot 1 frame data.
|
||||
|
||||
The host or modem shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 36 | Length |
|
||||
| DMR Slot 1 Data Opcode | 1 | $18 |
|
||||
| ... | ... | ... |
|
||||
| Frame Data | <Variable> | |
|
||||
| ... | ... | ... |
|
||||
|
||||
Upon reception, the host or modem shall perform whatever operations necessary to handle frame data.
|
||||
|
||||
If data is being transmitted to the modem, upon reception, the modem shall perform whatever operations necessary to handle the frame data for transmission and transmit a ACK or NACK in response.
|
||||
|
||||
If the write data operation fails the modem shall:
|
||||
|
||||
- Respond with a NACK and the "Illegal Length" if the frame data is not the standard DMR frame length 33 bytes.
|
||||
- Respond with a NACK and the "Ringbuffer Full" if the DMR FIFO buffer is full.
|
||||
|
||||
#### 2.5.2 Slot 1 Lost
|
||||
This opcode is utilized to notify the host the current transmission synchronization was lost.
|
||||
|
||||
The modem shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 3 | Length |
|
||||
| DMR Sot 1 Lost Opcode | 1 | $19 |
|
||||
|
||||
Upon reception, the host shall perform whatever operations necessary to handle a transmission loss event.
|
||||
|
||||
#### 2.5.3 Slot 2 Data
|
||||
This opcode is utilized by both the host and modem to transmit DMR Slot 2 or DMR DMO frame data.
|
||||
|
||||
The host or modem shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 36 | Length |
|
||||
| DMR Slot 2 Data Opcode | 1 | $1A |
|
||||
| ... | ... | ... |
|
||||
| Frame Data | <Variable> | |
|
||||
| ... | ... | ... |
|
||||
|
||||
Upon reception, the host or modem shall perform whatever operations necessary to handle frame data.
|
||||
|
||||
If data is being transmitted to the modem, upon reception, the modem shall perform whatever operations necessary to handle the frame data for transmission and transmit a ACK or NACK in response.
|
||||
|
||||
If the write data operation fails the modem shall:
|
||||
|
||||
- Respond with a NACK and the "Illegal Length" if the frame data is not the standard DMR frame length 33 bytes.
|
||||
- Respond with a NACK and the "Ringbuffer Full" if the DMR FIFO buffer is full.
|
||||
|
||||
#### 2.5.4 Slot 2 Lost
|
||||
This opcode is utilized to notify the host the current transmission synchronization was lost.
|
||||
|
||||
The modem shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 3 | Length |
|
||||
| DMR Sot 1 Lost Opcode | 1 | $1B |
|
||||
|
||||
Upon reception, the host shall perform whatever operations necessary to handle a transmission loss event.
|
||||
|
||||
#### 2.5.5 Short LC
|
||||
This host-to-modem opcode installs the DMR Short Link Control data that the duplex transmitter inserts into the CACH. It is supported only by a duplex-capable DMR transmitter.
|
||||
|
||||
The host shall transmit:
|
||||
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | `$FE` |
|
||||
| Length | 1 | `12`, including the complete frame |
|
||||
| DMR Short LC Opcode | 1 | `$1C` |
|
||||
| Encoded Short LC | 9 | 68 significant bits of encoded Short LC data; the four unused bits in the final byte are ignored |
|
||||
|
||||
The modem requires exactly nine payload bytes. It interleaves the first 68 bits into its internal 12-byte CACH Short LC buffer using the modem CACH interleave table.
|
||||
|
||||
On success, the current firmware stores the new Short LC without sending an ACK. On failure it sends NAK with `Illegal Length`. Hotspot firmware built without duplex support sends NAK with `Invalid Request`.
|
||||
|
||||
#### 2.5.6 Start
|
||||
This host-to-modem opcode explicitly starts or stops duplex DMR transmission. It does not select DMR mode; the modem must already have DMR enabled and be in the DMR state.
|
||||
|
||||
The host shall transmit:
|
||||
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | `$FE` |
|
||||
| Length | 1 | `4`, including the complete frame |
|
||||
| DMR Start Opcode | 1 | `$1D` |
|
||||
| Transmit | 1 | `1` starts transmission; `0` stops transmission |
|
||||
|
||||
Starting sets the duplex transmitter state to Slot 1. Starting or stopping also resets the frame and abort counters. The host implementation avoids sending redundant start or stop commands when its tracked transmit state already matches the request.
|
||||
|
||||
On success, the current firmware changes state without sending an ACK. An invalid length, a value other than `0` or `1`, or use outside the DMR state produces NAK with `Invalid DMR Start`. Hotspot firmware built without duplex support produces NAK with `Invalid Request`.
|
||||
|
||||
#### 2.5.7 Abort
|
||||
This host-to-modem opcode requests that the duplex DMR transmitter abort queued transmission for one TDMA slot.
|
||||
|
||||
The host shall transmit:
|
||||
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | `$FE` |
|
||||
| Length | 1 | `4`, including the complete frame |
|
||||
| DMR Abort Opcode | 1 | `$1E` |
|
||||
| DMR Slot | 1 | `1` aborts Slot 1; `2` aborts Slot 2 |
|
||||
|
||||
For a valid slot, the modem sets that slot's abort flag and resets its abort counter. The transmitter consumes the request as part of its normal slot-processing state machine.
|
||||
|
||||
On success, the current firmware accepts the request without sending an ACK. A payload length other than one byte produces NAK with `Illegal Length`; a slot other than `1` or `2` produces NAK with `Invalid DMR Slot`. Hotspot firmware built without duplex support produces NAK with `Invalid Request`.
|
||||
|
||||
#### 2.5.8 CACH AT Control
|
||||
This opcode is utilized to set the CACH AT bit for the specified slot.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 4 | Length |
|
||||
| DMR CACH AT Control Opcode | 1 | $1F |
|
||||
| DMR Slot | 1 | DMR Slot to set the CACH AT bit for. |
|
||||
|
||||
Upon reception, the modem shall perform whatever operations necessary to set the CACH AT bit for the specified slot.
|
||||
|
||||
#### 2.5.9 Slot 1 Clear
|
||||
This opcode is utilized to clear the FIFO buffer for DMR Slot 1.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 3 | Length |
|
||||
| DMR Slot 2 Clear Opcode | 1 | $20 |
|
||||
|
||||
Upon reception, the modem shall perform whatever operations necessary to clear the FIFO buffers.
|
||||
|
||||
#### 2.5.10 Slot 2 Clear
|
||||
This opcode is utilized to clear the FIFO buffer for DMR Slot 2.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 3 | Length |
|
||||
| DMR Slot 2 Clear Opcode | 1 | $21 |
|
||||
|
||||
Upon reception, the modem shall perform whatever operations necessary to clear the FIFO buffers.
|
||||
|
||||
### 2.6 P25 Opcode Specifications
|
||||
|
||||
#### 2.6.1 Data
|
||||
This opcode is utilized by both the host and modem to transmit P25 frame data.
|
||||
|
||||
The host or modem shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 21 or greater | Length, P25 data frames are variable length, the minimum data frame is a TDU data frame which has a modem packet length of 21 bytes. |
|
||||
| P25 Data Opcode | 1 | $31 |
|
||||
| ... | ... | ... |
|
||||
| Frame Data | <Variable> | |
|
||||
| ... | ... | ... |
|
||||
|
||||
Upon reception, the host or modem shall perform whatever operations necessary to handle frame data.
|
||||
|
||||
If data is being transmitted to the modem, upon reception, the modem shall perform whatever operations necessary to handle the frame data for transmission and transmit a ACK or NACK in response.
|
||||
|
||||
If the write data operation fails the modem shall:
|
||||
|
||||
- Respond with a NACK and the "Illegal Length" if the frame data is less then a standard P25 TDU frame length 18 bytes.
|
||||
- Respond with a NACK and the "Ringbuffer Full" if the P25 FIFO buffer is full.
|
||||
|
||||
#### 2.6.2 Lost
|
||||
This opcode is utilized to notify the host the current transmission synchronization was lost.
|
||||
|
||||
The modem shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 3 | Length |
|
||||
| P25 Lost Opcode | 1 | $32 |
|
||||
|
||||
Upon reception, the host shall perform whatever operations necessary to handle a transmission loss event.
|
||||
|
||||
#### 2.6.3 Clear
|
||||
This opcode is utilized to clear the FIFO buffer for P25.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 3 | Length |
|
||||
| P25 Clear Opcode | 1 | $33 |
|
||||
|
||||
Upon reception, the modem shall perform whatever operations necessary to clear the FIFO buffers.
|
||||
|
||||
### 2.7 NXDN Opcode Specifications
|
||||
|
||||
#### 2.7.1 Data
|
||||
This opcode is utilized by both the host and modem to transmit NXDN frame data.
|
||||
|
||||
The host or modem shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 51 | Length |
|
||||
| NXDN Data Opcode | 1 | $41 |
|
||||
| ... | ... | ... |
|
||||
| Frame Data | <Variable> | |
|
||||
| ... | ... | ... |
|
||||
|
||||
Upon reception, the host or modem shall perform whatever operations necessary to handle frame data.
|
||||
|
||||
If data is being transmitted to the modem, upon reception, the modem shall perform whatever operations necessary to handle the frame data for transmission and transmit a ACK or NACK in response.
|
||||
|
||||
If the write data operation fails the modem shall:
|
||||
|
||||
- Respond with a NACK and the "Illegal Length" if the frame data is not the standard NXDN frame length 48 bytes.
|
||||
- Respond with a NACK and the "Ringbuffer Full" if the NXDN FIFO buffer is full.
|
||||
|
||||
#### 2.7.2 Lost
|
||||
This opcode is utilized to notify the host the current transmission synchronization was lost.
|
||||
|
||||
The modem shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 3 | Length |
|
||||
| NXDN Lost Opcode | 1 | $42 |
|
||||
|
||||
Upon reception, the host shall perform whatever operations necessary to handle a transmission loss event.
|
||||
|
||||
#### 2.7.3 Clear
|
||||
This opcode is utilized to clear the FIFO buffer for NXDN.
|
||||
|
||||
The host shall transmit:
|
||||
| Name | Length (bytes) | Description |
|
||||
| --- | --- | --- |
|
||||
| Short Frame Start | 1 | Short Frame Start |
|
||||
| Length | 3 | Length |
|
||||
| NXDN Clear Opcode | 1 | $43 |
|
||||
|
||||
Upon reception, the modem shall perform whatever operations necessary to clear the FIFO buffers.
|
||||
@ -1,95 +0,0 @@
|
||||
= Digital Voice Modem
|
||||
|
||||
== Technical Note
|
||||
=== dvmhost Air Interface Tuning
|
||||
|
||||
Document Identifier: TN.1101
|
||||
|
||||
Author: Bryan Biedenkapp, N2PLL
|
||||
|
||||
Editors: Bryan Biedenkapp, N2PLL
|
||||
|
||||
Contributors: N/A
|
||||
|
||||
Abstract: Describes the procedures required for appropriate alignment/calibration of an air interface.
|
||||
|
||||
Status: Draft
|
||||
|
||||
== 1. Introduction
|
||||
This document describes, as simply as possible, the procedures required to align/calibrate an air interface.
|
||||
|
||||
== 2. Alignment Procedures
|
||||
|
||||
=== 2.1 Initial Setup Steps
|
||||
The following setups assume the host is compiled with the setup TUI mode (if available) [NOTE: Steps 3 - 5 only apply to the air interface modem.]. It is possible to setup the modem without the setup TUI, and requires manually modifying `config.yml` and the `iden_table.dat` files.
|
||||
|
||||
[start.1]
|
||||
. Create/Edit `config.yml` and ensure the settings for the modem are correct, find the "modem" section in "system". Check that the uart settings have the appropriate UART port and port speed set (the config.yml defaults to /dev/ttyUSB0 and 115200).
|
||||
.. If using the air modem interface, ensure the the modem protocol mode is set to "air".
|
||||
.. If using the V.24 DFSI modem interface, ensure the modem protocol mode is set to "dfsi".
|
||||
.... The V.24 DFSI modem has multiple firmware revisions, it is required to use firmware version 2.0 or greater for use with dvmhost.
|
||||
. Start `dvmhost` as follows: `/path/to/dvmhost -c /path/to/config.yml --setup`. This will start the dvmhost setup TUI mode.
|
||||
. Using the TUI user interface, use the "Setup" menu to set default parameters.
|
||||
.. The "Logging & Data Configuration" submenu allows you to alter the various logging file paths and levels, as well as paths to data files (such as the `iden_table.dat` file).
|
||||
.. The "System Configuration" submenu allows you to alter various modem port and speed, system settings, and mode settings configuration.
|
||||
.. The "Site Parameters" submenu allows you to alter various CW morse identification, and site parameters.
|
||||
.. The "Channel Configuration" submenu allows you to alter the configured channel for the modem you are configuring.
|
||||
. After altering settings, use the "File" menu, "Save Settings" menu option to save the desired configuration.
|
||||
. Quit setup mode (some settings changes require a restart of the software to be effective) using, "File" menu, "Quit".
|
||||
|
||||
=== 2.2 (Air Interface) Transmit Calibration
|
||||
|
||||
==== 2.2.1 Using setup TUI, if available
|
||||
[start.1]
|
||||
. Start `dvmhost` as follows: `/path/to/dvmhost -c /path/to/config.yml --setup`. This will start the dvmhost setup TUI mode. The best way to calibrate the DVM is to use a radio from which you can receive and transmit the appropriate test patterns (for example using ASTRO25 Tuner and an XTS radio to use the "Bit Error Rate" functions under Performance Testing).
|
||||
. Depending on which protocol you are calibration with, use the "Calibrate" menu, and select the appropriate mode using the "Operational Mode" submenu. (For example, select [Tx] DMR BS 1031 Hz Test Pattern for DMR or [Tx] P25 1011 Hz Test Pattern (NAC293 ID1 TG1) for P25.)
|
||||
. Open the "Level Adjustment" window by either, using the "Calibrate" menu and selecting "Level Adjustment" or if capable, pressing F5 on the keyboard.
|
||||
. Ensure the TX Level is set to 50 (it should be by default, you can use the spinbox in the "Level Adjustment" window to change the value, if necessary to set it to 50).
|
||||
. If the hardware in use has a TX potentiometer, set it to the to minimum level.
|
||||
. Start Tx (click "Transmit" or press F12 on the keyboard).
|
||||
. While observing the BER via whatever means available, adjust the TX potentiometer (if the modem hardware allows) for the lowest received BER. Adjust the software TX Level for some fine tuning with the spinbox in the "Level Adjustment" window.
|
||||
. Stop Tx (click "Transmit" or press F12 on the keyboard).
|
||||
. After altering settings, use the "File" menu, "Save Settings" menu option to save the desired configuration.
|
||||
. Quit setup mode, if done doing calibration, using, "File" menu, "Quit".
|
||||
|
||||
==== 2.2.2 Using old calibration CLI
|
||||
[start.1]
|
||||
. Start `dvmhost` as follows: `/path/to/dvmhost -c /path/to/config.yml --cal`. This will start the dvmhost calibration mode. The best way to calibrate the DVM is to use a radio from which you can receive and transmit the appropriate test patterns (for example using ASTRO25 Tuner and an XTS radio to use the "Bit Error Rate" functions under Performance Testing).
|
||||
. Depending on which protocol you are calibration with, enter DMR BS 1031 Hz Test Pattern (M) or P25 1011 Hz Test Pattern (NAC293 ID1 TG1) (P).
|
||||
. Ensure the TXLevel is set to 50 (it should be by default, "\`" will display current values, use "T" [increase] and "t" [decrease] if necessary to set it to 50).
|
||||
. If the hardware in use has a TX potentiometer, set it to the to minimum level.
|
||||
. Start Tx (press spacebar to toggle Tx).
|
||||
. While observing the BER via whatever means available, adjust the TX potentiometer (if the modem hardware allows) for the lowest received BER. Adjust the software TXLevel for some fine tuning with the "T" (increase) and "t" (decrease).
|
||||
. Stop Tx (press spacebar to toggle Tx).
|
||||
. Save the configuration using "s" and quit calibration mode with "q".
|
||||
|
||||
=== 2.3 (Air Interface) Receive Calibration
|
||||
|
||||
==== 2.3.1 Using setup TUI, if available
|
||||
[start.1]
|
||||
. Start `dvmhost` as follows: `/path/to/dvmhost -c /path/to/config.yml --setup`. This will start the dvmhost setup TUI mode. The best way to calibrate the DVM is to use a radio from which you can receive and transmit the appropriate test patterns (for example using ASTRO25 Tuner and an XTS radio to use the "Transmitter Test Pattern" functions under Performance Testing).
|
||||
. Depending on which protocol you are calibration with, use the "Calibrate" menu, and select the appropriate mode using the "Operational Mode" submenu. (For example, select [Rx] DMR BS 1031 Hz Test Pattern for DMR or [Rx] P25 1011 Hz Test Pattern (NAC293 ID1 TG1) for P25.)
|
||||
. Open the "Level Adjustment" window by either, using the "Calibrate" menu and selecting "Level Adjustment" or if capable, pressing F5 on the keyboard.
|
||||
. Ensure the RX Level is set to 50 (it should be by default, you can use the spinbox in the "Level Adjustment" window to change the value, if necessary to set it to 50).
|
||||
. If the hardware in use has a RX potentiometer, set it to the to minimum level. (If using something like the RepeaterBuilder STM32 board, decrease both the coarse and fine potentiometers to minimum level.)
|
||||
. While observing the BER via the setup TUI (Receive BER shows a large window in the top-right corner of the TUI when in a Rx BER test mode), adjust the RX potentiometer(s) for the lowest received BER. If necessary also adjust the software RX Level for some fine tuning with the spinbox in the "Level Adjustment" window.
|
||||
. After altering settings, use the "File" menu, "Save Settings" menu option to save the desired configuration.
|
||||
. Quit setup mode, if done doing calibration, using, "File" menu, "Quit".
|
||||
|
||||
==== 2.3.2 Using old calibration CLI
|
||||
[start.1]
|
||||
. Start `dvmhost` as follows: `/path/to/dvmhost -c /path/to/config.yml --cal`. This will start the dvmhost calibration mode. The best way to calibrate the DVM is to use a radio from which you can receive and transmit the appropriate test patterns (for example using ASTRO25 Tuner and an XTS radio to use the "Transmitter Test Pattern" functions under Performance Testing).
|
||||
. Depending on which protocol you are calibration with, enter DMR BS 1031 Hz Test Pattern (M) or P25 1011 Hz Test Pattern (P).
|
||||
. Ensure the RXLevel is set to 50 (it should be by default, "\`" will display current values, use "R" [increase] and "r" [decrease] if necessary to set it to 50).
|
||||
. If the hardware in use has a RX potentiometer, set it to the to minimum level. (If using something like the RepeaterBuilder STM32 board, decrease both the coarse and fine potentiometers to minimum level.)
|
||||
. Depending on which protocol you are calibration with, enter DMR MS 1031 Hz Test Pattern (J) or P25 1011 Hz Test Pattern (j).
|
||||
. While observing the BER via the calibration console, adjust the RX potentiometer(s) for the lowest received BER. If necessary also adjust the software RXLevel for some fine tuning with the "R" (increase) and "r" (decrease).
|
||||
. Save the configuration using "s" and quit calibration mode with "q".
|
||||
|
||||
== Appendix A (Air Interface) Calibration Notes
|
||||
|
||||
* If you have access to appropriate RF test equipment (or equivilant equipment) that is capable of monitor the overall transmitted *analog* FM deviation; if is important to adjust both the modem and the connected radios so that the overall transmitted *analog* FM deviation be between 2.75khz and 2.83khz (a center average of 2.80khz *analog* FM deviation is best).
|
||||
* When using a repeater/modem board attached to an appropriate FM repeater/radio, it *may* be necessary to "de-tune" the repeater/radio slightly, most commercial grade equipment operating within a 12.5khz channel may impose a strict 2.5khz (and no greater) maximum *analog* FM deviation, this is well below what is required for good digital operation. It may be necessary using whatever tuning/alignment tools to "de-tune" or adjust the equipments alignment to allow for a wider *analog* FM deviation, as close to 2.80khz as possible.
|
||||
* In some situations, it may be necessary to adjust the symbol levels directly. Normally this isn't required as the DVM will just work, but some radios require some fine adjustment of the symbol levels, this is exposed in the calibration mode. It is however recommended, that these adjustments *not* be made unless appropriate RF test equipment is available.
|
||||
* Unusually high BER >10% and other various receive problems may be due to the radio/hotspot being off frequency and requiring some adjustment. Even a slight frequency drift can be catastrophic for proper digital modulation. The recommendation is to ensure the interfaced radio does not have an overall reference frequency drift > +/- 150hz. An unusually high BER can also be explained by DC level offsets in the signal paths, or issues with the FM deviation levels on the interfaced radio being too high or too low.
|
||||
* For hotspot operation, it may be necessary to enable/disable the AFC (automatic frequency correction) or change the gain mode. Both of these options can be altered using the setup TUI or directly in the `config.yml` file. In some cases when operating in trunking mode, for example, it may be necessary to change the orientation of the transmit antenna by using a 90 degree adapter as well as changing the gain mode to "Low" to prevent Rx desense.
|
||||
@ -0,0 +1,90 @@
|
||||
# Digital Voice Modem
|
||||
|
||||
## Technical Note
|
||||
### dvmhost Air Interface Tuning
|
||||
|
||||
Document Identifier: TN.1101
|
||||
|
||||
Author: Bryan Biedenkapp, N2PLL
|
||||
|
||||
Editors: Bryan Biedenkapp, N2PLL
|
||||
|
||||
Contributors: N/A
|
||||
|
||||
Abstract: Describes the procedures required for appropriate alignment/calibration of an air interface.
|
||||
|
||||
Status: Draft
|
||||
|
||||
## 1. Introduction
|
||||
This document describes, as simply as possible, the procedures required to align/calibrate an air interface.
|
||||
|
||||
## 2. Alignment Procedures
|
||||
|
||||
### 2.1 Initial Setup Steps
|
||||
The following setups assume the host is compiled with the setup TUI mode (if available) [NOTE: Steps 3 - 5 only apply to the air interface modem.]. It is possible to setup the modem without the setup TUI, and requires manually modifying `config.yml` and the `iden_table.dat` files.
|
||||
|
||||
1. Create/Edit `config.yml` and ensure the settings for the modem are correct, find the "modem" section in "system". Check that the uart settings have the appropriate UART port and port speed set (the config.yml defaults to /dev/ttyUSB0 and 115200).
|
||||
1. If using the air modem interface, ensure the modem protocol mode is set to "air".
|
||||
1. If using the V.24 DFSI modem interface, ensure the modem protocol mode is set to "dfsi".
|
||||
1. The V.24 DFSI modem has multiple firmware revisions, it is required to use firmware version 2.0 or greater for use with dvmhost.
|
||||
1. Start `dvmhost` as follows: `/path/to/dvmhost -c /path/to/config.yml --setup`. This will start the dvmhost setup TUI mode.
|
||||
1. Using the TUI user interface, use the "Setup" menu to set default parameters.
|
||||
1. The "Logging & Data Configuration" submenu allows you to alter the various logging file paths and levels, as well as paths to data files (such as the `iden_table.dat` file).
|
||||
1. The "System Configuration" submenu allows you to alter various modem port and speed, system settings, and mode settings configuration.
|
||||
1. The "Site Parameters" submenu allows you to alter various CW morse identification, and site parameters.
|
||||
1. The "Channel Configuration" submenu allows you to alter the configured channel for the modem you are configuring.
|
||||
1. After altering settings, use the "File" menu, "Save Settings" menu option to save the desired configuration.
|
||||
1. Quit setup mode (some settings changes require a restart of the software to be effective) using, "File" menu, "Quit".
|
||||
|
||||
### 2.2 (Air Interface) Transmit Calibration
|
||||
|
||||
#### 2.2.1 Using setup TUI, if available
|
||||
1. Start `dvmhost` as follows: `/path/to/dvmhost -c /path/to/config.yml --setup`. This will start the dvmhost setup TUI mode. The best way to calibrate the DVM is to use a radio from which you can receive and transmit the appropriate test patterns (for example using ASTRO25 Tuner and an XTS radio to use the "Bit Error Rate" functions under Performance Testing).
|
||||
1. Depending on which protocol you are calibrating, use the "Calibrate" menu, and select the appropriate mode using the "Operational Mode" submenu. (For example, select [Tx] DMR BS 1031 Hz Test Pattern for DMR or [Tx] P25 1011 Hz Test Pattern (NAC293 ID1 TG1) for P25.)
|
||||
1. Open the "Level Adjustment" window by either, using the "Calibrate" menu and selecting "Level Adjustment" or if capable, pressing F5 on the keyboard.
|
||||
1. Ensure the TX Level is set to 50 (it should be by default, you can use the spinbox in the "Level Adjustment" window to change the value, if necessary to set it to 50).
|
||||
1. If the hardware in use has a TX potentiometer, set it to the to minimum level.
|
||||
1. Start Tx (click "Transmit" or press F12 on the keyboard).
|
||||
1. While observing the BER via whatever means available, adjust the TX potentiometer (if the modem hardware allows) for the lowest received BER. Adjust the software TX Level for some fine tuning with the spinbox in the "Level Adjustment" window.
|
||||
1. Stop Tx (click "Transmit" or press F12 on the keyboard).
|
||||
1. After altering settings, use the "File" menu, "Save Settings" menu option to save the desired configuration.
|
||||
1. Quit setup mode, if done doing calibration, using, "File" menu, "Quit".
|
||||
|
||||
#### 2.2.2 Using old calibration CLI
|
||||
1. Start `dvmhost` as follows: `/path/to/dvmhost -c /path/to/config.yml --cal`. This will start the dvmhost calibration mode. The best way to calibrate the DVM is to use a radio from which you can receive and transmit the appropriate test patterns (for example using ASTRO25 Tuner and an XTS radio to use the "Bit Error Rate" functions under Performance Testing).
|
||||
1. Depending on which protocol you are calibrating, enter DMR BS 1031 Hz Test Pattern (M) or P25 1011 Hz Test Pattern (NAC293 ID1 TG1) (P).
|
||||
1. Ensure the TXLevel is set to 50 (it should be by default, "\`" will display current values, use "T" [increase] and "t" [decrease] if necessary to set it to 50).
|
||||
1. If the hardware in use has a TX potentiometer, set it to the to minimum level.
|
||||
1. Start Tx (press spacebar to toggle Tx).
|
||||
1. While observing the BER via whatever means available, adjust the TX potentiometer (if the modem hardware allows) for the lowest received BER. Adjust the software TXLevel for some fine tuning with the "T" (increase) and "t" (decrease).
|
||||
1. Stop Tx (press spacebar to toggle Tx).
|
||||
1. Save the configuration using "s" and quit calibration mode with "q".
|
||||
|
||||
### 2.3 (Air Interface) Receive Calibration
|
||||
|
||||
#### 2.3.1 Using setup TUI, if available
|
||||
1. Start `dvmhost` as follows: `/path/to/dvmhost -c /path/to/config.yml --setup`. This will start the dvmhost setup TUI mode. The best way to calibrate the DVM is to use a radio from which you can receive and transmit the appropriate test patterns (for example using ASTRO25 Tuner and an XTS radio to use the "Transmitter Test Pattern" functions under Performance Testing).
|
||||
1. Depending on which protocol you are calibrating, use the "Calibrate" menu, and select the appropriate mode using the "Operational Mode" submenu. (For example, select [Rx] DMR BS 1031 Hz Test Pattern for DMR or [Rx] P25 1011 Hz Test Pattern (NAC293 ID1 TG1) for P25.)
|
||||
1. Open the "Level Adjustment" window by either, using the "Calibrate" menu and selecting "Level Adjustment" or if capable, pressing F5 on the keyboard.
|
||||
1. Ensure the RX Level is set to 50 (it should be by default, you can use the spinbox in the "Level Adjustment" window to change the value, if necessary to set it to 50).
|
||||
1. If the hardware in use has a RX potentiometer, set it to the to minimum level. (If using something like the RepeaterBuilder STM32 board, decrease both the coarse and fine potentiometers to minimum level.)
|
||||
1. While observing the BER via the setup TUI (Receive BER shows a large window in the top-right corner of the TUI when in a Rx BER test mode), adjust the RX potentiometer(s) for the lowest received BER. If necessary also adjust the software RX Level for some fine tuning with the spinbox in the "Level Adjustment" window.
|
||||
1. After altering settings, use the "File" menu, "Save Settings" menu option to save the desired configuration.
|
||||
1. Quit setup mode, if done doing calibration, using, "File" menu, "Quit".
|
||||
|
||||
#### 2.3.2 Using old calibration CLI
|
||||
1. Start `dvmhost` as follows: `/path/to/dvmhost -c /path/to/config.yml --cal`. This will start the dvmhost calibration mode. The best way to calibrate the DVM is to use a radio from which you can receive and transmit the appropriate test patterns (for example using ASTRO25 Tuner and an XTS radio to use the "Transmitter Test Pattern" functions under Performance Testing).
|
||||
1. Depending on which protocol you are calibrating, enter DMR BS 1031 Hz Test Pattern (M) or P25 1011 Hz Test Pattern (P).
|
||||
1. Ensure the RXLevel is set to 50 (it should be by default, "\`" will display current values, use "R" [increase] and "r" [decrease] if necessary to set it to 50).
|
||||
1. If the hardware in use has a RX potentiometer, set it to the to minimum level. (If using something like the RepeaterBuilder STM32 board, decrease both the coarse and fine potentiometers to minimum level.)
|
||||
1. Depending on which protocol you are calibrating, enter DMR MS 1031 Hz Test Pattern (J) or P25 1011 Hz Test Pattern (j).
|
||||
1. While observing the BER via the calibration console, adjust the RX potentiometer(s) for the lowest received BER. If necessary also adjust the software RXLevel for some fine tuning with the "R" (increase) and "r" (decrease).
|
||||
1. Save the configuration using "s" and quit calibration mode with "q".
|
||||
|
||||
## Appendix A (Air Interface) Calibration Notes
|
||||
|
||||
- If you have access to appropriate RF test equipment (or equivilant equipment) that is capable of monitor the overall transmitted **analog** FM deviation; if is important to adjust both the modem and the connected radios so that the overall transmitted **analog** FM deviation be between 2.75khz and 2.83khz (a center average of 2.80khz **analog** FM deviation is best).
|
||||
- When using a repeater/modem board attached to an appropriate FM repeater/radio, it **may** be necessary to "de-tune" the repeater/radio slightly, most commercial grade equipment operating within a 12.5khz channel may impose a strict 2.5khz (and no greater) maximum **analog** FM deviation, this is well below what is required for good digital operation. It may be necessary using whatever tuning/alignment tools to "de-tune" or adjust the equipments alignment to allow for a wider **analog** FM deviation, as close to 2.80khz as possible.
|
||||
- In some situations, it may be necessary to adjust the symbol levels directly. Normally this isn't required as the DVM will just work, but some radios require some fine adjustment of the symbol levels, this is exposed in the calibration mode. It is however recommended, that these adjustments **not** be made unless appropriate RF test equipment is available.
|
||||
- Unusually high BER >10% and other various receive problems may be due to the radio/hotspot being off frequency and requiring some adjustment. Even a slight frequency drift can be catastrophic for proper digital modulation. The recommendation is to ensure the interfaced radio does not have an overall reference frequency drift > +/- 150hz. An unusually high BER can also be explained by DC level offsets in the signal paths, or issues with the FM deviation levels on the interfaced radio being too high or too low.
|
||||
- For hotspot operation, it may be necessary to enable/disable the AFC (automatic frequency correction) or change the gain mode. Both of these options can be altered using the setup TUI or directly in the `config.yml` file. In some cases when operating in trunking mode, for example, it may be necessary to change the orientation of the transmit antenna by using a 90 degree adapter as well as changing the gain mode to "Low" to prevent Rx desense.
|
||||
@ -1,28 +0,0 @@
|
||||
= Digital Voice Modem
|
||||
|
||||
== Technical Note
|
||||
=== *<Subject Matter>*
|
||||
|
||||
Document Identifier: <TN.DocumentNumber>
|
||||
|
||||
Author: <Replace and list authors>
|
||||
|
||||
Editors: <Replace and list editors>
|
||||
|
||||
Contributors: <Replace and list contributors>
|
||||
|
||||
Abstract: <Supply your own summary of the technical purpose of the document.>
|
||||
|
||||
Status: <Draft|Published>
|
||||
|
||||
== 1. Introduction
|
||||
_Place a general summary of the technical note here to serve as executive summary enticing the reader to read on._
|
||||
|
||||
== 2. Technical Note
|
||||
_Place a general summary of the technical note here to serve as executive summary enticing the reader to read on._
|
||||
|
||||
=== 2.1 Definitions
|
||||
_Use this section to list any technical definitions required by the reader in order to understand the proposed technical note below._
|
||||
|
||||
=== 2.2 _<User Content>_
|
||||
_Use this section and all following sections to describe the content of the technical note._
|
||||
@ -0,0 +1,28 @@
|
||||
# Digital Voice Modem
|
||||
|
||||
## Technical Note
|
||||
### **<Subject Matter>**
|
||||
|
||||
Document Identifier: <TN.DocumentNumber>
|
||||
|
||||
Author: <Replace and list authors>
|
||||
|
||||
Editors: <Replace and list editors>
|
||||
|
||||
Contributors: <Replace and list contributors>
|
||||
|
||||
Abstract: <Supply your own summary of the technical purpose of the document.>
|
||||
|
||||
Status: <Draft|Published>
|
||||
|
||||
## 1. Introduction
|
||||
*Place a general summary of the technical note here to serve as executive summary enticing the reader to read on.*
|
||||
|
||||
## 2. Technical Note
|
||||
*Place a general summary of the technical note here to serve as executive summary enticing the reader to read on.*
|
||||
|
||||
### 2.1 Definitions
|
||||
*Use this section to list any technical definitions required by the reader in order to understand the proposed technical note below.*
|
||||
|
||||
### 2.2 *<User Content>*
|
||||
*Use this section and all following sections to describe the content of the technical note.*
|
||||
@ -0,0 +1,228 @@
|
||||
# Talkgroup Rules Configuration
|
||||
|
||||
Talkgroup rules define group-call admission and routing across DMR, P25, and NXDN peers. Use [`configs/talkgroup_rules.example.yml`](../../configs/talkgroup_rules.example.yml) and validate it against [`configs/schema/talkgroup_rules.yaml_schema.json`](../../configs/schema/talkgroup_rules.yaml_schema.json).
|
||||
|
||||
The root key is `groupVoice`, a nonempty array. Each entry must contain `name`, `config`, and `source`; `source.tgid`, `source.slot`, and `config.active` are required by the schema. The runtime loader is less strict and supplies defaults for omitted fields, but relying on those defaults makes mistakes difficult to see. Treat schema validation as part of deployment.
|
||||
|
||||
## Schema validation
|
||||
|
||||
The schema uses JSON Schema draft 4 and deliberately rejects unknown keys at the root, rule, `config`, `source`, and rewrite-entry levels. This catches common misspellings such as `peerId` in place of the supported rewrite key `peerid`. It also enforces:
|
||||
|
||||
- A nonempty `groupVoice` array.
|
||||
- A nonempty string for each rule `name`.
|
||||
- Boolean values for `active`, `affiliated`, and `parrot`.
|
||||
- `strapping` values of exactly `0`, `1`, or `2`.
|
||||
- Positive integer TGIDs and RIDs within the common unsigned 32-bit representation.
|
||||
- Peer IDs from `1` through `999999999`.
|
||||
- Slot values of exactly `1` or `2`.
|
||||
- Unique scalar entries within all peer-ID and RID lists.
|
||||
- Complete rewrite objects containing `peerid`, `tgid`, and `slot`.
|
||||
|
||||
Schema validation cannot express all topology and protocol semantics. It does not prove that `(source.tgid, source.slot)` pairs are unique across rules, that two rewrites do not claim the same external identity, that inclusion and exclusion are not contradictory, or that a common 32-bit TGID fits the selected air protocol. Those checks remain part of deployment review.
|
||||
|
||||
```yaml
|
||||
groupVoice:
|
||||
- name: Operations
|
||||
alias: Ops
|
||||
config:
|
||||
active: true
|
||||
affiliated: true
|
||||
strapping: 0
|
||||
parrot: false
|
||||
inclusion: []
|
||||
exclusion: []
|
||||
rewrite: []
|
||||
always: []
|
||||
preferred: []
|
||||
rid_permitted: []
|
||||
source:
|
||||
tgid: 1001
|
||||
slot: 1
|
||||
```
|
||||
|
||||
## Identity fields
|
||||
|
||||
| Key | Required | Meaning |
|
||||
| --- | --- | --- |
|
||||
| `name` | Yes | Human-readable rule name used in logs, REST output, and operator tools. It is not a routing key. |
|
||||
| `alias` | No | Secondary display label/grouping. It does not change routing or create another TGID. |
|
||||
| `source.tgid` | Yes | Canonical internal talkgroup ID. Traffic is normalized to this value before normal rule processing; zero makes the runtime entry invalid. |
|
||||
| `source.slot` | Yes | Canonical DMR slot (`1` or `2`). For P25, NXDN, and analog paths, lookups frequently use slot zero as a wildcard and the configured value is normally `1`. |
|
||||
|
||||
The `(tgid, slot)` pair identifies a DMR rule. A lookup with a nonzero slot requires an exact pair; a lookup with slot zero returns the first matching TGID regardless of configured slot. Because the table is a vector searched in file order, duplicate TGIDs or duplicate pairs are ambiguous rather than merged. Keep each canonical pair unique and do not rely on ordering to select a duplicate.
|
||||
|
||||
## Where each field is used
|
||||
|
||||
The FNE loads the authoritative table with talkgroup ACL enforcement enabled. A host independently loads the file named by `system.talkgroup_id.file`; its local enforcement is controlled by `system.talkgroup_id.acl`. The same YAML model is used by both components, but several fields are meaningful only at the FNE.
|
||||
|
||||
| Field | FNE use | Host use |
|
||||
| --- | --- | --- |
|
||||
| `name`, `alias` | Operator-facing rule metadata, logging, REST output, and full-table replication. | Local metadata when loaded from disk; not needed for over-the-wire active-TG validation. |
|
||||
| `source.tgid` | Canonical group identity used for admission, routing, and rewrites. | Group identity used by RF voice, data, control-signaling, grant, and affiliation validation. |
|
||||
| `source.slot` | DMR identity and rewrite slot; normally ignored by FDMA protocols through slot-zero lookup. | Exact DMR slot validation and a preferred slot for group-channel selection. P25 and NXDN lookups are TGID based. |
|
||||
| `active` | Rejects inactive group traffic and controls whether an active or deactivation record is sent to a host. | Required by local ACL validation. A deactivation received from the FNE removes the matching local runtime rule. |
|
||||
| `affiliated` | Gates delivery to sites with a current group affiliation, subject to peer-class and topology exceptions. | Requires a current affiliation before trunking grant processing, unless that host operation explicitly ignores the affiliation check. |
|
||||
| `strapping` | Enforces observable clear/encrypted state and sends the policy to hosts. Protocol limitations are described below. | Enforces supported RF-side encrypted-only checks. Host enforcement is not symmetrical for every protocol and value; see [Encryption strapping](#encryption-strapping). |
|
||||
| `parrot` | Selects the FNE record-and-replay path. | No local host parrot service behavior. |
|
||||
| `inclusion`, `exclusion` | Filters live recipients and the active/deactive/RID-admission datasets sent to each peer. | Not evaluated as a local RF routing list. A host normally receives only the subset selected for its peer ID. |
|
||||
| `rewrite` | Bidirectionally maps a peer's external TGID/slot to the canonical identity. | Not applied by the host talkgroup lookup. |
|
||||
| `always` | Bypasses affiliation gating for listed recipients and some originating-call unknown-RID/per-TG RID rejections. | Not evaluated by host access control. |
|
||||
| `preferred` | Causes otherwise eligible, unlisted peers to receive the rule with the `nonPreferred` flag. | Uses the received `nonPreferred` state; it does not evaluate the complete `preferred` peer list locally. |
|
||||
| `rid_permitted` | Restricts originating group traffic and grant/admission checks, and is distributed to eligible hosts. | Restricts the source RID wherever the protocol path invokes talkgroup-access validation, including group voice, data, control signaling, and grants. P25 also applies it to its validated affiliation paths. |
|
||||
|
||||
### FNE processing path
|
||||
|
||||
For an ordinary group call, the FNE applies the table in these stages:
|
||||
|
||||
1. It resolves the sender's external TGID/slot through any matching per-peer rewrite and obtains the canonical rule. DMR and P25 Phase 2 include the slot in this translation; P25 Phase 1, NXDN, and analog translate the TGID.
|
||||
2. It validates the canonical talkgroup, active state, originating RID admission, and any encryption state that is available at that point in the protocol. Promiscuous-hub mode intentionally relaxes normal TG/RID ACL validation.
|
||||
3. It evaluates every candidate recipient. Replica and SysView peers are trusted recipient classes and bypass ordinary recipient filtering. For other peers, inclusion/exclusion is evaluated first, followed by `always` and affiliation policy.
|
||||
4. It rewrites the canonical TGID/slot to the recipient's external identity before transmitting the protocol frames and applicable control messages.
|
||||
|
||||
An `always` entry is broader than an affiliation exception. On the ingress/source side, an originating peer in `always` can also bypass some unknown-RID and `rid_permitted` rejection paths. It still does not make an inactive talkgroup active and does not override inclusion/exclusion filtering on delivery.
|
||||
|
||||
Affiliation routing has deliberate topology exceptions. Traffic received from an upstream/neighbor FNE is repeated without requiring that link itself to hold the downstream site affiliation. Console peers bypass affiliation gating, and conventional peers can do so when the conventional-site affiliation override is enabled. For voice-channel peers, the FNE checks affiliation against the associated control-channel peer ID rather than assuming the voice-channel peer owns the affiliation database entry.
|
||||
|
||||
### Host processing path
|
||||
|
||||
With `system.talkgroup_id.acl: true`, the host rejects an unknown, inactive, or invalid talkgroup before accepting applicable RF voice, packet data, control-signaling, affiliation, or grant activity. DMR additionally requires the configured slot to match. P25 has a narrowly scoped `forceAllowTG0` compatibility path; it should not be treated as general permission for an undefined group. A nonempty `rid_permitted` list then requires an exact source-RID match. With the local talkgroup ACL disabled, unknown nonzero groups generally pass these table checks and `rid_permitted` is not enforced.
|
||||
|
||||
For trunking operations, `affiliated: true` requires the source radio/site state to show an affiliation with that group before a grant is issued, except in code paths configured to ignore affiliation. The host also consumes `nonPreferred` state derived by the FNE from `preferred`; this can discourage use of a non-preferred site and influence subscriber roaming behavior.
|
||||
|
||||
When both `network.updateLookups` and FNE `system.sendTalkgroups` are enabled, the host receives a reduced operational view rather than the complete YAML rule:
|
||||
|
||||
- Active records carry TGID, slot, `affiliated`, derived `nonPreferred`, and `strapping` state.
|
||||
- Deactivation records remove the matching runtime rule.
|
||||
- A TG-admission update first clears the existing runtime `rid_permitted` lists, then installs the transmitted nonempty lists on matching rules.
|
||||
- FNE peer routing lists determine which records are sent; fields such as `rewrite`, `always`, `parrot`, and the peer lists themselves are not sent as host policy.
|
||||
|
||||
An active record creates a missing host rule. If a matching local rule already exists, the current receiver normally preserves that local entry rather than merging all transmitted attributes; a received non-preferred record is the exception and replaces the matching local entry with the FNE-derived state. Administrators should therefore avoid assuming that `updateLookups` overwrites every field of a pre-existing local rule. `network.saveLookups` can persist network-delivered lookup changes.
|
||||
|
||||
A replica FNE is different: it receives the complete YAML file in fragments and reloads that file, rather than receiving only the reduced host dataset.
|
||||
|
||||
## Core policy
|
||||
|
||||
| Key | Meaning/default behavior |
|
||||
| --- | --- |
|
||||
| `config.active` | Enables admission and distribution of the rule. The FNE sends active rules to eligible peers and explicitly sends inactive rules as deactivations. This is preferable to deleting a temporarily disabled rule because identity and policy remain visible. Default false. |
|
||||
| `config.affiliated` | Send traffic only to sites that currently have a group affiliation for the TGID. This reduces needless wide-area traffic. Neighbor FNE links repeat regardless; `always` peers bypass this check; consoles and optionally conventional peers also bypass it. Default false. |
|
||||
| `config.strapping` | Encryption-state policy: `0` selectable, `1` encrypted-only, `2` clear-only. Enforcement depends on component, protocol, and when encryption state becomes observable; see [Encryption strapping](#encryption-strapping). Default 0. |
|
||||
| `config.parrot` | Treat the TGID as record-and-replay. Eligible inbound call frames are retained and replayed after the FNE parrot delay instead of being handled as an ordinary live distribution path. Default false. |
|
||||
|
||||
`strapping` and `parrot` are declared by the schema and validated according to their runtime types and accepted values.
|
||||
|
||||
`active` determines whether the talkgroup itself is valid; it does not mean that every peer receives it. Peer visibility is filtered by `inclusion`/`exclusion`, and actual call delivery can additionally depend on affiliation, peer class, protocol enablement, slot policy, RID ACLs, call collisions, and topology.
|
||||
|
||||
## Peer routing lists
|
||||
|
||||
> **Important:** Use either a nonempty `inclusion` list or a nonempty `exclusion` list for a rule—never both. Keeping both keys with empty arrays is valid and is how the example expresses unrestricted peer routing. If both lists contain peer IDs, the FNE tests `inclusion` first and does not evaluate `exclusion`; the entire exclusion list is ignored. The verbose rule loader also logs a warning for this condition.
|
||||
|
||||
Choose the list based on the intended policy:
|
||||
|
||||
- Use `inclusion` when the talkgroup should reach only a known subset of peers. Every unlisted normal peer is denied.
|
||||
- Use `exclusion` when the talkgroup should reach most peers except a small denied subset. Every unlisted normal peer remains eligible.
|
||||
- Leave both lists empty when the talkgroup should have no peer-list restriction. Other rules such as affiliation and RID admission still apply.
|
||||
|
||||
| Key | Meaning |
|
||||
| --- | --- |
|
||||
| `inclusion` | Allow-list for peer visibility and normal call delivery. When nonempty, an unlisted peer is filtered even if it is absent from `exclusion`. |
|
||||
| `exclusion` | Deny-list used only when `inclusion` is empty. It is convenient when nearly every peer should carry the TGID. |
|
||||
| `always` | Peers that bypass subsequent affiliation and some unknown-RID rejection decisions after they have passed inclusion/exclusion filtering. It does not override inclusion/exclusion. |
|
||||
| `preferred` | Preferred site peer IDs. For each visible peer not in a nonempty list, the FNE marks the distributed rule non-preferred; host access-control logic can use that state to discourage or deny affiliation and drive subscriber roaming. Empty means no peer is marked non-preferred. |
|
||||
|
||||
The effective recipient decision is approximately:
|
||||
|
||||
```text
|
||||
replica or SysView peer -> permitted by recipient filtering
|
||||
inclusion nonempty and peer not listed -> deny
|
||||
otherwise peer listed in exclusion -> deny
|
||||
peer listed in always -> permit without affiliation check
|
||||
affiliated=true and no site affiliation-> deny
|
||||
otherwise -> permit
|
||||
```
|
||||
|
||||
This precedence is used by ordinary live routing in the DMR, P25, P25 Phase 2, NXDN, and analog call handlers. The same inclusion-first branch is used when the FNE constructs peer-specific active/deactive talkgroup lists and distributed RID-admission datasets. Consequently, using both lists does not produce an allow-list with exceptions in those paths: it produces only an allow-list.
|
||||
|
||||
Parrot playback is a notable implementation exception. Its protocol-specific playback loops test a nonempty inclusion list and then independently test exclusion, rather than using the normal `else if` precedence. If both lists are populated, parrot playback therefore behaves like `inclusion` minus `exclusion`, while live traffic and lookup distribution ignore exclusion. This inconsistency is another reason that a rule must use only one routing-list mode.
|
||||
|
||||
Replica/SysView exceptions are high-trust peer-class behavior in the FNE call handlers. Inclusion/exclusion govern routing eligibility; they do not authenticate a connection. If `always` and `affiliated` are both set, the loader warns because listed peers deliberately override affiliation gating.
|
||||
|
||||
## Per-peer rewrite
|
||||
|
||||
`config.rewrite` maps the canonical TGID/slot to the identifiers used by one peer:
|
||||
|
||||
```yaml
|
||||
rewrite:
|
||||
- peerid: 9000990
|
||||
tgid: 9999
|
||||
slot: 2
|
||||
```
|
||||
|
||||
| Key | Meaning |
|
||||
| --- | --- |
|
||||
| `peerid` | Peer for which this external representation applies. The spelling is lowercase `peerid`. Zero is syntactically loadable but should not be used. |
|
||||
| `tgid` | TGID received from and transmitted to that peer. It is translated to/from the rule's canonical `source.tgid`. |
|
||||
| `slot` | DMR slot received from and transmitted to that peer. Slot-zero lookups can act as a wildcard on FDMA paths. |
|
||||
|
||||
On ingress, the FNE first tries the canonical source TGID and then searches rewrites for the sending peer; a matching rewritten identity resolves to the canonical rule. On egress to that peer, the canonical identity is replaced with its configured TGID/slot. This makes a single rewrite logically bidirectional for that FNE/peer boundary. It does not automatically create equivalent mappings on another FNE, host, or DVMPatch instance.
|
||||
|
||||
Only one rewrite per peer and external `(tgid,slot)` should match. The lookup returns the first matching rule, so duplicate external identities are ambiguous. Avoid cycles where separate rules, FNEs, or patches translate a call back and forth. Rewriting changes group addressing only; it does not rewrite the source RID, authorize the peer, bypass RID admission, or transform encryption.
|
||||
|
||||
## RID admission
|
||||
|
||||
`config.rid_permitted` is a talkgroup-specific allow-list of subscriber RIDs permitted to originate or request applicable group service on the canonical `(tgid,slot)`. It is enforced only in protocol paths that call talkgroup-access validation; P25 affiliation processing does so, while affiliation handling is not identical across all protocols. With talkgroup ACL enforcement active:
|
||||
|
||||
- An invalid/missing talkgroup denies the RID.
|
||||
- An empty list admits every RID that passes the other ACL layers; it does not deny all.
|
||||
- A nonempty list requires an exact RID match.
|
||||
- When the FNE distributes admissions, zero entries are removed and the list is sorted and deduplicated.
|
||||
|
||||
This is an additional layer, not a replacement for `rid_acl.dat`. A caller may need to pass global RID enablement, unknown-RID policy, peer permissions, and this talkgroup-specific list. The list controls source admission in the paths that consult it, not which sites receive an otherwise valid call.
|
||||
|
||||
Private/unit-to-unit and telephone-interconnect calls are not group talkgroup traffic and use their dedicated routing policy.
|
||||
|
||||
## Parrot rules
|
||||
|
||||
A parrot rule normally has `parrot: true`, a unique TGID/slot, and carefully scoped peer routing. The FNE buffers the completed eligible call and starts playback after `master.parrotDelay`. `parrotGrantDemand` optionally generates a resource request, `parrotOnlyToOrginiatingPeer` limits replay scope, and `parrotOverrideSrcId` can replace the replay source RID. When replay is not restricted to the originating peer, current peer-list and affiliation eligibility is checked again. The routing-list exception described above applies to this playback loop.
|
||||
|
||||
Source-RID override changes the replay envelope/source value. In the DMR implementation, embedded link-control portions of already recorded frames are not comprehensively regenerated, so consumers that inspect embedded LC can still observe the original source. Avoid enabling parrot on routine operational TGIDs: replay consumes airtime and can be mistaken for a new live transmission.
|
||||
|
||||
## Encryption strapping
|
||||
|
||||
The values are policy declarations, not key-management controls:
|
||||
|
||||
- `0` (`selectable`) permits either clear or encrypted traffic.
|
||||
- `1` (`strapped`) requires encrypted traffic where the implementation can determine encryption state.
|
||||
- `2` (`clear-only`) rejects encrypted traffic where that state is checked.
|
||||
|
||||
At the FNE, P25 and NXDN handlers enforce both encrypted-only and clear-only conflicts once the relevant header/link-control state is observable. DMR privacy indication can arrive too late for equivalent, reliable call-start enforcement, so DMR FNE handling is not symmetrical. Analog handling also has only the checks supported by its transported metadata.
|
||||
|
||||
At the host RF boundary, DMR, P25, and NXDN voice paths contain encrypted-only (`strapping: 1`) checks. The host code does not provide an equivalent clear-only check in every corresponding path. NXDN grant requests cannot be rejected by strapping at request time because the VCALL request does not carry encryption state; enforcement occurs when voice information is available. Treat strapping as an admission guard, not proof of end-to-end encryption, and test the exact protocol, call type, and control-channel mode used by the deployment.
|
||||
|
||||
## Protocol considerations
|
||||
|
||||
- DMR rules distinguish Slot 1 and Slot 2. The same TGID can have separate rules per slot, but network and host slot enablement must also permit the selected slot.
|
||||
- P25, NXDN, and analog normally use slot `1` in the file; their runtime lookups commonly pass slot zero and match by TGID.
|
||||
- Protocol-wide IDs such as P25 `65535` or DMR `16777215` must be intentional; they can produce very broad behavior.
|
||||
- Affiliation and preference are trunking concepts. Conventional and console peer exceptions exist in FNE routing, so conventional interoperability needs an explicit policy rather than blindly enabling `affiliated`.
|
||||
- Encryption strapping cannot create or distribute keys. Configure key services and endpoint crypto separately.
|
||||
|
||||
## Deployment checklist
|
||||
|
||||
1. Ensure every `(tgid, slot)` pair is unique and active only where intended.
|
||||
2. Resolve inclusion/exclusion/always contradictions.
|
||||
3. Verify every peer ID against the peer list and actual topology.
|
||||
4. Trace each rewrite in both directions and check for loops with DVMPatch mappings.
|
||||
5. Confirm affiliation, preferred-site, and RID admission behavior in a lab topology.
|
||||
6. Verify parrot and system-wide IDs cannot leak traffic to unintended peers.
|
||||
7. Reload the FNE table and inspect loader warnings before live use.
|
||||
|
||||
## Reload, replication, and editing behavior
|
||||
|
||||
The loader parses a complete YAML document, then replaces the in-memory vector. A missing or empty `groupVoice` list fails the load. Periodic reload time is configured by the owning host/FNE configuration; a zero interval disables the reload thread. FNE REST operations can also modify and commit the in-memory table.
|
||||
|
||||
When `system.sendTalkgroups` is enabled, the FNE sends each peer only rules visible through that rule's inclusion/exclusion policy. Active and inactive states are sent separately, and only nonempty RID-admission lists are encoded after zero removal, sorting, and deduplication. On receipt of an admission update, the host clears all current per-rule admission lists before applying the transmitted records, so an omitted rule becomes unrestricted rather than retaining a stale list. Replica peers can receive the full replicated table. Host-side network updates should therefore be understood as policy synchronization, not merely alias synchronization.
|
||||
|
||||
Use atomic file replacement when editing a live deployment. A schema-valid but semantically conflicting file may still load successfully; verbose mode is valuable because it reports rule counts and warns about inclusion/exclusion and affiliation/always contradictions.
|
||||
|
||||
See the [FNE example configuration](../../configs/fne-config.example.yml), [host example configuration](../../configs/config.example.yml), and [lookup/data-file reference](lookup-files.md).
|
||||
Loading…
Reference in new issue