Hi Derek,

a couple of comments below that will make your application a little more robust.

On 17/03/2019 23:46, Derek Turner via wsjt-devel wrote:
I do it for real time LOTW uploads in my helper program.

You must only look at type 12 packets.
This is a good way to easily capture logged QSO data, particularly if you already ADIF parsing routines, which should be fundamental to any logging application.

Byte eleven of the UDP byte array contains the message type.

That's not quite correct, bytes 9 through 12 contain the message type as a 32-bit unsigned number in normal network byte order. You may be referring to byte index 11 counting from zero as value 12, but this will also be the same value for message type 268 (and others), Ok that doesn't exist currently but it may at some point.

Anyway, see below for a safe option.


The first RX message in your debug is a type five broadcast. Your ????? strings contain Qt types and you would have to decode them back to the same logging ADIF string. The type 12 does it for you.
It is more than an ADIF string, it is whole ADIF file which you can take advantage of if you do not want to be troubled with binary valued fields like the message type. Instead you can simply ignore all UDP datagrams until you see one starting with 4 hex bytes 0xadbccbda (ok, that is binary but you only need to check for a fixed value) and also containing the character string "<EOH>". Then everything following the <EOH> string up to the end of the datagram is a single ADIF record of the logged QSO.

If you do .Send(new byte[] { 1 } to WSJT it will not understand it. Incoming packets need a precise format starting with the magic number and then the ID etc. In any case for your purpose there is no need to have a dialog with WSJT.

Correct, there is no reply to be sent to a WSJT-X instance. This is a UDP protocol and delivery is not guaranteed (although virtually 100% reliable on a local network loopback or same subnet destination). WSJT-X dispatches the UDP messages and moves on, there is no connected protocol, there is no way to detect a missed message, nor any way to request a repeat.

73
Bill
G4WJS.

_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to