1. First checks

  1. Set "localIP": "?" (or "remoteIP": "?") once. The driver prints a table of the machine's network adapters (adapter name, IP address, IPv4/IPv6, UP/DOWN) and is discarded (no socket is opened) — copy the address of the NIC that is cabled to the other device, then put it back.
  2. Check that the engine PC and the other device are in the same subnet (for example 192.168.10.x / 255.255.255.0) and that ping works in both directions. UDP has no connection, so a wrong IP gives no error on the receive side — just silence.
  3. Check the block counters of the input block in DIPanel or System Layout: msgCounter rising = datagrams / messages are accepted; errCounter rising = size mismatch or read errors.
  4. Look at the traffic outside the engine: Wireshark on the engine PC (or the Sniffer driver) shows whether the packets reach the NIC at all. If they are visible there but the stream receives nothing, suspect the firewall (section 4) or the wrong localIP / localPort.
  5. Make sure the input blocks use "framePerMS": -1 (see the note on framePerMS).

2. Message reference

In all messages <name> is the stream / driver name, <ip> and <port> are the configured values.

2.1 UDPSocketDriver

MessageCauseWhat to do
UDPSocketDriver: <name> created with setup : remote <ip>:<port> send from <ip>:<port> local <ip>:<port> [multicast group <ip>] [(one socket for send and receive)] sndbuf <n>KB rcvbuf <n>KB (info)Normal start-up report. Only the parts that are configured appear: remote = send target, send from = local address the sending socket is bound to (sendFromIP / sendFromPort), local = receive address. sndbuf / rcvbuf is the buffer size the OS really gave; (OS limit) means it is smaller than sendBufferKB / recvBufferKB.Compare it with what you intended. A missing local part means localPort is 0, so nothing is received; a missing remote part means remoteIP is empty, so nothing can be sent. On Linux raise net.core.rmem_max / wmem_max for (OS limit).
UDPSocketDriver: <name> 'remoteIPBind' / 'remotePortBind' are deprecated, use 'sendFromIP' / 'sendFromPort' (warning)The old key names are used. They still work.Rename them in streams.json.
UDPSocketDriver: <name> WSAStartup failed with error: <code>Windows could not initialize Winsock.Rare. Reboot, check that the network stack / Winsock is not damaged (netsh winsock reset from an administrator prompt).
UDPSocketDriver: <name> invalid remoteIP / sendFromIP / localIP '<text>'
multicastGroup '<ip>' is not a multicast address
The text is neither a dotted IPv4 address nor a resolvable host name (a typo is no longer turned into 255.255.255.255), or the group is outside 224.0.0.0 - 239.255.255.255. Addresses are resolved once at start.Correct the address.
UDPSocketDriver: <name> socket() failed, error <code>: <text>
Could not create socket <ip>:<port>, ...
The operating system refused to create the UDP socket (out of handles, network stack disabled, security software).Close unused programs, check antivirus / endpoint-security products that block sockets.
UDPSocketDriver: <name> Bind failed, address in use <ip>:<port> (Windows 10048)Another socket (another stream, another CoreEngine instance, another program) already owns that address and port. Printed for sendFromIP:sendFromPort and for localIP:localPort.Find the owner with netstat -ano -p udp | findstr :<port>, then stop it or change the port. Two streams must not receive on the same localPort of the same IP, unless reuseAddress is true.
UDPSocketDriver: <name> Bind failed <ip>:<port>, error <code>: <text>Bind failed for another reason. Typical: 10049 / EADDRNOTAVAIL = the IP address does not belong to any NIC of this PC (wrong address, cable unplugged, adapter DOWN); 10013 / EACCES = access denied (port reserved, or a port below 1024 on Linux without root).Run discovery with "?" and use an address from the list. Use localIP: "" (empty) to listen on all adapters. Use a port above 1024.
UDPSocketDriver: <name> non blocking setup failed ..., SO_REUSEADDR / SO_SNDBUF / SO_RCVBUF / SO_BROADCAST / IP_MULTICAST_IF / IP_MULTICAST_TTL / IP_MULTICAST_LOOP failed, error ..., SO_BINDTODEVICE failed, join multicast group failed, ...The kernel refused a socket option from streams.json. SO_BINDTODEVICE needs root or CAP_NET_RAW and an existing interface name. A group join fails when the adapter has no multicast support or the interface address is wrong.Fix the key or remove it. No socket is left open after a failed start; the status of the driver shows the text.
UDPSocketDriver: <name> recv failed. message too large (check stream block size, current is <bytes> bytes)A datagram arrived that is bigger than the input block (single-input-block fast path, or the buffer of Recv). It is reported on both Windows and Linux and the datagram is dropped; it is never delivered cut.Make the block as large as the biggest datagram the sender produces (header and trailer included), or fix the sender. See section 3.
UDPSocketDriver: <name> recv failed with error <code>: <text>Any other receive error. The Windows "connection reset" (10054) caused by ICMP port-unreachable no longer occurs: the driver switches it off on its sockets.Check the earlier start-up messages; the socket was not created or bound.
UDPSocketDriver: <name> sendto() failed with error <code>: <text>The datagram could not be sent. Typical: 10051 / 10065 = network / host unreachable (wrong subnet, cable out, no route); 10013 / EACCES = a send to a broadcast address without "broadcast": true, or a firewall; 10040 / EMSGSIZE = the datagram is larger than the maximum UDP size (65507 bytes).Use the receiver's unicast address, or set broadcast. Check the route with route print. Keep output blocks well below 65507 bytes (see MTU).
(no message) datagrams missing at the receiver, sendWouldBlock counts upThe send socket is non-blocking: when the OS send buffer is full the datagram is dropped instead of stalling the frame thread.Raise sendBufferKB, send less often, or check that the network keeps up.
UDPSocketDriver: '<name>' not initialized (no valid remoteIP) / send socket not openA send was attempted but there is no valid destination or the start failed.Make sure remoteIP is set for a stream that has output blocks, and look for an earlier start-up error.
UDPSocketDriver: <name> 'remoteIP' value '...' is too long (max 31 characters), truncated / port <n> is out of range 0..65535A streams.json value is too long or out of range.Correct the value.

2.2 TCPSocketDriver

MessageCauseWhat to do
TCPSocketDriver: '<name>' client to <ip>:<port> [from <ip>:<port>] server listening <ip>:<port> (max <n> clients) (info)Start-up report: which roles are active (remotePort = client, localPort = server).Compare it with what you intended.
TCPSocketDriver: '<name>' remoteIP is required when remotePort is set
invalid remoteIP / sendFromIP / localIP '<text>'
The address is empty (client) or is neither a dotted IPv4 address nor a resolvable host name. An empty remoteIP is no longer replaced by 255.255.255.255.Set the address of the server, or fix the typo.
TCPSocketDriver: '<name>' connect to <ip>:<port> failed, error <code>: <text> (retry every <n> ms) (error, counted once)The attempt failed: connection refused (nobody listens on that port; Windows 10061, Linux ECONNREFUSED), host / network unreachable, blocked by a firewall, or timed out (connectTimeoutMs). The driver keeps trying.Start the server, check IP and port, ping, and Test-NetConnection <ip> -Port <port> in PowerShell. No engine reset is needed; the connection is made as soon as the server is reachable.
TCPSocketDriver: '<name>' connect to ... failed, bind to <ip>:<port> (sendFromIP / sendFromPort) failedsendFromIP is not an address of this PC, or sendFromPort is in use.Use an address from the "?" list; leave sendFromPort 0.
TCPSocketDriver: '<name>' connected to <ip>:<port> (info)Client connection established (also after every reconnect).Normal.
TCPSocketDriver: '<name>' bind failed <ip>:<port>, error <code>: <text>Server mode (localPort set): the port is already in use by another program / another CoreEngine (Windows 10048), or localIP is not an address of this PC (10049), or the port needs administrator rights.Check with netstat -ano -p tcp | findstr :<port>. Use localIP: "" to listen on all adapters. The client part of the driver keeps working, and the server tries again every reconnectMs (the message is counted, not repeated): it starts listening as soon as the adapter is up or the port is free, and logs server listening on port .... The driver status shows the bind error until then.
TCPSocketDriver: '<name>' listen failed ... / server socket() failed ...The operating system refused the server socket.Reset the engine; check security software and the number of open handles.
TCPSocketDriver: '<name>' client connected <ip>:<port> (info)A client connected to the server socket.Normal.
TCPSocketDriver: '<name>' client <ip>:<port> refused, maxClients (<n>) reached (warning)More clients connected than maxClients allows; the new one was closed at once.Raise maxClients or disconnect a client.
TCPSocketDriver: '<name>' server accept failed on port <port>, error ...An accept error. The server keeps listening and tries again (it no longer stops accepting).If it repeats, check that nothing closes the listening socket (security software).
TCPSocketDriver: '<name>' connection <ip>:<port> closed: closed by the peer / error <code>: ... (warning)The other side closed the connection, reset it, or the network dropped it (keep-alive timeout). The connection is removed; the input blocks' errCounter is incremented once. A client reconnects by itself.Restart / fix the peer. See section 5.

2.3 Stream messages (UDP and TCP)

MessageCauseWhat to do
Streams: '<name>' block '<block>' header '<hex>' size <N> mismatched with received <M> (error, UDP)A datagram started with the headerMarker of the block, but its length is different from the block size. The block's errCounter is incremented and the datagram is dropped. Note: in the current source the two numbers are printed the other way round: <N> is the length of the datagram that arrived and <M> is the block size from the configuration.See section 3.
Streams: '<name>' Unknown header '<hex>' length <N> (error, UDP)Several input blocks are defined and the first bytes of a datagram match none of their headerMarkers. <hex> shows the first (up to 4) bytes of the datagram, <N> its total length.See section 3.
Streams: '<name>' message size mismatched
Unknown header '<hex>' length <N>
(error, TCP)
TCP is a byte stream. After a block was complete, the stream scanned forward byte by byte for the next headerMarker; <N> bytes were skipped. <hex> shows only the first 4 of the skipped bytes.See section 3.

3. "message size mismatched" / "Unknown header"

UDP — every datagram is one message. The stream compares the first bytes of the datagram with the headerMarker of each input block (blocks with "framePerMS": 0 are skipped). A matching block is filled only if the datagram length is exactly the block size; otherwise you get the size mismatched message above. A block with no headerMarker takes every datagram (and stops the search), so it should be the only input block of the stream. If no block matches you get Unknown header ... length N, where N is the datagram length.

TCP — the stream is cut into blocks using the block sizes and header markers. A block that arrives in several pieces is assembled from the following reads and published whole. One message is published per frame (maxMessagesPerRead, default 1): when several messages arrive together they follow in the next frames, so none is overwritten before a model or the block recorder has seen it. A header cut between two reads is recognised when the next read arrives. Bytes that do not start a known header are skipped one by one and reported as Unknown header ... length N once the next header is found (or after 1024 skipped bytes); N is how many bytes were skipped. A TCP stream with one input block and no headerMarker is cut by size: every rawSizeBytes bytes are one message, however TCP splits or merges them. With more than one input block every block needs a headerMarker (an error is reported at start when one is missing). After a lost connection the half received message is dropped.

CauseHow to recognize itFix
Block size in the ICD does not match the message: the sender's message is longer or shorter than the block (header included).The same N every time. UDP: always the same pair of numbers; TCP: always the same small skip (for example 2 = a trailing checksum or CR/LF that is not part of the block).Make the block size equal the exact message length, header and trailer included. The difference between the numbers is the missing / extra bytes.
Several messages in one datagram (some senders pack a few messages in one UDP packet) or one message split over several datagrams.UDP: the datagram length is a multiple (or a part) of the block size.UDP is one block per datagram: make the sender send one message per datagram, or define the block as the whole packet. For TCP this is not a problem.
Wrong or missing headerMarker: the header bytes (or their byte order) differ from the configuration; or the header also appears inside the payload (TCP)."Unknown header" with a changing <hex>; the first bytes shown are the real header of the message — compare them with the configured headerMarker.Copy the header from the printed hex or from a Wireshark capture. Use _ for bytes that vary. Use a longer, unique header. Add a CRC check in a PostReceiveAccept hook.
Datagram bigger than the block (single input block).recv failed. message too large instead of the messages above.Increase the block size or fix the sender.
Datagram smaller than the block (single input block, no header).No message at all: the block is accepted and only the received bytes are updated, the rest keeps its old values.Make sure the block size equals the sender's datagram size; add a headerMarker so wrong packets are rejected.
Another program sends to the same port (a second sender, a broadcast discovery protocol, a test tool).Unknown headers with a different length than your messages.Give your stream its own port; bind localIP to the specific NIC; find the sender with Wireshark (filter udp.port == <port>).
TCP: data arrives late because the engine reads too slowly: every minor frame the stream reads up to 16 times (64 KB or the biggest input block per read) until the socket is empty; a sender that produces more than that per frame fills the OS buffer and is throttled by TCP flow control.Mismatches appear only at high data rates; growing latency.Use "framePerMS": -1 on the input blocks, raise the minor-frame rate, or have the sender send less often.
TCP start: the first bytes after connecting are the middle of a message.One message at start only.Ignore; the stream re-synchronizes on the next header.

4. Firewall, ports and the network card

5. UDP details and TCP details

UDP: broadcast, multicast, MTU, loss

TCP: client, server and reconnect

6. Other problems

SymptomCauseFix
No messages at all, no errorInput block has framePerMS: 0 (disabled); localPort is 0 (nothing is bound); the firewall drops the packets; the sender uses another port or IP.Use -1. Set localPort. Add the firewall rule. Capture with Wireshark or the Sniffer driver to see the real source / destination.
Only a table of adapters is printed, the stream does nothingDiscovery mode: remoteIP or localIP contains ?. The driver is discarded on purpose.Put a real IP in the field.
Works on 127.0.0.1, not between two PCsFirewall, wrong NIC, different subnet, or localIP set to 127.0.0.1 (loopback accepts only local traffic).Use the NIC's address or an empty localIP; check the subnet mask and the firewall.
Works until the PC reboots / the cable is movedDHCP changed the address, or the interface is DOWN at start-up so the bind fails.Use a static IP. Start the engine after the link is up; check the start-up messages for Bind failed.
Output messages are not seen by the receiverremoteIP empty (no sending socket); wrong IP; broadcast address (error 10013); an output block with framePerMS: 0.Set remoteIP / remotePort; use a unicast IP; check the block.
Data arrives but values are wrong or byte-swappedThe block's raw convention does not match the sender (network devices often use big-endian).Fix the ICD convention (BElsb / BEmsb); see How to Interact with External Devices.
Messages are received but the model does not runNo model in the block, or a PostReceiveAccept hook returned false.Check the hook (CRC, length).
Latency of the data grows with time (TCP or UDP)The engine reads less data per cycle than the sender sends, so the OS buffers fill up.Read every minor frame (-1), reduce the sender rate, or batch in the sender.
Message counters and error counters of every block, and the data rate of the stream, are visible live in System Layout. Use the receive hooks to validate messages without losing data, and the stream recorder to capture exactly what the driver received.