Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » OPC-UA Module compilation Error
OPC-UA Module compilation Error [message #1781089] Thu, 01 February 2018 09:57 Go to next message
Avdoot Chalke is currently offline Avdoot ChalkeFriend
Messages: 21
Registered: April 2017
Junior Member
I got a compilation error while running the opc-ua project. The error states that 'no encoding rules have been defined for a parameter in a module'. Can someone tell me where am I going wrong?
Attached is the screen shot of the compilation error.

Any advice is highly appreciated! Thanking You in Advance!

With Regards,
Avdoot Chalke
Re: OPC-UA Module compilation Error [message #1781094 is a reply to message #1781089] Thu, 01 February 2018 10:31 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Avdoot,

you need to add -e to the Makefile , compiler flags:
# Flags for the TTCN-3 and ASN.1 compiler:
COMPILER_FLAGS = -L -e



For the whys , see here:

Heads up on the upcoming release of Titan version 6.3.0
https://www.eclipse.org/forums/index.php/t/1090378/

We'll try to make this clear in the documentation.
Please be aware that this is not a fully functional, finished product , it's work in progress.

BR

Elemer

Re: OPC-UA Module compilation Error [message #1781266 is a reply to message #1781094] Mon, 05 February 2018 10:14 Go to previous messageGo to next message
Avdoot Chalke is currently offline Avdoot ChalkeFriend
Messages: 21
Registered: April 2017
Junior Member
Hi Elemer Lelik,
Thank you for your input! As the protocol implementation is in progress, it would really be helpful if you could provide a guideline on working with OPC-UA. Because, after adding -e flag to the compiler flag, i am now experiencing a new error. The screen shot of the error can be found in the attachment. I have added all the referenced projects for OPC-UA.

Thank You!

With Regards,
Avdoot Chalke
  • Attachment: Error.png
    (Size: 341.33KB, Downloaded 118 times)
Re: OPC-UA Module compilation Error [message #1781271 is a reply to message #1781266] Mon, 05 February 2018 11:23 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Avdoot,

your project apparently has unmet dependencies ; as far as I can see they are from https://github.com/eclipse/titan.Libraries.TCCUsefulFunctions

but there might be others.

please download them and add them to your project.

In order for the compiler to find them, appropriate modifications have to be done in the Makefile.





BR

Elemer
Re: OPC-UA Module compilation Error [message #1781770 is a reply to message #1781271] Tue, 13 February 2018 09:00 Go to previous messageGo to next message
Avdoot Chalke is currently offline Avdoot ChalkeFriend
Messages: 21
Registered: April 2017
Junior Member
Hi Elemer Lelik,
Thank you for your help! I have started executing few test cases against OPC-UA server. I wanted to know when can we expect to have a fully functional OPC-UA environment for Titan?

With Regards,
Avdoot Chalke
Re: OPC-UA Module compilation Error [message #1781781 is a reply to message #1781770] Tue, 13 February 2018 10:00 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Avdoot,

great news, congrats,

the JSON and XML encoding variants should be ready pretty soon, however there's some transport encryption involved that will take some more time.

Best regards
Elemer

Re: OPC-UA Module compilation Error [message #1781793 is a reply to message #1781781] Tue, 13 February 2018 10:48 Go to previous messageGo to next message
Avdoot Chalke is currently offline Avdoot ChalkeFriend
Messages: 21
Registered: April 2017
Junior Member
Hi Elemer,
Great news!
So is it possible that the entire module is available by April 2018?

With Regards,
Avdoot Chalke
Re: OPC-UA Module compilation Error [message #1781797 is a reply to message #1781793] Tue, 13 February 2018 11:01 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Avdoot,

I cannot promise you , but there's a good chance...:)

BR
Elemer

Re: OPC-UA Module compilation Error [message #1781815 is a reply to message #1781797] Tue, 13 February 2018 13:36 Go to previous messageGo to next message
Avdoot Chalke is currently offline Avdoot ChalkeFriend
Messages: 21
Registered: April 2017
Junior Member
Hi Elemer,
Thank you for your response!
With the current implementation, can I write test suites for the security, subscription and Monitored service set?
Is there any documentation where I can find the list of all the implemented features?

With Regards,
Avdoot
Re: OPC-UA Module compilation Error [message #1781894 is a reply to message #1781815] Wed, 14 February 2018 11:14 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Avdoot,

the binary encoding has been summarily tested against an open source server,
so I suppose you can do the same, except the transport security/encryption part.

I suggest you download yourself a freely available sever and start experimenting with it.

There's no documentation besides what has been published in the repo.

Best regards
Elemer




Re: OPC-UA Module "The security mode does not meet the requirements set by the Server" [message #1790253 is a reply to message #1781894] Thu, 07 June 2018 13:46 Go to previous messageGo to next message
Avdoot Chalke is currently offline Avdoot ChalkeFriend
Messages: 21
Registered: April 2017
Junior Member
Hi Elemer,
I get the following error while trying to send an opensecurechannel request using mode SIGN_2:-
BadSecurityPolicyRejected = 0x80550000.

My message format is as follows:
var MessageHeader v_header := valueof(tr_HeaderOpenSecureChannel);
var UInt32 v_securityChannelId := 0;
var ListOfByte v_securePolicyUri := valueof(tr_ListOfByte({ 104, 116, 116, 112, 58, 47, 47, 111, 112, 99, 102, 111, 117, 110, 100, 97, 116, 105, 111, 110, 46, 111, 114, 103, 47, 85, 65, 47, 83, 101, 99, 117, 114, 105, 116, 121, 80, 111, 108, 105, 99, 121, 35, 78, 111, 110, 101 }));
var ListOfByte v_senderCertificate := valueof(tr_ListOfByteNull);
var ListOfByte v_receiverCertificateThumbprint := valueof(tr_ListOfByteNull);
var SequenceHeader v_sequenceHeader := {
SequenceNumber := 1,
RequestId := 1
}

var OpenSecureChannelRequest v_openSecReq := {
requestHeader := reqHeader,
clientProtocolVersion := 0,
requestType := v_requestType,
securityMode := v_securityMode,
securityPolicyUri := { realString := { stringLength := 56, stringValue := "http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15" } },
clientNonce := v_clientNonce,
requestedLifetime := 1200000
}

var ServiceBody v_service := {
encodingByte := 1,
namespaceIndex := 0,
nodeValue := 0,
list := {
OpenSecureChannelRequest := v_openSecReq
}
}

I am not able to find any source of information on senderCertificate, receiverCertificateThumbprint. What can be the problem?

Any information provided will be helpful.

With Regards,
Avdoot Chalke


[Updated on: Thu, 07 June 2018 14:39]

Report message to a moderator

Re: OPC-UA Module "The security mode does not meet the requirements set by the Server" [message #1790260 is a reply to message #1790253] Thu, 07 June 2018 15:42 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Avdoot,

I'm not particularly familiar with OPC-UA , but this is what I would do:

-first of all, I would try with a different security policy as indication is that reason for rejection is originated there

https://opcfoundation.org/UA/SecurityPolicy/

lists a number of security policies , stating that Basic128Rsa15 is obsolete , so maybe is not supported by the server; I would try all the others


-another option I'd strongly recommend is to install another OPC-UA client ( see for example

https://github.com/open62541/open62541/wiki/List-of-Open-Source-OPC-UA-Implementations)

and see what it does; this would also permit taking some Wireshark traces
that could be used as a reference.


Best regards

Elemer

Re: OPC-UA Module "The security mode does not meet the requirements set by the Server" [message #1790308 is a reply to message #1790260] Fri, 08 June 2018 08:16 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Avdoot,

I asked Akos about his opinion;

He is saying that :

-either the server does not support this security mode
-or the message is wrongly assembled


Pls. find attached a correct message for reference.


{ header := { 
    messageType := 5132367, 
    chunkType := 70, 
    messageSize := 132 
  }, 
  transportMessage := omit, 
  securityChannelId := 0, 
  securePolicyUri := { 
    realArray := { 
      arrayLength := 47, 
      arrayValues := { 104, 116, 116, 112, 58, 47, 47, 111, 112, 99, 102, 111, 117, 110, 100, 97, 116, 105, 111, 110, 46, 111, 114, 103, 47, 85, 65, 47, 83, 101, 99, 117, 114, 105, 116, 121, 80, 111, 108, 105, 99, 121, 35, 78, 111, 110, 101} 
    } 
  }, 
  senderCertificate := { 
    nullArray := { 
      arrayLength := -2147483647 
    } 
  }, 
  receiverCertificateThumbprint := { 
    nullArray := { 
      arrayLength := -2147483647 
    } 
  }, 
  securityTokenId := omit, 
  sequenceHeader := { 
    SequenceNumber := 1, 
    RequestId := 1 
  }, 
  body := '0100BE010000D08F18E2A674D3010100000000000000FFFFFFFF00000000000000000000000000000001000000FFFFFFFFC0270900'O } //The body structure below as an ecoded message
  
  //Body
  { 
    encodingByte := 1, 
    namespaceIndex := 0, 
    nodeValue := 446, 
    list := { 
      OpenSecureChannelRequest := { 
        requestHeader := { 
          authenticationToken := { 
            mask := 0, 
            namespaceUriBit := 0, 
            serverIndexBit := 0, 
            reservedBit1 := 0, 
            reservedBit2 := 0, 
            IdType := { 
              twoByte := { 
                nodeValue := 0 
              } 
            } 
          }, 
          timestamp := 131577074230530000, 
          requestHandle := 1, 
          returnDiagnostics := 0, 
          auditEntryId := { 
            nullString := { 
              arrayLength := -2147483647 
            } 
          }, 
          timeoutHint := 0, 
          additionalHeader := { 
            typeId := { 
              node := { 
                mask := 0, 
                namespaceUriBit := 0, 
                serverIndexBit := 0, 
                reservedBit1 := 0, 
                reservedBit2 := 0, 
                IdType := { 
                  twoByte := { 
                    nodeValue := 0 
                  } 
                } 
              }, 
              namespaceUri := omit, 
              serverIndex := omit 
            }, 
            Value := 0 
          } 
        }, 
        clientProtocolVersion := 0, 
        requestType := ISSUE_0 (0), 
        securityMode := NONE_1 (1), 
        clientNonce := { 
          nullByteString := { 
            arrayLength := -2147483647 
          } 
        }, 
        requestedLifetime := 600000 
      } 
    } 
  }



BR
Elemer
Re: OPC-UA Module "The security mode does not meet the requirements set by the Server" [message #1790542 is a reply to message #1790308] Tue, 12 June 2018 15:19 Go to previous messageGo to next message
Avdoot Chalke is currently offline Avdoot ChalkeFriend
Messages: 21
Registered: April 2017
Junior Member
Hi Elemer,
Thank you so much for providing the message format. But can i implement "SIGNED_2" security mode because it throws an error when i use it. The error is "The security policy does not meet the requirements set by the server".

With Regards,
Avdoot Chalke
Re: OPC-UA Module "The security mode does not meet the requirements set by the Server" [message #1790570 is a reply to message #1790542] Wed, 13 June 2018 06:24 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Avdoot,

Sorry , I suggest you contact an OPC-UA expert.

Best regards
Elemer
Re: OPC-UA Module "The security mode does not meet the requirements set by the Server" [message #1790574 is a reply to message #1790570] Wed, 13 June 2018 07:51 Go to previous messageGo to next message
Avdoot Chalke is currently offline Avdoot ChalkeFriend
Messages: 21
Registered: April 2017
Junior Member
Hi Elemer,
I wanted to know if the opcua module support security and certificates functionality because not only in earlier post you mentioned that tool is not fully functional but also the application certificates in the module is labelled under "work in progress". So, will i be able to use the application certificates?

Thank You for your time and feedback.

With Regards,
Avdoot
Re: OPC-UA Module "The security mode does not meet the requirements set by the Server" [message #1790595 is a reply to message #1790574] Wed, 13 June 2018 10:55 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Avdoot,

aha, yes , sorry;


indeed , the security and certificate functions are not implemented yet, but if you generate the appropriate data by some other means and insert it into the message, then
the codecs will handle it properly.


Our intention was , and still is, to add this functionality , but we are rather strained at the moment.

Best regards
Elemer




Previous Topic:FATAL ERROR in line 8821 of AST_ttcn3.cc: FormalPar::chk_actual_par_by_ref
Next Topic:Titan toolchain and Jira
Goto Forum:
  


Current Time: Fri Apr 19 20:33:52 GMT 2024

Powered by FUDForum. Page generated in 0.05561 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top