Using OpcCmd Utility as OPC UA PubSub Sniffer
This article assumes that you have basic knowledge of the OPC UA PubSub Sniffing concepts; please read the corresponding article first.
(TBD)
Accessing the OPC UA PubSub Sniffer
(TBD)
uaSubscriber getService uaPubSubSniffer
(TBD)
uaPubSubSniffer subscribeCapture command
(TBD)
Limiting the capture types
(TBD)
Selecting distinct headers
(TBD)
Capturing message data
(TBD) Binary data (UADP) are shown in hexadecimal format, textual data (JSON) are decoded first, and shown as strings.
Typical usage scenarios
Show all communication
(TBD)
Show all communication with UDP transport mapping:
subscribeCapture opc.udp://239.0.0.1:4840
Show all communication with MQTT transport mapping:
subscribeCapture mqtt://opcua-pubsub.demo-this.com #
(TBD)
Discover who communicates what
(TBD)
Discover who communicates what with UDP transport mapping:
subscribeCapture opc.udp://239.0.0.1:4840 --CaptureTypes AllPubSubMessages --DistinctHeadersOnly !wait Infinite
Discover who communicates what with MQTT transport mapping:
subscribeCapture mqtt://opcua-pubsub.demo-this.com # --CaptureTypes AllPubSubMessages --DistinctHeadersOnly !wait Infinite
(TBD)
Capture and show message data
In order to view the original messages as they are being communicated on the specified PubSub connection, use the --ShowCaptureData
option. In our example, we are not interested in further analysis of the received messages, and we therefore limit the capture to the TransportMessage type, by using the --CaptureTypes
option. By removing this option, you can view the captured data together with their analysis as OPC UA PubSub messages.
Capture and show message data with UDP transport mapping:
subscribeCapture opc.udp://239.0.0.1:4840 --CaptureTypes TransportMessage --ShowCaptureData
Capture and show message data with MQTT transport mapping:
subscribeCapture mqtt://opcua-pubsub.demo-this.com # --CaptureTypes TransportMessage --ShowCaptureData
(TBD)