Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Validating ServerUri before connection
June 18, 2016
8:46, EEST
Avatar
pramanj
Member
Members
Forum Posts: 86
Member Since:
October 21, 2014
sp_UserOfflineSmall Offline

Dear Sir,
In the sampleConsole application , the default serverUri is hardcoded which is taken if we do not specify URI in the command line. But the question is, is there a way to know the hostnames of the OPC servers available on the network and present them to the user for selection? This way user doesn’t have to type the URI and avoid any typoerrors.

My second question is, I see a discover option in the main menu, it displays the Endpoints of the server of given ServerUri after connection is established. What are endpoints in an OPC UA Server? Can this call be used for finding available Servers (asked in question 1)?

Also despite giving the default ServerUri as “opc.tcp://LAPTOP-RLSQD170:4096/iaopcua/SignAndEncrypt” it prints on console “Using SecurityPolicy http://opcfoundation.org/UA/Se…..olicy#None“? Is it not taking the SignAndEncrypt option?

Best Regards
PRAMANJ

June 20, 2016
13:25, EEST
Avatar
Heikki Tahvanainen
Moderator
Members

Moderators
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello,

The process of finding out available OPC servers in the network is called discovery. For the most thorough presentation about different kinds of discovery mechanisms in OPC UA, see specification part 12: https://opcfoundation.org/developer-tools/specifications-unified-architecture/part-12-discovery/

If you want to have a separate discovery server, you can download one from OPC Foundation (registration needed):
https://opcfoundation.org/developer-tools/developer-kits-unified-architecture/local-discovery-server-lds/

As for the question about the URI: the URI in the question has the following form:

scheme://hostname:port/path

The path is just additional data used to identify a specific Server. The supported security policies are returned by the server in the GetEndpoints response. The URI does not specify anything about security policies even though in this questions it happens to mention SignAndEncrypt.

In SampleConsoleClient, use the “-s” command line parameter to connect with SecurityPolicy other than none. For example, to connect to SampleConsoleServer with SecurityPolicy Basic128Rsa15 and SecurityMode SignAndEncrypt, use the following command line options:

-s e opc.tcp://localhost:52520/OPCUA/SampleConsoleServer
Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
9 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 683

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1