OpcCmd uaClient command tips and tricks: Difference between revisions
From OPC Labs Knowledge Base
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:ECC]] [[Category:OPC UA]] [[Category:OpcCmd Utility]] [[Category:Tools and Online Services]] | [[Category:ECC]] [[Category:OPC UA]] [[Category:OpcCmd Utility]] [[Category:Tips and tricks]] [[Category:Tools and Online Services]] | ||
; How do I specify a connection using ECC security policy? | ; How do I specify a connection using ECC security policy? | ||
: 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? | |||
: Start the '''uaClient''' command as follows: | |||
: <code>!option AmbientOutput [Boolean]True</code><br/><code>uaclient --ConnectionMonitoring</code> | |||
: 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.: | |||
: <code>[1] IEasyUAClientConnectionMonitoring.ServerConditionChanged: "opc.tcp://localhost:48040 - [SignAndEncrypt:ECC-nistP256:Binary]" Connected; Success</code> | |||
: In this example, the message security mode is '''SignAndEncrypt''', the security policy name is '''ECC-nistP256''', and the data encoding name is '''Binary'''. |
Latest revision as of 14:26, 13 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.