02/24/2021
HI All
We are complete newbies to OPC UA and are looking at implementing an OPC server in one of our products. Our products are written in a number of languages and so are attempting to write our own libraries.
We have started with LDS using uaExpert as a test client.
We have a standard TCP server on port 4840 and can successfully decode the Hello Message.
However when we send the ACK message back we get the following error
FindServersOnNetwork on opc.tcp://localhost:4840 failed (BadConnectionRejected), falling back to FindServers
Our message is ACKF, followed by length 28 (4 bytes), Version 0 (4 bytes) and the same 4 values (each 4 bytes) as decoded from the Hello Message.
What are we missing?
Regards
Paul
02/24/2021
3 different types of systems using 3 different architectures.
There are using 2 different flavours of pascal and a combination of .NET CF and its own proprietary language.
The open source Delphi (pascal) modules we have found seem to use either OPC classic or https. We would like to use TCP.
If you know of a Delphi or Lazarus open source module that uses TCP, please let us know.
Regards
Paul
05/30/2017
I did not answer your question directly because developing a UA stack from scratch is more than just getting the protocol messages right.
You need to implement a number of cryptography operations and you need a crypto library that will be updated to keep up with the changing crypto requirements.
Do you have a Pascal crypto library that implements the latest algorithms such as SHA256 and RSA PSS or ECC?
For protocol debugging I recommend wireshark.
It comes with a standard option that understands OPC UA messages and will allow you to compare messages that are accepted to yours.
You need to set the ports in wireshark preferences for the OpcUa protocol so they match the ports of the servers you are testing.
Moderators-Implementation
03/27/2014
Hi,
As Randy said, writing an OPC UA stack is a big task. The OPC Foundation has started development over 15 years ago for .NET, for example, and they are still refining them - and adding new features that are constantly added to the specifications.
As for Delphi or Free Pascal, I don't know of any open source projects. We at Prosys OPC have developed an SDK for Delphi & C++ Builder. We decided to use the OPC Foundation Ansi C Stack to skip that part and rather concentrate on building the SDK level of components, which enable real application development on top. If you notice that OPC UA is more than just the communication protocols to deliver messages, you will understand why that might take it's time as well. For example, we managed to squeeze the development to achieve an adequate level of support for all the major features to a couple of years...
The functionality that we get from the stack is especially the encoding and security, which are of course key to interoperability with all other OPC UA applications in the market. I would like to develop a native stack for Delphi, but having been in the development team for doing it for Java in the past, I know how big a job it is so we haven't seen it very viable so far.
Based on your question, you are just taking the first steps, so I would like to give a hint that the mountain is big, but there are helicopters available, if you wish to get there still this year...
BR,
Jouni Aro
Prosys OPC
https://www.prosysopc.com/
1 Guest(s)