Please consider registering

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
OpenSecureChannelResponse working
March 9, 2023
8:50, EET
Forum Posts: 11
Member Since:
February 21, 2023
sp_UserOfflineSmall Offline

The OPC UA server always responds with an OpenSecureChannelResponse with a requestHandle of 0. That meansOPC UA server is always starting its requestHandle from zero, rather than whatever the client passes to it. As per the specification, it should pass the requesthandle given by the Client to the request. Checking the OPC UA specification (OPC 10000-4), section 5.2 states: “The RequestHeader structure is defined in 7.33 and contains common request parameters such as authenticationToken, timestamp and requestHandle “Section 7.34, defining the RequestHeader in Table 175 defines a requestHandle as:”. This Client defined handle can be used to cancel the request. It is also returned in the response.”Section 7.34, defining the ResponseHeader in Table 176 defines a requestHandle as: “The requestHandle given by the Client to the request.”
Someone please provide feedback on this!!

March 9, 2023
10:31, EET
Bjarne Boström
Forum Posts: 941
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline


The server “doesn’t start” the handle. But it is possible that there is a bug that it wont be copied until the Session is formed. Though, this has worked for the past 15 years, so there is that. Anyway, thanks for the note.

Did you have an actual problem here? If yes, what specifically?

In practice the handle doesn’t have that much of a use before the Session exist, so I would need to doublecheck does the spec have some wording elsewhere that it is only intended to be used once the Session is up. For example, the Cancel Service is part of the SessionServiceSet, i.e. you would need a Session to cancel a request. And the AuthenticationToken is also related to the session.

Also until the Session is created there are a fixed set of messages to be exchanged in opc.tcp: Hello, Acknowledge, OpenSecureChannelRequest, OpenSecureChannelResponse, CreateSessionRequest, CreateSessionResponse, ActivateSessionRequest and ActivateSessionResponse. Basically client should be sending these or expecting these. You can only have a single channel on a single connection and a single session on top of the channel. Or I’m not 100% sure on this, but doing more than one would have the potential to cause great trouble, but I have also never seen a client to even attempt this.

What version of the SDK you are using? I assume the SDK is only used for the server side, because the client side is basically just using 0 until the Session is created. This _may_ be an issue and is something we need to look, but as said, this has worked quite long.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 130

pramanj: 86

ibrahim: 75

rocket science: 72

Francesco Zambon: 62

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 651

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1415

Posts: 6035

Newest Members:

u310498, ntd, francescac, yahya95, leomajoe, Gus, sdfsdfsdfsd, riatuccker

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

Administrators: admin: 1