What ports and protocol is used over the network?

578 views
Skip to first unread message

Kurt V.

unread,
Aug 16, 2023, 4:24:14 AM8/16/23
to Hermes-Lite
Hi all,

I try to dig into the thetis software manual, but I cannot find information regarding what TCP or UDP ports are used to communicate back and forth between the computer and the HL2 ethernet port. 
Is it using UDP? Is it using TCP? What port numbers are used between the HL2 server and the client? 

Knowing this information would be interesting to add priority over the network for these ports and protocol. 

Thanks

Alan Hopper

unread,
Aug 16, 2023, 4:41:11 AM8/16/23
to Hermes-Lite
Hi Kurt,
the details can be found here  Protocol · softerhardware/Hermes-Lite2 Wiki (github.com) and in the link to Metis near the top.
Basically it is UDP sent to port 1024 on the radio, the port at the computer side is generally random but Thetis may not be.
73 Alan M0NNB

"Christoph v. Wüllen"

unread,
Aug 16, 2023, 5:35:43 AM8/16/23
to Kurt V., herme...@googlegroups.com
The port at the PC side is not really "random", it is operating system assigned.
No one needs to know this. When the first (discovery) packet arrives at the
HL2, it simply has to look at the "from" address/port and will send all UDP
packets to that address/port.
> --
> You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/74f36dcb-2e27-4228-9109-cade869d297cn%40googlegroups.com.

ron.ni...@gmail.com

unread,
Aug 16, 2023, 4:17:38 PM8/16/23
to Hermes-Lite
The protocol documentation is on GitHub, but it took me awhile to assemble all the pieces scattered between the different documents.
So here's my rough summary.

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

Pez

unread,
Aug 17, 2023, 1:47:00 AM8/17/23
to Hermes-Lite
That's a great rundown Ron. 

Some extra information for the group: the latest Thetis HL2 Beta 5 and the latest SDR Console beta both allow sending a Directed UDP packet to a user defined IP and Port number (not just the default UDP 1024). This is extremely useful when accessing multiple HL2's remotely over WAN using NAT/port forwarding, for example...

Thetis HL2 Beta 5, and SDR Console beta are also allowing the FIFO TX Buffer to be set up to 70ms, and PTT Hang to around 30 or 40ms. Both help a lot with reducing the TX relay chatter. 

Also as a side note, Thetis currently uses a LOT more bandwidth to operate than SDR Console does, at the same sample rates. My assumption is that PS, or the Multi RX feature, or maybe some 'legacy' audio transport has something to do with it? (maybe Thetis is asking for multiple RX slices, even if it only needs 1 slice, at the time?...) 

unnamed.png

73



Kurt V.

unread,
Aug 19, 2023, 5:23:34 PM8/19/23
to Hermes-Lite
I get a heavy 41,5 Mb/s on my network between my computer and the HL2 when using Thetis. And about 25Mb/s when using SDR Console. 
How come there is 16Mb/s more when using Thetis. Why can't they optimize the bandwidth like with SDR console. 

Steve Haynal

unread,
Aug 19, 2023, 6:13:50 PM8/19/23
to Hermes-Lite
Hi All,

Does Thetis always enable the ep4 (full spectrum data) whether it is used or not? That could explain the extra bandwidth seen. Other software turns off the ep4 data if not in use.

73,

Steve
kf7o
Reply all
Reply to author
Forward
0 new messages