

From here, we could move on to the ReadResponse in frame 168 to see what the server sends back to the client’s request. If we expand the frame, we can see that the client has requested to read AttributeId 13 (the value) from “1” in the OPC UA Server. An example output of OPC UA communications could look something like this:įrom there, it’s possible to select a message that is of interest (say a ReadRequest in frame 167 that is sent from the server to the client), and drill down to see exactly what is being requested. Once the filter is applied, all that is left is the OPC UA messages. This removes all the irrelevant frames that we’re not interested in. In the “Filter” textbox, type “opcua”, and hit “Apply” to filter the trace to only show OPC UA communications.

Analyze the captureĪfter a trace has been collected, it’s time to take a look at the communications to see what’s going on. You should be seeing frames appear in Wireshark’s main window at this point (probably scrolling too fast to read – that’s ok!). If the goal is to troubleshoot some problem between the client and server, now would be the time to reproduce the problem to make sure the behavior is included in the Wireshark capture. Let the Wireshark run and capture the network traffic while the client and server are communicating. This is normal, and the OPCUA communications can be filtered out later.

Note that Wireshark will record ALL traffic (not just OPC-UA) on the network interface that is selected. Starting the captureĬhoose the correct Interface in Wireshark, and hit the “Start” button. The port can be found at the end of the OPC UA server’s endpoint URL. Then, under the “Protocols” section, find the “OpcUa” protocol and make sure to enter the port that your OPC UA server uses. In Wireshark, go to “Edit -> Preferences” to open up the Preferences Window: In order to make sure Wireshark actually captures the data, it has to be told which port to listen on. This will allow troubleshooting of strange or unexpected behavior between the client and server. As long as the communication is not encrypted (meaning that no security is used), it is fairly easy to capture and analyze the conversation. Wireshark has a built-in filter for OPC UA, which will allow the capture of communications between OPC UA clients and servers.

The following article discusses in detail how to use Wireshark for analyzing OPC UA packets for troubleshooting purposes. One of the easiest ways we’ve found here at Software Toolbox to analyze the communication between an OPC UA client and server is to use Wireshark. As more and more companies are making the switch from OPC-DA to OPC UA, it is becoming increasingly important to be able to troubleshoot OPC UA communications.
