Troubleshoot a connection
When a device does not answer, or a value or command does not arrive, open the endpoint from the Endpoints list and switch to the Troubleshoot tab. It has these tools:
- the connection check tests the connection layer by layer and stops at the first problem, with a hint what to look at;
- the frame trace records every frame of the connection, optionally with the TCP layer below it, and explains each field; you can export it for Wireshark;
- the AI report puts the configuration, the check and the trace into one file for the AI assistant of your choice (or a colleague);
- Decode bytes explains hex copied from a SCADA log or another tool;
- Registers (Modbus TCP) reads a range of registers and shows them in all four byte orders: see Finding the byte order.
Every TCP protocol has the TCP part of the check; IEC 60870-5-104, Modbus TCP, Siemens S7, DNP3, OPC UA and OPC XML-DA also have their protocol steps and the frame trace. IEC 104 server endpoints have the frame trace too, see Server endpoints.
Connection check
Section titled “Connection check”Click Check connection. Protocol Bridge opens a connection of its own and runs these steps in order. First, for every protocol:
| Step | What it tells you |
|---|---|
| Resolve host | The host name is known (skipped for an IP address). |
| TCP connect | The port is open. Refused: nothing listens on the port. No answer: wrong IP address, the device is off, or a firewall drops the connection. No route: the laptop is not in the device’s network. |
| Device keeps the connection | The device does not close the connection right away. If it does, it probably accepts only configured client IP addresses, or only one client at a time. |
Then, for IEC 104:
| Step | What it tells you |
|---|---|
| Start data transfer | IEC 104 answers: STARTDT act is confirmed. If not, the port may not be IEC 104 (when the device answers with something else, the first bytes are shown, for example HTTP/1.1). |
| Link test | TESTFR act is confirmed. |
| General interrogation | The device confirms the interrogation and sends its data. The result counts the objects per type. COT 46 means the Common address (ASDU) is wrong. |
| Stop data transfer | The device confirms STOPDT act; the check closes the connection. |
For Modbus TCP (it only reads, never writes):
| Step | What it tells you |
|---|---|
| First request | The device answers Modbus: the first block of Points to poll is read. An exception answer also counts, the next step names it. No answer usually means a wrong Unit id (gateways often stay silent for unknown units); an answer that is not Modbus TCP shows its first bytes. |
| All configured points | Every read the endpoint polls is tried. Each failure is listed with its address range and exception, for example HR:40200: exception 02 illegal data address. |
For Siemens S7 (it only reads, never writes):
| Step | What it tells you |
|---|---|
| ISO connection | The PLC accepts the connection to the TSAP of Connection type, Rack and Slot, shown as e.g. TSAP 0102 (PG, rack 0, slot 2). If the PLC refuses, check rack and slot (S7-300: 0 and 2; S7-1200/1500: 0 and 1) and the connection type, and whether all of the CPU’s connections are in use. An answer that is not ISO-on-TCP shows its first bytes. |
| Setup communication | The PDU size the PLC agreed to (240 for most S7-300, 480 for S7-400 and S7-1200, 960 for S7-1500). |
| CPU identification | Order number, module and firmware, and the operating state, as far as the CPU reports them. A CPU in STOP is a warning: reading works, but the values do not change. |
| Configured points | Every read the endpoint polls is tried. Each failing item is listed with its address and return code, for example DB9.DBB0..3 (4 bytes): object does not exist (0A); a refused request with its error, for example 0x8104 when PUT/GET access is not allowed. |
For DNP3 (it reads only the static values and changes nothing on the outstation):
| Step | What it tells you |
|---|---|
| Link status | The outstation answers a link status request sent from the Master link address to the Outstation link address. An outstation ignores frames for other addresses, so silence usually means a wrong address. If the outstation sends from another address (for example its first unsolicited response), the step names it: set Outstation link address to 1024. |
| Read static values | The outstation answers a read of class 0. The result counts the values per type (BI 2, AI 2, CT 1) and lists the internal indications (IIN) that matter. Object unknown, function not supported and parameter error fail the step; device trouble, an event buffer overflow, local control and a request for the time while Sync the outstation’s clock is off are warnings. |
The DNP3 check reads class 0 only: events stay in the outstation’s buffer for the endpoint. It confirms an empty (null) unsolicited response, which many outstations wait for before they answer anything, but never one that carries events.
For OPC UA (it reads and browses, writes nothing and creates no subscription):
| Step | What it tells you |
|---|---|
| Hello | The server accepts the connection to the Endpoint URL. A server that does not know the URL’s path answers with BadTcpEndpointUrlInvalid. |
| Secure channel | A secure channel with security policy None opens; servers allow it for discovery even when their sessions need security. |
| Endpoints | The endpoints the server offers, each with its logins (None (anonymous), Basic256Sha256 SignAndEncrypt (user name)). Fails when none matches the configured Security policy, Security mode and login, naming what is offered, or when the server certificate is not trusted yet: trust it on the Certificates page, where the check, like a connection attempt, puts it. |
| Session | A session is created and activated with the configured security, user name and password, on a second connection for a secured policy, as the client does. A wrong password fails here. |
| Configured nodes | Every NodeId in Nodes is read and every one that fails is listed with its status (ns=2;s=Pump1.Speed: BadNodeIdUnknown); with Browse for variables on, the variables below the browse root are counted. |
For OPC XML-DA (it reads and browses, writes nothing, and cancels the subscription it tries):
| Step | What it tells you |
|---|---|
| TLS | For an https:// Service URL: the TLS version and the server certificate. A certificate that is not trusted (self-signed, or from your own CA: put it in CA certificate file), issued for another host name (use that name in the URL, not the IP address) or expired fails here. Skipped for http://. |
| GetStatus | The service answers: vendor, version, the server’s state and how far its clock is from yours. HTTP 401 means a wrong User name or Password, or a server that asks for Windows authentication (NTLM), which Protocol Bridge does not do; 404 or a web page instead of SOAP means a wrong path in the URL (often /OPCXMLDA/Service.asmx). A state other than running is a warning. |
| Browse | With Browse for items on: the items and branches found below the browse root, as the endpoint finds them, and every branch the server refuses. |
| Configured items | Every item in Items is read from the device. Each one that fails is listed with its result, e.g. Line1.Speed: E_UNKNOWNITEMNAME; a bad or uncertain quality is a warning. |
| Subscription | With Collect values by set to Subscription: the server creates a subscription for the items, answers one polled refresh and cancels it. A server that cannot subscribe fails here: use Read. |
Steps after a failed one are skipped. Below the steps, What the check sent and received shows the frames of the check.
You can also test settings before you save them: Test connection in the endpoint editor runs the same check with the values in the form.
Frame trace
Section titled “Frame trace”Click Start to record the endpoint’s frames. Starting does not reconnect the endpoint; the
trace shows the running connection from now on. With Include TCP layer (on by default) you
also see the connects, the bytes as they were read from and written to the socket, and how each
connection ended (closed by the device, reset, closed by Protocol Bridge with the reason, for example
t1 expired).
The list shows for each record:
| Column | Meaning |
|---|---|
| # | Record number within the trace. |
| Time, Δt | When it was recorded, and the time since the previous record shown. |
| Arrow | → sent by Protocol Bridge, ← received from the device. |
| Delay | Arrival time minus the device’s own time stamp in the frame (see below). |
| Summary | The frame in one line, e.g. I(118,2) M_ME_NC_1 inrogen CA=1 IOA 1001=60.6. |
Click a record to see every field with its meaning: the frame format and sequence numbers, the type identification (TI), the cause of transmission (COT) with P/N and test bit, the common address (CA), and per object the IOA, the value, each quality bit and the time tag. Click a field to highlight its bytes, or a byte to find its field.
Modbus TCP frames
Section titled “Modbus TCP frames”Each request shows its transaction id, unit id, function code and the address range in the
notation of the settings, e.g. #12 unit 1 FC03 Read Holding Registers HR:40001..40010 (10).
The response is matched to its request by transaction id, so its values carry their addresses:
HR:40001=0x4248 (16968), each register also as signed and unsigned number. Exception responses
name the exception and the range they refer to.
Siemens S7 frames
Section titled “Siemens S7 frames”Each frame shows its layers: TPKT, COTP and the S7 message. The connection request and confirm
show both TSAPs, the PLC’s as connection type, rack and slot, e.g. COTP CR TSAP 0100 → 0102 (PG, rack 0, slot 2), TPDU 1024. Jobs and answers carry their PDU reference (S7 Job #12,
S7 Ack_Data #12), so an answer is matched to its job and each of its items carries the address
it was read from: DB1.DBB10..15 (6 bytes) = 00 64 40 20 00 00, or the return code when the
PLC refused the item. Read SZL shows the list it reads (module identification, component
identification, CPU state) and the CPU state in the answer. S7 messages split over several data
units are joined.
DNP3 frames
Section titled “DNP3 frames”Each link frame shows its header (direction, primary bit, link function, destination and source
addresses) with the CRCs checked; a wrong address or CRC is marked. The application layer shows
the sequence number, the function code, every internal indication bit, and every object header
with its group, variation and range, e.g. #2 READ class 1, class 2, class 3, class 0. A
response names the request it answers, and its values use the notation of the settings:
#2 Response to READ: BI 0=on, AI 0=12.5, CT 0=42. Unsolicited events show their time stamp,
so the Delay column compares the outstation’s clock with yours. Controls show their status
(BO 7 latch on: not supported (4)). A response spread over several link frames is joined and
explained once.
OPC UA messages
Section titled “OPC UA messages”Each message shows its header (type, chunk, size) and the secure channel; on a channel with
security policy None also the service: #5 Read: ns=1;s=Sine, then #5 Response to Read: ns=1;s=Sine = 0.5 (Double). Subscriptions are explained with their monitored items, and every
data change names its NodeId, also when you start the trace long after the client subscribed:
#12 Response to Publish: ns=1;s=Sine = 0.75 (Double). Values carry their status and source
timestamp, so the Delay column compares the server’s clock with yours. A login shows the user
name, never the password: it is replaced by * in the bytes too, also in the TCP layer.
With a secured policy (Basic256Sha256 and the others) the messages are signed and encrypted: the trace shows their headers and sizes only. To see the services, try the same server with policy None on a test system.
OPC XML-DA messages
Section titled “OPC XML-DA messages”Each HTTP request and response is one record: the request or status line, the headers and the
SOAP operation with every item. A request shows its operation and items, e.g. POST /OPCXMLDA/Service.asmx Read (2 item(s)): Line1.Speed, Line1.Count; the response names the
request it answers and the values with their type and quality: 200 Response to Read (2 item(s)): Line1.Speed = 12.5 (double), Line1.Count = 42 (int). Polled refreshes of a
subscription show the items that changed, by name, also when the server sends only handles. A
SOAP fault, an item error (E_UNKNOWNITEMNAME) or a bad quality is shown in colour. The
answer’s reply time is the server’s clock, so the Delay column compares it with yours.
The client keeps a few HTTP connections open (a polled refresh waits on the server while a
write uses another one), so a trace shows several connections. Authorization headers show
the user name, never the password: it is replaced by * in the bytes too, also in the TCP
layer. With an https:// URL the trace shows the decrypted HTTP, and a note at the start of
each connection names the TLS version and the server certificate; the encrypted bytes on the
wire are not shown.
Filters
Section titled “Filters”- Text: matches the summary and the field values, e.g.
inrogen,IOA 2001,M_SPorHR:40101,DB1.DBB10,AI 0,ns=2;s=Pump1.SpeedorE_UNKNOWNITEMNAME. - name=value: a field with that value, e.g.
COT=47,CA=5orFC=3(or that text). - Direction, Warnings and errors, Hints only, a connection (each reconnect is a new connection) and TCP layer.
- Follow scrolls to new records; untick it to read in peace.
Negative confirmations, unknown causes (COT 44 to 47), invalid quality, Modbus exceptions, S7 errors and refused items, and bytes that are not the expected protocol are shown in colour.
The trace adds a Hint where it recognises a known pattern, for example:
- the device closes the connection right after accepting it, again and again;
- bytes arrive but they are not IEC 104 frames;
STARTDT actwas never confirmed, or a link test (TESTFR) was not answered;- sent frames were not acknowledged within t1;
- the device does not know the common address or an IOA;
- every object of a general interrogation is invalid;
- a Modbus exception, once per address range, with what to look at: 01 the function is not supported (e.g. holding vs input registers), 02 the address does not exist (also when several points are read in one request across a gap: set Max gap to merge reads to 0), 03 the quantity is too large (Registers per read request), 04 device failure, 06 busy, 0A and 0B the gateway cannot reach the unit;
- a Modbus request without an answer (often a wrong unit id), or a response that matches no request;
- an S7 PLC that refuses the connection: rack, slot or connection type, or no free connection;
- S7 error 0x8104: on S7-1200/1500, allow PUT/GET communication from remote partner and switch off Optimized block access for the data blocks; 0x8500 and 0x8304: lower the PDU size or Items per read request;
- an S7 item refused, once per address, with what to look at: 0A the data block is missing or shorter, 05 address out of range, 03 access denied, 06/07 data type;
- an S7 CPU that is not in RUN;
- DNP3 frames from or to another link address, with the address to set, and frames with a wrong CRC;
- DNP3 internal indications: function not supported, object unknown and parameter error (with the request they answer), event buffer overflow, device trouble, configuration corrupt, local control, need time while Sync the outstation’s clock is off, and a device restart bit that stays set after the master cleared it;
- a DNP3 control status other than SUCCESS, once per point, with what it means (for example NO_SELECT: OPERATE without a matching SELECT);
- a DNP3 request without a response, and a link keep-alive without an answer;
- the OPC UA server’s error with what to look at: an unknown path in Endpoint URL, a security policy or mode it does not offer (with the ones it offers), our certificate not trusted by the server, a login refused (user name, password, or anonymous not allowed), a lost session, too many sessions, subscriptions or monitored items;
- an OPC UA node status once per NodeId: BadNodeIdUnknown (check namespace and identifier in Nodes), BadNotReadable, BadNotWritable, BadTypeMismatch;
- an OPC UA request without a response, a missed keep-alive, and a secured channel whose services the trace cannot show;
- an OPC XML-DA server’s HTTP error with what to look at: 401 (user name and password, or Windows authentication that Protocol Bridge does not do), 403, 404 (the path in Service URL), a proxy error (502 to 504), and an answer that is not SOAP (a web page);
- an OPC XML-DA fault or item result once per item: E_UNKNOWNITEMNAME (check Items), E_READONLY and the other write errors, E_SERVERSTATE, E_BUSY, a subscription the server forgot, changes lost in the server’s buffer (DataBufferOverflow), a server state other than running, and an item with a bad or uncertain quality.
Device clock
Section titled “Device clock”For values with a time tag (IEC 104 time tags, DNP3 events with time, OPC UA source timestamps, the reply time of OPC XML-DA answers), Delay compares the device’s time with the time the frame arrived (measured against your laptop’s clock). The trace points out:
- an offset of about a whole number of hours: a time zone, daylight saving or UTC/local setting;
- a clock that drifts, one that was set during the trace, or a time in the future;
- a device that marks its own clock as not synchronised.
Old time stamps right after a connect are usually buffered events and are expected.
Frames of a command or refresh
Section titled “Frames of a command or refresh”While the trace runs, a command or Refresh all on the Points tab shows Show frames next to its result. It opens this tab with only the frames that belong to it: for IEC 104 the command’s activation, its confirmation (positive or negative) and its termination, or the general interrogation with every value it brought. Show all frames next to the notice brings the whole trace back.
TCP statistics
Section titled “TCP statistics”With Include TCP layer, each connection also gets the operating system’s TCP statistics:
when it opens, at most every 5 seconds while it is used, when the protocol notices a problem
(IEC 104: t1 expired) and when it closes. A record shows the round-trip time, retransmitted
segments, the send and receive window and more (TCP statistics (while running): RTT 1.2 ms ±0.3, RTO 204 ms, retransmitted 0 segment(s) (0 bytes), send window 64240 bytes, …). Rising retransmissions or
a send window of 0 (the device does not read what it is sent) are shown in colour with a hint:
that points at the network or a device that is overloaded, not at the protocol settings.
Export
Section titled “Export”Export pcapng saves the trace for Wireshark. Protocol Bridge records what the endpoint read and
wrote on its socket, not packets on the wire, so the file is built: each read and write becomes a
TCP segment with Ethernet, IP and TCP headers made up from the connection’s addresses, and a
connect a three-way handshake. Wireshark reassembles the streams and applies its own dissector
(for a port other than the protocol’s usual one: Decode As). Each packet’s comment names its
record number (#123) in Protocol Bridge. Export JSON saves every record with its decoded
fields, as the runtime API returns them.
Limits
Section titled “Limits”A trace keeps the newest 20,000 records on the desktop (5,000 on a gateway) and stops by itself after one hour. It is kept while the endpoint reconnects or is stopped and started, and it stays on the computer that runs the endpoint: it is never sent to central.
Server endpoints
Section titled “Server endpoints”When Protocol Bridge is the IEC 104 server (controlled station) for a SCADA, the trace shows every connected SCADA client, each on a connection of its own; the connection filter picks one. Starting the trace disconnects no one. A client that Protocol Bridge turns away because Max connections are in use shows up as a connection that closes right away, with the reason.
The hints look at the frames from Protocol Bridge’s side: the SCADA addressed a common address this server does not have (COT 46), used an IOA that no point of this server has (COT 47) or a type it does not support (COT 44), or a command that this server refused, with the usual reasons (no mapping forwards commands to the point, the source device refused it, or it did not answer in time).
AI report
Section titled “AI report”AI report in the frame trace panel writes one Markdown file to paste into the chat of an AI assistant, or to send to a colleague, to find the root cause. Protocol Bridge itself calls no AI service and sends the report nowhere: you copy or save it and decide where it goes.
The report has fixed sections: a short task for the assistant with your Symptom, the context (version, protocol, addresses, when the trace ran), the endpoint’s settings and the mappings that use it, the last connection check, the endpoint’s status history (connects, reconnects, faults), the findings (every hint, warning and error with the frames around it), statistics (frames per kind, connections, the longest silence, commands and their results, the device clock offset), the trace itself, the latest values and a short glossary of the protocol terms that appear. Record numbers are the trace’s own, so when the assistant answers “see #412”, you find that frame here.
- Size: about 10,000, 30,000 (default) or 100,000 tokens, so the report fits the assistant.
Repetitive frames are collapsed into one line (
#130–#470 341 records, all without findings: …), frames near a finding stay in full, and the oldest uneventful frames are left out first. Every section says what it left out. - Anonymize (on by default): IP addresses, host names, endpoint names, user names and point
names are replaced by placeholders that name their role, e.g.
DEVICE-1 hostorPROTOCOLBRIDGE address, also in the symptom. The top of the report explains each placeholder with what matters for the diagnosis (private IPv4, same /24 as PROTOCOLBRIDGE), so the assistant can still reason about the network. Port numbers, protocol addresses (common address, IOA, registers), values and times are kept. The Key below the preview lists the real value of each placeholder; it is not part of the report, so keep it to read the answer back. - Passwords are never included, anonymized or not.
- Save as .zip adds the full trace as JSON and as pcapng, anonymized the same way; the
pcapng uses addresses from the documentation range
192.0.2.0/24.
The report works on the gateway’s web interface too, since the gateway builds it itself.
Decode bytes
Section titled “Decode bytes”Decode bytes explains hex you copied from somewhere else: a SCADA’s communication log, a
colleague’s e-mail or Wireshark’s Copy as hex dump. Pick the protocol and who sent the bytes
(From the device or To the device), paste and click Decode. Spaces, 0x prefixes,
separators and the offsets and text column of a hex dump are all fine. The frames appear in the
same list and detail view as in the trace, with the hints for them; it needs no connection and
no endpoint of that protocol.
