| Message | Cause | What to do |
SerialDriver: <name>, Failed to load SerialCommAPI (fatal) | The API shared library (SerialCommAPI, or the one named by interfaceAPILib, e.g. SerialFTDICommAPI) was not found or one of its dependencies is missing. | Make sure the .dll / lib….so is next to the executable (the build copies it there). On Windows "Dependency DLL missing" = a vendor DLL (FTDI ftd2xx) is missing; "Wrong architecture" = 32/64-bit mismatch. |
SerialDriver: <name>, error opening <port> | The port does not exist, is already opened by another program (terminal, another stream, a second CoreEngine), or access is denied. | Re-run discovery ("?"). Close other programs using the port. Check that two streams do not use the same comPort. On Linux add your user to the dialout group. |
SerialDriver: <name>, Error setting up <port> port | The port opened but the buffer setup / flush failed (unsupported InBufferSize / OutBufferSize). | Use "auto" or a normal size such as 4096. |
SerialDriver: <name> recv failed <port> port | Read error on the port (for example the adapter was unplugged or reset). | Check the cable and the USB hub (use a powered hub). Reset the engine (the port is reopened on reset) after the adapter is back. |
SerialDriver: <name>: send failed / send Failed <port> port | Write error: port closed or adapter removed. | As above. |
SerialDriver: <name>: send Timeout <port> port, check flowcontrol configuration | The write could not complete in time: the other side is not ready. With "flowcontrol": "hardware" the CTS line is never asserted (not wired, or the device is off); with "software" an XOFF was received. | See Flow control. Try "none" if the cable has no RTS/CTS wires; verify the device is powered and its baud rate matches. |
SerialDriver: <name>: send Pending port <port> … N bytes (info) | Overlapped (asynchronous) write still in progress: the output buffer is filling because the line is slower than the data you send. | Reduce the send rate or the block size, or raise baudRate. If it grows steadily the link cannot carry the data. |
Stream: '<name>': block '<block>': timing <N>us > system minor frame <M>us; data may be lost. (warning) | An input block has a numeric framePerMS longer than the minor frame in overlapping mode: the port is read less often than the engine runs, so the buffer can overflow. | Set "framePerMS": -1 for input blocks (read every minor frame). See the note on framePerMS. The warning is not issued, and a number is correct, when the driver reads a "file" instead of a COM port. |
Streams: '<name>' message size mismatched Received after block '<block>' with Header: '<hex>' Unknown header '<hex>' length N (error) | A header was matched, and before the next header was found, N other bytes were received. See section 3. | See section 3. |
Streams: '<name>' message size mismatched ... appears at most once a second | The stream reports the skipped bytes only once per second; the count N keeps growing until it is reported, so it can be larger than one message's worth. | Fix the cause (section 3) instead of counting messages. |
Streams: '<name>' block '<block>' message timed out, received N of M bytes (error) | A header was found but the rest of the message stopped arriving (cable pulled, sender reset, or the header matched by chance inside other data). The block's errCounter is incremented; the message is dropped (the block keeps its last complete message) and the bytes after its first byte are searched again for a header. | Check the wiring and the sender. If your sender is really slow between bytes, set messageTimeoutMs in the driver (default: 500 ms + 3 × the transmission time of the message). |
Stream: block '<block>' has no 'headerMarker' ... can never be received / is smaller than its headerMarker (error, at start) | A serial block is found by its header, so a block without one (or smaller than it) is never filled. This used to fail silently. | Give the block a headerMarker, or fix its size. |
How the serial stream reads: it reads what the port has received (a chunk, not byte by byte) and scans it for the headerMarker of any input block; every byte position is tested, so a header that starts inside a false match is found, and a header cut between two reads is completed by the next one (a marker byte 0 / _ matches any byte). When a header
matches, it collects the rest of that block (block size − header size bytes, over as many reads as needed, in a private buffer) and publishes the whole block at once. One message is published per frame (maxMessagesPerRead, default 1); if more are waiting they follow in the next frames, so no message is overwritten before a model or the block recorder has seen it. The next bytes should be the
next header. If the stream has to skip bytes to find the next header, those skipped bytes are the unknown header: the message
prints the previous block name and header, the skipped bytes in hex and their count (length N). So N tells you how
far the real message was from the configured block size.
| Cause | How to recognize it | Fix |
| Receive rate too low / data lost: the port is read less often than data arrives, the receive buffer overflows and bytes are dropped. | Appears at high baud rates or bursts; N varies from message to message. Often together with the "timing > system minor frame" warning. | Use "framePerMS": -1 on input blocks; use "overlapping": "yes"; enlarge InBufferSize (e.g. 16384); make sure the minor frame is short enough for the data rate (at 921600 baud ~92 bytes arrive per millisecond). |
| Latency too high (USB-to-serial adapter latency timer, 16 ms by default on Windows): bytes are delivered to the application in delayed bursts that overflow the buffer or split messages. | Data is fine at low baud rates and breaks as the baud rate goes up. "latency": -1 prints 16. | Set "latency": 1. See Latency. |
| Block size in the ICD does not match the message: the message on the wire is longer or shorter than the block (header included). | The same N every time (e.g. always 2 = a trailing checksum or CR/LF that is not part of the block). | Make the block size equal the exact message length including the header bytes and any trailer. N is the difference. |
Wrong headerMarker or a header that also appears inside the payload (binary data that looks like the header). | The header is found in the middle of messages: counts are high and block data is shifted. | Use a longer, more unique header; use _ only for bytes that really vary. Add a checksum with a PostReceiveAccept hook to reject false matches. |
| Wrong line settings: baud rate, parity, stop bits or byte size differ from the device. | Random garbage, header never or rarely found, huge N. | Check the device's documentation; test with a terminal program. Parity: 0 none, 1 odd, 2 even, 3 mark, 4 space. |
| Electrical noise / long cable / missing ground. | Sporadic mismatches, N small and random. | Shorter or shielded cable, common ground, RS-232/RS-422/RS-485 levels matching the device. |
Receive blocking too long: totalTimeoutConstant too large makes each read wait, so the stream falls behind. | Mismatches together with minor frame overruns. | Use a small timeout (0 or a few ms) so reads return immediately. |
| Device start-up: first bytes after power-on or after the cable was connected are a partial message. | One message at start only. | Ignore; the stream re-synchronizes on the next header. |
USB-to-serial adapters (FTDI, CP210x, CH340...) hold received bytes for a short time — the latency timer —
before passing them to the application. The Windows default is usually 16 ms.
| Symptom | Cause | Fix |
| No messages at all, no error | Input block has framePerMS: 0 (disabled); or the headerMarker never matches; or TX/RX are swapped (use a null-modem / crossover). | Use -1. Check the header bytes against a terminal capture. Swap TX/RX. |
| Port works in a terminal program but not in the engine | The terminal program still holds the port; or the port number was changed by Windows after replugging into another USB socket. | Close the other program; rediscover with "?". |
| COM port number above 9 does not open | Windows needs the \\.\COM10 form. The driver adds the \\.\ prefix automatically on Windows; in JSON the backslashes must be escaped as "\\\\.\\COM10". | Fix the JSON escaping. |
| Port disappears while running (USB reset, power saving) | USB selective suspend or an unpowered hub. | Disable USB power saving for the adapter; use a powered hub; reset the engine after the port returns. |
| Output messages arrive late or stack up | Pending writes: baud rate too low for the data, or the receiver applies flow control. | Raise baud rate, reduce the output rate (framePerMS of the output block), or check the receiver. |
| Two blocks with similar headers: wrong block is filled | Header search is first-match; a shorter header that is a prefix of another header wins. | Use headers of equal length, distinct from each other. |
FTDI (SerialFTDICommAPI) on Linux: device not opened | The kernel ftdi_sio driver holds the interface. D2XX reports the device as opened by another driver. | The first time the device may already be bound to the kernel driver. The driver unbinds the interface automatically, but this needs root: start the application with root privilege (sudo) the first time. You can also run ftdi_unbind.sh as root by hand (the unbind lasts until the adapter is replugged or the machine reboots). Multi-channel chips use the serial number plus the channel letter (<serial>A, <serial>B). |
| FTDI D2XX: the application blocks when reading | In D2XX a timeout of 0 means "wait forever". | The driver treats totalTimeoutConstant: 0 as non-blocking; use a recent build. |
HuMANDATA (SerialHumandataCommAPI) on Linux: the device is listed as inaccessible ... USB node NOT writable for this user, or DEVICE_NOT_FOUND on open | The USB device node /dev/bus/usb/<bus>/<dev> is root-only: D2XX sees the device but may not open it. The library prints this after the error. | Install the udev rule: sudo ./install_humandata_linux.sh --install --user <login> (serial/api/Humandata/LinuxDriver), plug the device in again, log in again. There is no /dev/ttyUSBn for this device; that is normal. |
| HuMANDATA: the device is not listed at all (Linux) | Not plugged in, or the kernel's ftdi_sio driver holds it (someone registered the id with new_id), or the product id differs. | Run install_humandata_linux.sh: it shows the USB ids and who holds the interfaces. sudo ftdi_unbind.sh releases ftdi_sio. |
FTDI (SerialFTDICommAPI) on Windows: FTDIDriver: ftd2xx.dll could not be loaded (error 126) / FTDI D2XX is not available | FTDI's driver is not installed, so ftd2xx.dll is missing. (A 64-bit program needs the 64-bit DLL in System32.) | Install FTDI's D2XX Drivers (ftdichip.com; Windows Update usually does it when an FTDI device is plugged in). SerialFTDICommAPI\WindowsDriver\install_ftdi_windows.ps1 shows what is installed. |
FTDI on Windows: DEVICE_NOT_OPENED, or the device is listed as inaccessible: open in another program | The device or its COM port is open in another program (terminal, another stream). D2XX and the COM port cannot be used at the same moment. There is no kernel driver to unbind on Windows. | Close the other program. |
SerialDriver: <name>, feature <Name> = '<value>' failed: …. The port is closed | An entry of "features" could not be set. The text after failed: is the reason, and for an unknown name the list of the features this library has. | Fix the value or the name, or remove the entry. InterfaceMode rs485 on the Linux kernel driver of a MOXA UPort fails by design (it only does RS-232): use MOXA's driver, or set it in Device Manager on Windows. |
MOXA UPort (SerialMOXACommAPI): MOXADriver: open …: no MOXA serial port found | No MOXA port exists: the MOXA driver is not installed, the firmware was not loaded (Linux), or the UPort is not plugged in. | Run "comPort": "?": it lists the MOXA devices and says what is missing. Linux: LinuxDriver/install_moxa_linux.sh (kernel driver ti_usb_3410_5052 + linux-firmware). Windows: install MOXA's UPort 1100 driver before plugging in (WindowsDriver/install_moxa_windows.ps1); an "Unknown device" in Device Manager means it was plugged in first — install the driver and replug. Full procedure: serial/api/MOXA/install.txt. |
MOXA UPort, Linux: MOXADriver: open /dev/ttyUSBn failed: Permission denied | The user may not open the port. | Install 99-moxa-uport.rules and add the user to dialout (install_moxa_linux.sh --install --user <login>), then log in again. |
MOXA UPort, Windows: MOXADriver: open … failed … access denied | Another program has the port open. | Close it (terminal program, a second stream). |
MOXA UPort: unsupported baud rate / SetCommState failed | The UPort 1100 series goes up to 921600 baud; Linux accepts the standard rates 300–921600 only. | Use a standard baud rate. |
| MOXA UPort: reads return nothing, or garbage, with the right wiring | The interface mode of the UPort (RS-232 / RS-422 / RS-485) does not match the device. "?" shows the type the driver uses (Linux kernel driver: always RS-232 for the UPort 1150). | Windows: set the mode in the MOXA driver's port settings (Device Manager). Linux: the kernel driver cannot select RS-422/485 — install MOXA's own driver (see serial/api/MOXA/install.txt). |
MOXA UPort: MOXADriver: cannot select interface type … (the open fails) | "comPort": "moxa;mode=rs485" asked for a type the driver cannot set. The port is not opened in another type on purpose. | Use mode=rs232 (or no mode), or install a driver that can set the type (MOXA's Linux driver; on Windows set it in Device Manager). |
MOXA UPort: MOXADriver: latency … ms requested but not applied (warning) | The UPort has no latency timer and the driver has no latency setting. Data is delivered as the USB transfers complete (every 1 ms on full-speed USB). | Nothing to fix. To measure the real round trip use MeasureLatency() with TX wired to RX. |
File replay ("file"): the data stops after a while, no error | The file has ended: it plays once. | Set "PlayLoop": true in the driver section: at the end of the file the driver opens it again and reads from the start (SerialDriver: PlayLoop: input file restarted from its beginning, counted, printed once). Any serial API library. |
SerialDriver: <name>: "PlayLoop" is used only when reading a "file", ignored for comPort … (warning) | PlayLoop was set for a real port. It only applies to an input file. | Remove the key, or use "file". |
SerialDriver: <name>, PlayLoop: file … gives no data after a restart (empty?), no more restarts | The file is empty (or shorter than one read), so restarting it would loop without data. | Check the file path and its size. |
SerialDriver: <name>: "PlayLoop" must be true or false | The value is a number or a text. | Write true or false without quotes. |
FTDIDriver: FTDI device '<port>' cannot be opened (also HuMANDATA device), followed by indented lines D2XX status, what to check | D2XX could not open the device named in comPort. The status line is D2XX's answer (DEVICE_NOT_FOUND, DEVICE_NOT_OPENED, ...); the lines below say what to check for that answer. A location loc:0x.. is one physical USB socket: the same adapter in another socket has another location. | Do what the what to check line says. "comPort": "?" lists the attached devices with their index, serial number and location. Linux root-only USB node: see HuMANDATA / FTDI rows above. |
| Wrong or missing bytes right after opening the port | Old bytes were still in the buffers. | The driver flushes the input and output buffers when it opens the port; if the device sends continuously, wait for the first valid header. |