Closed IvoFortunov closed 3 years ago
I can't easily find UA traffic in your dump, could you filter them to only include the ports used for UA traffic?
I think I've managed to filter them. If you write "opcua" in filter of Wireshark, they are filtered by protocol.
4.With security None, original certificate, previous version of WinCC i get Unknown error, but the communication gets a little bit further WIreshark log: SecurityNone_org_cert_older_WinCC.zip
Seems to expect a specific structure for the read value of Server_ServerStatus_State.
Could you capture traffic from a server-client configuration that works, with None security mode? That same value blob can be reused here.
Here is working log with Unified Automation Test UA Server and last version of Simatic WinCC Wireshark log: WorkingConnection_new_WinCC.zip
Here is working log with Unified Automation Test UA Server and older version of Simatic WinCC Wireshark log: WorkingConnection_older_WinCC.zip
P.S. If i return the UInt32 - 65536 all values in the second read request (12 values representing OperationLimits), it connects but doesn't browse the items. It browses only "Server node". These values are 0 in the original. Dont'they have values?
P.S. 2 : Maybe it is the datatype with UInt32 - 0, also connects
Ok I fixed the connection issues. WinCC asks for "ServerCapabilities_OperationLimits" so I've added them to "internalAddressSpaceValues". It also expects UInt32 as an answer. Now it connects and browses "Server Node" but it doesn't browse "Items Node". Can you please help me with this issue? Wireshark log: Connected_Cannot_Browse_Items.zip
P.S. It only browses a small part of Server node
What is the value for MaxNodesPerBrowse? It seems to pick that as 0 and not browse.
No it is 100(after the fix from the previous post) , and yet another strange thing - it seams to ask for NodeId(0,0) instead of (2,0) when I try to browse Items folder. It looks like that WinCC thinks that Items have nodeId=0
In the working configuration it seams to ask for the correct NodeId.
Could you make a pull request to merge your fixes into the main library?
From the root, there should be a link to ns=2;i=0 that represents items. It seems that the namespace is dropped? I'm not sure how to fix that.
I continue investigating, when I finish I will make a pull request with all the fixes.
It is very strange behaviour. When I've changed NodeId(2,0) for Items to NodeId(2,"Items") - string identifier WinCC started to browse the Items.
Is the browse link from root to items the same i.e. ns=2;i=0 and also updated similarly to ns=2;s="Items"?
I wouldn't use this change for other servers, many (especially embedded) don't allow string identifiers.
No this change is only for my project! I've just changed ns=2;i=0 to ns=2;s="Items". For now we only have to add ServerCapabilities_OperationLimits" (12 values) to "internalAddressSpaceValues". Now I have other issues, and when I solve them we can decide together what to include in the library.
P.S. Can we communicate by email, when there are things to discuss?
You can email me: github username @gmail
It finally works: Thanks for the help!
Hello, I continue exploring your library, and it looks very promissing. The final goal of my project is to connect to SIMATIC WinCC. My application is a server. Everything works fine with clients like UAExpert and other, but when I try to connect from SIMATIC WinCC I've got the following:
The Consume gives (-4), exception is: "Error occurred while decoding OAEP padding". Decoding problem, maybe because the private key is wrong, but I don't have a PEM file for the certificate from ERRATA.
3.With security Basic128Rsa15 and the original certificate i get Unknown error, but things look better WIreshark log: SecurityBasic128Rsa15_org_cert.zip
Please help me solve this issue! Thanks in advance