Demo Client does not display Endpoints

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
TwoPatient
Full Member
Full Member
Posts: 5
Joined: 10 Jun 2015, 14:38

Demo Client does not display Endpoints

Post by TwoPatient »

Hi,

I'm evaluating several .NET APIs for communicating via OPC. FIrst of all I'm trying the demo apps that come with the software but I cannot get yours to show any endpoints when I point it at a remote server, whereas I can with the OPC Foundation API. Any clues?

Btw the client when I use your demo server (locally).

Ben

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: Demo Client does not display Endpoints

Post by Support Team »

Hello,

We need mor information.
What client are you using? How do you specify the discovery url? Are you trying to connect to our DemoServer remotely?

Best regards
Support Team

TwoPatient
Full Member
Full Member
Posts: 5
Joined: 10 Jun 2015, 14:38

Re: Demo Client does not display Endpoints

Post by TwoPatient »

Hi,

I'm using the Full Demo Client (UA Full Client) that comes with the SDK.

In the discovery Url I have: opc.tcp://srvdev

After I click the dropdown menu, the windows loading icon appears and then after it's gone the list is empty. I am trying to connect to a Softing dataFEED OPC Server. As I said the OPC Foundation Demo Client that comes with their SDK connects fine.

Ben

TwoPatient
Full Member
Full Member
Posts: 5
Joined: 10 Jun 2015, 14:38

Re: Demo Client does not display Endpoints

Post by TwoPatient »

When using "opc.tcp://SRVDEV" in FindServers the Discovery Url returns as "opc.tcp://SRVDEV:4981/In house Siemens" which when GetEndpoints is called is said to be invalid.

Ben

TwoPatient
Full Member
Full Member
Posts: 5
Joined: 10 Jun 2015, 14:38

Re: Demo Client does not display Endpoints

Post by TwoPatient »

OPC Foundation Example.png

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: Demo Client does not display Endpoints

Post by Support Team »

Hi Ben,

the discovery URL must be composed of three parts:
1) the prefix identifying the protocol binding
2) the hostname
3) and the tcp port the targeted server is running on

The syntax must be compliant to URL syntax and is:

Code: Select all

opc.tcp://<hostname/IP>:<TCP port>/<optional>
If you don't give in the port number, the client will use the default discovery port for OPC UA (as registered by IANA, which is 4840), as a fallback. Typically the LDS (Local Discovery Server) is expected to run on this port. Obviously on your machine there is no LDS running on 4840, that is why you are running into a timeout and getting "no" results.

You now have tree options:
1) you configure/type in the correct URL including port number of the targeted server and discover such server directly
2) you install a LDS server and make the server to register his endpoints at this server and than you discover the LDS via 4840
3) you configure the server to run on 4840 itself, which is only allowed if you insure that there is only this one server on that box (e.g. embedded device)

When looking at the returned URL (which in the optional extension contains spaces, and by this does not comply to URL encoding syntax), the returned error of our FullClient (and our SDK) is fully correct and compliant with the OPC UA Specification, saying "invalid" which is true. However our SDK gives you the chance to "overwrite" the invalid information returned by the Server (and by this "ignore" the messy URL). To do so you must implement a callback and force/overwrite the returned "invalid" URL and correct it again. Luckily this was already done by us so you just can use the flag "UseDnsNameAndPortFromDiscoveryURL". See documentation for details:
http://documentation.unified-automation ... mple5.html

Best Regards
Support Team

TwoPatient
Full Member
Full Member
Posts: 5
Joined: 10 Jun 2015, 14:38

Re: Demo Client does not display Endpoints

Post by TwoPatient »

Thanks, I've changed the name of the UA server to have no spaces in the name, and now the Full Client Demo works. :)

Post Reply