OpcCmd uaClient command tips and tricks: Difference between revisions

From OPC Labs Knowledge Base
No edit summary
No edit summary
Line 3: Line 3:
: Example:
: Example:
: <code>OpcCmd uaClient read opc.tcp://pc-zbynekz-5:62541/Quickstarts/ReferenceServer --EndpointSecurityPolicyDisplayName ECC_nistP256 i=2255</code>
: <code>OpcCmd uaClient read opc.tcp://pc-zbynekz-5:62541/Quickstarts/ReferenceServer --EndpointSecurityPolicyDisplayName ECC_nistP256 i=2255</code>
: For other ECC policies, use e.g. ECC_nistP384, ECC_brainpoolP256r1 or ECC_brainpoolP384r1.
: For other ECC policies, use e.g. '''ECC_nistP384''', '''ECC_brainpoolP256r1''' or '''ECC_brainpoolP384r1'''.
; How can I check which message security mode, or security policy, is actually being used?
; How can I check which message security mode, or security policy, is actually being used?
: Start the '''uaClient''' command as follows:
: Start the '''uaClient''' command as follows:

Revision as of 13:55, 12 December 2024

How do I specify a connection using ECC security policy?
Example:
OpcCmd uaClient read opc.tcp://pc-zbynekz-5:62541/Quickstarts/ReferenceServer --EndpointSecurityPolicyDisplayName ECC_nistP256 i=2255
For other ECC policies, use e.g. ECC_nistP384, ECC_brainpoolP256r1 or ECC_brainpoolP384r1.
How can I check which message security mode, or security policy, is actually being used?
Start the uaClient command as follows:
!option AmbientOutput [Boolean]True
uaclient --ConnectionMonitoring
Then, proceed as normally. There will be ServerConditionChanged events displayed, and in their Connected state, they will show the communication profile (in angle brackets) being used, e.g.:
[1] IEasyUAClientConnectionMonitoring.ServerConditionChanged: "opc.tcp://localhost:48040 - [SignAndEncrypt:ECC-nistP256:Binary]" Connected; Success
In this example, the message security mode is SignAndEncrypt, the security policy name is ECC-nistP256, and the data encoding name is Binary.