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
OpenSecureChannelResponse working
March 9, 2023
8:50, EET
Avatar
u423017
Member
Members
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
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

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: 1919

Currently Online:
78 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 734

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1523

Posts: 6449

Newest Members:

christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16, edgardo3518

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1