Copyright © Glensound Electronics Ltd and individual contributors. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of Glensound nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Content based on github.com/github/opensource.guide used under the CC-BY-4.0 license.
The GetInfo message can be sent to any device, regardless of its connection state. The message header must not include a password.
This should be done only once, when the device is discovered on the network. The device returns an Info structure containing various items, of which most important are Product ID and device name. The DARK1616M's PID is 6.
1) Host controller sends a GetInfo message to the device.
------------------------------------------------------
0000 47 53 20 43 74 72 6c 00 10 00 05 00 90 09 89 03 GS Ctrl.........
------------------------------------------------------
GS Header:
0000 47 53 20 43 74 72 6c 00 Magic
10 00 Size
05 Opcode
00 Flags
90 09 89 03 Controller ID
Magic: 4753204374726c00 (Must not use password)
Size: 0x0010 (Payload 0 bytes) Packet size, including this header
.000 0000 0001 0000 = Packet size: 16
0... .... .... .... = Multipacket: False Message has one packet (this one)
Opcode: 5 (GetInfo)
Flags: 0x00 (set to zero)
Controller ID: 0x03890990 Unique value on this network, identifies the sender
2) DARK1616M responds with Info.
------------------------------------------------------
0000 47 53 20 43 74 72 6c 00 90 00 04 0c 5a d4 79 20 GS Ctrl.....Z.y
0010 0c 22 17 df ef fe 32 7b 06 00 01 02 02 00 00 00 ."....2{........
0020 00 1d c1 ff fe 20 79 d4 44 41 52 4b 31 36 31 36 ..... y.DARK1616
0030 2d 32 30 37 39 64 34 00 00 00 00 00 00 00 00 00 -2079d4.........
0040 00 00 00 00 00 00 00 00 44 41 52 4b 31 36 31 36 ........DARK1616
0050 2d 32 30 37 39 64 34 00 00 00 00 00 00 00 00 00 -2079d4.........
0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0080 00 00 00 00 00 00 00 00 00 21 00 00 00 00 00 00 .........!......
------------------------------------------------------
GS Header:
0000 47 53 20 43 74 72 6c 00 90 00 04 0c 5a d4 79 20
Magic: 4753204374726c00
Size: 0x0090 (Payload 128 bytes)
.000 0000 1001 0000 = Packet size: 144
0... .... .... .... = Multipacket: False
Opcode: 4 (Info)
Flags: 0x0c (ignore)
Sequence: 90 Sequence number for Info packets
Device ID: d47920
Info:
0010 0c 22 Firmware version
17 df Status port
ef fe 32 7b Status IP
06 00 Product ID
01 Variant ID
02 Protocol version
02 00 Flags
00 00 Dante process ID
0020 00 1d c1 ff fe 20 79 d4 Dante ID
44 41 52 4b 31 36 31 36 Host name
0030 2d 32 30 37 39 64 34 00 00 00 00 00 00 00 00 00
0040 00 00 00 00 00 00 00 00
44 41 52 4b 31 36 31 36 Friendly name
0050 2d 32 30 37 39 64 34 00 00 00 00 00 00 00 00 00
0060 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 Domain name
0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0080 00 00 00 00 00 00 00 00
00 21 DNT version
00 00 DFU2 version
00 00 00 00 reserved
Firmware version: 0x220c Version of the main DFU firmware file (2.2.12)
Status port: 6111 The port to which the device sends multicast packets
Status IP: 239.254.50.123 The multicast group address the device sends to
Product ID: 6 (DARK1616M) Product identifier (6 = DARK1616M)
Variant ID: 1 Product variant
Protocol version: 2 Network protocol version
Flags: 0x0002
.... .... .... ...0 = DNT updateable: False Capability to update the main DNT file online (no)
.... .... .... ..1. = DFU updateable: True Capability to update the main DFU file online (yes)
.... .... .... .0.. = DFU2 updateable: False Capability to update the secondary DFU file online (no)
Dante process ID: 0x0000 (Audinate process ID, in practice always zero)
Dante ID: 0x001dc1fffe2079d4 Globally unique device identifier
Host name: DARK1616-2079d4 Fixed device name
Friendly name: DARK1616-2079d4 User-assignable device name
Domain name: Dante domain name (none)
DNT version: 0x2100 DNT file version (2.1.0)
DFU2 version: 0x0000 Secondary DFU file version (unused)
If the host controller wants to keep the device connected it should send it messages (other than GetInfo) at least every 5-6 seconds. While connected, the device sends periodic Status messages and state change reports to the controller. If the device doesn't receive a message (other than GetInfo) for 7 seconds it disconnects and stops sending any data.
Typically a controller sends a GetConfig message every 5-6 seconds as keepalive, because the Config response indicates the connection state. The GetConfig message also contains bits that indicate whether the controller wishes to establish an exclusive connection and whether it wants the Status messages sent 10 times per second or once per second.
If the controller prefers to send ad-hoc commands to the device it doesn't need to keep the device connected. Sending any command, other than GetInfo, will set the device in Connected state (if access is granted) for 7 seconds.
The device responds with a Config message, which contains bits indicating the connection state.
1) Host controller sends a GetConfig command to the device.
------------------------------------------------------
0000 47 53 20 43 74 72 6c 00 10 00 07 01 90 09 89 03 GS Ctrl.........
------------------------------------------------------
GS Header:
Magic: 4753204374726c00
Size: 0x0010 (Payload 0 bytes)
.000 0000 0001 0000 = Packet size: 16
0... .... .... .... = Multipacket: False
Opcode: 7 (GetConfig)
Flags: 0x01
.... ...1 = Exclusive: True Desired exclusive connection (unicast responses)
.... ..0. = No meter: False Desired Status period of 10 Hz
Controller ID: 0x03890990
2) Device responds with a Config message.
------------------------------------------------------
0000 47 53 20 43 74 72 6c 00 18 00 06 0d 01 02 00 2c GS Ctrl.........
0010 ef fe 32 7b 17 df 00 00 ..2{....
------------------------------------------------------
GS Header:
0000 47 53 20 43 74 72 6c 00 18 00 06 0d 01 02 00 2c
Magic: 4753204374726c00 Can be XORed with a 8-byte password value
Size: 0x0018 (Payload 8 bytes)
.000 0000 0001 1000 = Packet size: 24
0... .... .... .... = Multipacket: False
Opcode: 6 (Config)
Flags: 0x0d
.... ...1 = Exclusive: True Device is in Exclusive connection mode
.... .1.. = Password valid: True Password used in GetConfig was valid
.... 1... = Access granted: True Access granted to this host controller
Sequence: 1 Sequence number for Config packets
Device ID: 02002c
Config:
0010 ef fe 32 7b Status IP, if in Shared mode
17 df Status port, if in Shared mode
00 00 reserved
Status IP: 239.254.50.123
Status port: 6111
When the device is in Connected state it sends periodic Status messages. In Exclusive connection mode it unicasts the packets to the host controller which has the connection granted. In Shared connection mode the device multicasts the packets to the group address and port indicated in the Config message.
The frequency of the Status messages is controlled by the NoMeter bit in the GetConfig command. If the bit is cleared, the device sends Status 10 times per seconds. This is useful if the host controller displays live audio metering data provided in the Status messages. If NoMeter is set, the device sends Status once per second.
------------------------------------------------------
0000 47 53 20 43 74 72 6c 00 40 00 01 00 5a d4 79 20 GS Ctrl.@...Z.y
0010 02 00 00 00 00 01 01 00 01 0d 00 00 cc c6 b8 b4 ................
0020 b5 b9 b5 b5 b7 b7 b7 b8 b7 b8 b8 b8 fd fd fd fd ................
0030 fd fd fd fd fd fd fd fd fd fd fd fd 00 00 00 00 ................
------------------------------------------------------
GS Header:
0000 47 53 20 43 74 72 6c 00 40 00 01 00 5a d4 79 20
Magic: 4753204374726c00
Size: 64 (Payload 48 bytes)
.000 0000 0100 0000 = Packet size: 64
0... .... .... .... = Multipacket: False
Opcode: 1 (Status)
Flags: 0x00
Sequence: 90
Device ID: d47920
GS Status:
0010 02 00 00 00 Flags
00 Preset report generation
01 Device report generation
01 In channel names report generation
00 Out channel names report generation
Flags: 0x00000002
.... .... .... .... .... .... .... ...0 = Identify: False
.... .... .... .... .... .... .... ..1. = Clock locked: True
Preset rep. gen.: 0
Device rep. gen.: 1
In ch. names rep. gen.: 1
Out ch. names rep. gen.: 0
DARK1616M Status:
0010 01 IO board report generation
0d Mic input board report generation
00 00 reserved
cc c6 b8 b4 Meters
0020 b5 b9 b5 b5 b7 b7 b7 b8 b7 b8 b8 b8 fd fd fd fd
0030 fd fd fd fd fd fd fd fd fd fd fd fd
00 AES3 lock states
00 Selected inputs
00 00 reserved
IO board rep. gen.: 1
Mic board rep. gen.: 13
Meters: ccc6b8b4b5b9b5b5b7b7b7b8b7b8b8b8fdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfd
AES3 lock states: 0x00
.... ...0 = AES3 In 1-2: False
.... ..0. = AES3 In 3-4: False
.... .0.. = AES3 In 5-6: False
.... 0... = AES3 In 7-8: False
...0 .... = AES3 In 9-10: False
..0. .... = AES3 In 11-12: False
.0.. .... = AES3 In 13-14: False
0... .... = AES3 In 15-16: False
Selected inputs: 0x00
.... ...0 = In 1-2: 0 (Analogue)
.... ..0. = In 3-4: 0 (Analogue)
.... .0.. = In 5-6: 0 (Analogue)
.... 0... = In 7-8: 0 (Analogue)
...0 .... = In 9-10: 0 (Analogue)
..0. .... = In 11-12: 0 (Analogue)
.0.. .... = In 13-14: 0 (Analogue)
0... .... = In 15-16: 0 (Analogue)
Audio meter values are in Dante format. The value is interpreted as the number of half-decibel steps below 0 dBFS. For example:
00 = 0 dBFs
01 = -0.5 dBFS
02 = -1 dBFs
...
fe = -127 dBFs
ff is reserved
Audio meters ordering for DARK1616M:
0-15: Dante Out 0-15
16-31: Dante In 0-15
If the device is in Connected state it sends a report whenever its internal state has changed, or as a response to an explicit Query message. The internal state may change as a result of a user manually operating the units UI, a command received from a controller, or an independent event.
Reports are sent using one or more packets of type Report. If the message size is greater than the packet size the Multipacket bit is set in the GS header and the message has to be re-assembled from multiple packets (DARK1616M only sends single-packet messages). A Report message may contain one or more reports. Each report is prefixed with a Block Header indicating its type and size.
The example below shows the full report, consisting of a Device, Input Channel Names, Output Channel names and DARK1616M-specific reports (type 4 and 5). In practice, the device can send any of these reports in any combination, so the host controller must parse the message and extract the reports from it.
------------------------------------------------------
0000 47 53 20 43 74 72 6c 00 a4 00 0a 00 5b d4 79 20 GS Ctrl.....[.y
0010 01 01 04 00 80 bb 00 00 00 00 00 00 00 00 00 00 ................
0020 15 00 00 00 02 01 05 00 02 30 31 02 30 32 00 00 .........01.02..
0030 00 00 00 00 00 00 00 00 00 00 00 00 03 00 04 00 ................
0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0050 04 01 01 00 01 00 00 00 05 0d 12 00 00 05 0f 11 ................
0060 00 05 08 00 00 05 08 00 00 05 08 00 00 05 08 00 ................
0070 00 05 08 00 00 05 08 00 00 05 08 00 00 05 08 00 ................
0080 00 05 08 00 00 05 08 00 00 05 08 00 00 05 08 00 ................
0090 00 05 08 00 00 05 08 00 00 05 08 00 a5 aa aa aa ................
00a0 01 00 00 00 ....
------------------------------------------------------
GS Header:
0000 47 53 20 43 74 72 6c 00 a4 00 0a 00 5b d4 79 20
Magic: 4753204374726c00
Size: 164 (Payload 148 bytes)
.000 0000 1010 0100 = Packet size: 164
0... .... .... .... = Multipacket: False
Opcode: 10 (Report)
Flags: 0x00
Sequence: 91
Device ID: d47920
Block Header:
0010 01 Type
01 Generation
04 00 Length in words
Type: 1 (Device)
Generation: 1
Length in words: 4 (16 bytes)
Device Report:
0010 80 bb 00 00 Sample rate in Hz
00 Srate choice (N.A. for DARK1616M)
00 Clock source (N.A. for DARK1616M)
00 Clock source choice (N.A. for DARK1616M)
00 ADC filter code
00 DAC filter code
00 00 00 reserved
0020 15 00 00 00 Flags
Sample rate: 48000
Sample rate choice: 0 (Unknown)
Clock source: 0 (Dante)
Clock source choice: 0 (Dante)
ADC filter: 0 (Normal)
DAC filter: 0 (Normal)
Flags: 0x00000015
.... .... .... .... .... .... .... ...1 = Link 1: True
.... .... .... .... .... .... .... ..0. = Link 2: False
.... .... .... .... .... .... .... .1.. = PSU 1: True
.... .... .... .... .... .... .... 0... = PSU 2: False
.... .... .... .... .... .... ...1 .... = POE 1: True
.... .... .... .... .... .... ..0. .... = POE 2: False
ADC filter codes:
0: Normal
1: Slow roll-off
DAC filter codes:
0: Normal
1: Slow roll-off
2: Short delay
Block Header:
0020 02 Type
01 Generation
05 00 Length in words
Type: 2 (In Channel Names)
Generation: 1
Length in words: 5 (20 bytes)
In Channel Names Report:
0020 02 30 31 02 30 32 00 00 In channel names
0030 00 00 00 00 00 00 00 00 00 00 00 00
Block Header:
0030 03 Type
00 Generation
04 00 Length in words
Type: 3 (Out Channel Names)
Generation: 0
Length in words: 4 (16 bytes)
Out Channel Names Report:
0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Out channel names
Block Header:
0050 04 Type
01 Generation
01 00 Length in words
Type: 4 (DARK1616M 4)
Generation: 1
Length in words: 1 (4 bytes)
Inputs report:
0050 01 00 00 00
Input choices: 0x0001
.... .... .... ..01 = In 1-2 choice: 1 (Analogue)
.... .... .... 00.. = In 3-4 choice: 0 (Auto)
.... .... ..00 .... = In 5-6 choice: 0 (Auto)
.... .... 00.. .... = In 7-8 choice: 0 (Auto)
.... ..00 .... .... = In 9-10 choice: 0 (Auto)
.... 00.. .... .... = In 11-12 choice: 0 (Auto)
..00 .... .... .... = In 13-14 choice: 0 (Auto)
00.. .... .... .... = In 15-16 choice: 0 (Auto)
Input type choices:
0: Auto (digital if AES3 is locked, analogue otherwise)
1: Analogue
2: Digital
Block Header:
0050 05 Type
0d Generation
12 00 Length in words
Type: 5 (DARK1616M 5)
Generation: 13
Length in words: 18 (72 bytes)
Mic inputs report:
0050 00 05 0f 11 Mic input gains
0060 00 05 08 00 00 05 08 00 00 05 08 00 00 05 08 00
0070 00 05 08 00 00 05 08 00 00 05 08 00 00 05 08 00
0080 00 05 08 00 00 05 08 00 00 05 08 00 00 05 08 00
0090 00 05 08 00 00 05 08 00 00 05 08 00
Gains: 00050f110005080000050800000508000005080000050800000508000005080000050800…
CH1 Gains: 00050f11 (rsv: 0, line: 5, mic: 15, mic+phantom: 17)
CH2 Gains: 00050800
CH3 Gains: 00050800
CH4 Gains: 00050800
CH5 Gains: 00050800
CH6 Gains: 00050800
CH7 Gains: 00050800
CH8 Gains: 00050800
CH9 Gains: 00050800
CH10 Gains: 00050800
CH11 Gains: 00050800
CH12 Gains: 00050800
CH13 Gains: 00050800
CH14 Gains: 00050800
CH15 Gains: 00050800
CH16 Gains: 00050800
Each mic input channel uses four gain indices - one per analogue input mode:
0: reserved
1: Line mode gain index byte
2: Mic mode gain index byte
3: Mic+Phantom mode gain index byte
For example, a gain value word 00050f11 indicates the following gain indices:
reserved: 0x00
Line mode: 0x05 (5) or +6dB
Mic mode: 0x0f (15) or +55dB
Mic_Phantom mode: 0x11 (17) or +61dB
The actual gain in dB has a step of 3 dB and the ranges are as follows:
Line: -9dB to +9dB
Mic: +10dB to +61dB
Mic+Phantom: +10dB to +61dB
0090 a5 aa aa aa Analogue input modes
.... .... .... .... .... .... .... ..01 = In 1 mode: 1 (Line)
.... .... .... .... .... .... .... 01.. = In 2 mode: 1 (Line)
.... .... .... .... .... .... ..10 .... = In 3 mode: 2 (Mic)
.... .... .... .... .... .... 10.. .... = In 4 mode: 2 (Mic)
.... .... .... .... .... ..10 .... .... = In 5 mode: 2 (Mic)
.... .... .... .... .... 10.. .... .... = In 6 mode: 2 (Mic)
.... .... .... .... ..10 .... .... .... = In 7 mode: 2 (Mic)
.... .... .... .... 10.. .... .... .... = In 8 mode: 2 (Mic)
.... .... .... ..10 .... .... .... .... = In 9 mode: 2 (Mic)
.... .... .... 10.. .... .... .... .... = In 10 mode: 2 (Mic)
.... .... ..10 .... .... .... .... .... = In 11 mode: 2 (Mic)
.... .... 10.. .... .... .... .... .... = In 12 mode: 2 (Mic)
.... ..10 .... .... .... .... .... .... = In 13 mode: 2 (Mic)
.... 10.. .... .... .... .... .... .... = In 14 mode: 2 (Mic)
..10 .... .... .... .... .... .... .... = In 15 mode: 2 (Mic)
10.. .... .... .... .... .... .... .... = In 16 mode: 2 (Mic)
Analogue input modes:
0: reserved
1: Line
2: Mic
3: Mic+Phantom
00a0 01 00 00 00 Input channel pairings
.... ...1 = In 1-2 pairing: 1 (Stereo)
.... ..0. = In 3-4 pairing: 0 (Mono)
.... .0.. = In 5-6 pairing: 0 (Mono)
.... 0... = In 7-8 pairing: 0 (Mono)
...0 .... = In 9-10 pairing: 0 (Mono)
..0. .... = In 11-12 pairing: 0 (Mono)
.0.. .... = In 13-14 pairing: 0 (Mono)
0... .... = In 15-16 pairing: 0 (Mono)
Commands are contained in messages with opcode 3 (SetControl). A SetControl message may include one or more commands. The message header indicates the desired connection type and status update frequency.
The structure of a SetControl message is:
GS Header
Command
Command
... (up to the packet capacity)
------------------------------------------------------
0000 47 53 20 43 74 72 6c 00 14 00 03 01 b1 ee 2f 01 GS Ctrl......./.
0010 05 00 0e 00 ....
------------------------------------------------------
GS Header:
0000 47 53 20 43 74 72 6c 00 14 00 03 01 b1 ee 2f 01
Magic: 4753204374726c00
Size: 20 (Payload 4 bytes)
.000 0000 0001 0100 = Packet size: 20
0... .... .... .... = Multipacket: False
Opcode: 3 (SetControl)
Flags: 0x01
.... ...1 = Exclusive: True
.... ..0. = No meter: False
Controller ID: 0x012feeb1
Command:
0010 05 Opcode
00 Channel index
0e Gain index
00 reserved
Opcode: 5
Channel: 0 0 to 15
Gain: 14 In Line input mode: 0 to 6, other modes 0 to 17
The Input Gain Index command sets the gain index for the selected input and for the currently selected analogue input mode. For example, if the input is currently in Mic mode, the gain index is set for the Mic mode only.
The range of analogue input gain indices depends on the input mode:
Line: 0 to 6
Mic: 0 to 17
Mic+Phantom: 0 to 17
The actual gain in dB has a step of 3 dB and the ranges are as follows:
Line: -9dB to +9dB
Mic: +10dB to +61dB
Mic+Phantom: +10dB to +61dB
------------------------------------------------------
0000 47 53 20 43 74 72 6c 00 14 00 03 01 b1 ee 2f 01 GS Ctrl......./.
0010 06 00 02 00 ....
------------------------------------------------------
Command:
0010 06 Opcode
00 Channel index
02 Input mode
00 reserved
Opcode: 6
Channel: 0 0 to 15
Mode: 2 (Mic) 1 to 3
Analogue input modes:
0: reserved
1: Line
2: Mic
3: Mic+Phantom
------------------------------------------------------
0000 47 53 20 43 74 72 6c 00 14 00 03 01 b1 ee 2f 01 GS Ctrl......./.
0010 07 00 00 00 ....
------------------------------------------------------
Command:
0010 07 Opcode
00 Channel pair index
00 Input type choice
00 reserved
Opcode: 7
Ch. pair: 0 0 to 7
Choice: 0 (Auto) 0 to 2
Input type choices:
0: auto (digital if AES3 is locked, analogue otherwise)
1: analogue
2: digital
------------------------------------------------------
0000 47 53 20 43 74 72 6c 00 14 00 03 01 b1 ee 2f 01 GS Ctrl......./.
0010 08 00 00 00 ....
------------------------------------------------------
Command:
0010 08 Opcode
00 Channel pair index
00 Pairing
00 reserved
Opcode: 8
Ch. pair: 0 0 to 7
Pairing: 0 (Mono) 0 or 1
Channel pairing codes:
0: Mono
1: Stereo
Updated: 19/Jun/2023