Written by

Question Jainam Shah · 6 hr ago

Ensemble ASTM Service: "Expected <ENQ>; got: <ETX>" and TCP Connection Stuck in "Connecting" via Moxa NPort

I am facing two specific issues: a protocol sync error and a persistent TCP connection state.

Environment:
Interface: ASTM.

Gateway: Moxa NPort 5110 (TCP Client Mode).

Server: Ensemble Business Service (EnsLib.ASTM.Service.TCPService).

Port: 5007.

Current Status & Observations:
Serial Layer: Verified. The Moxa "Async Monitor" shows RxCnt increasing when the instrument sends data. Hardware pins (DSR/CTS) are ON.

TCP Connection: The Moxa Monitor shows the state as "Connecting" rather than "Established." However, a manual PowerShell test from a remote PC can reach port 5007, suggesting the server is listening.

The Error: When data does occasionally hit Ensemble, the Event Log records: Expected <ENQ>; got: <ETX>.

Network Discrepancy: Wireshark on the server shows traffic from a remote public IP (78.100.161.79) during manual tests, but zero traffic is captured from the Moxa’s expected path.

Moxa Configuration:
Baud/Parity: 9600, 8, N, 1 (Matches Instrument).

Operating Mode: TCP Client.

Packing: Currently experimenting with Packing Length 1 and Force Transmit 100ms to avoid buffering.

Questions:
Why would Ensemble report receiving an <ETX> (0x03) when the ASTM state machine should always initiate with an <ENQ> (0x05)? Could this be a serial framing/bit-shift issue at the Moxa level?

What would cause the Moxa to stay in "Connecting" while a PC on the same subnet can successfully establish a TCP handshake with the Ensemble server?

Are there specific EnsLib.ASTM.Service.TCPService settings (like Terminators or Ack Mode) that I should adjust to prevent the $zu(189) connection drops when the handshake gets out of sync?

Product version: Ensemble 2018.1

Comments