An HL2 either gets given a DHCP address by a router, or self assigns itself an IP address of 169.254.19.221 (changeable).
HL2 Discovery:
The SDR app can either do a UDP broadcast to an interface, or send a directed UDP packet, of 63 bytes to port 1024.
The format of the 63 bytes is described in the Metis pdf, but is mostly empty.
If the HL2 is present, it responds with a UDP packet back to the SDR app of 60 bytes, containing its MAC address and some version numbers.
The format of the 60 bytes of return data is described in the Metis pdf, but is mostly empty.
HL2 Start/Stop:
A UDP packet of 64 bytes sent by the SDR app to port 1024, format described in the Metis pdf, starts the HL2.
There's a similar UDP command packet with 1 byte difference to stop streaming.
When running:
The HL2 continuously sends UDP packets of length 1032 back to the SDR app at a rate of 1 or more every 2.625 mS.
The 1032 bytes contain a header of 8 bytes described in the Metis pdf, and 2 chunks of 512 bytes. The format of those 512 byte chunks is described in the OpenHPSDR Protocol 1 documentation for an older USB interface method. Each 512 byte chunk contains 63 padded 12-bit IQ samples, plus some other command data, plus a lot of padding for Hermes stuff that are unused by the HL2.
When transmitting IQ data, the SDR app sends 1032 byte UDP packets to port 1024 every 2.625 mS (keeping pace with the receive packets).
The transmit packets contain two 512 byte chunks, which each contain various commands, plus 63 IQ samples. There is again a lot of unused padding.
If the transmit packets are delayed by more than somewhere between 20 and 40 mS or so (depending on FIFO settings), the HL2 will drop out of transmit and maybe restart transmitting when delayed packets start arriving again. This causes the relays to chatter, and a chopped up transmit signal.
When receiving, but not transmitting, some minimum rate of sending 1032 byte UDP packets to port 1024 must be maintained by the SDR app to keep the HL2 from dropping out of run mode, due to an FPGA gateware watchdog timer time out. (Question: What is this minimum rate ?)
Both the transmit and receive data packets of 1032 bytes contain a 4 byte sequence number. I think the HL2 ignores the sequence.
My SDR tracks the sequence numbers to indicate the number and/or rate of network errors (missing or out-of-sequence packets).
Hope this helps.
73,
Ron
n6ywu