Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Build OPCUA secure connection function with QtOpcUa and 3rd party Open62541 backend

Build OPCUA secure connection function with QtOpcUa and 3rd party Open62541 backend

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
2 Posts 2 Posters 893 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • YichuanY Offline
    YichuanY Offline
    Yichuan
    wrote on last edited by Yichuan
    #1

    Hi All,

    First of all, information of my working environment: Window 10 64bit, Qt ver: 5.14.2, Qt Creator: 4.11.1 (based on Q 5.14.1(MSVC 2017, 32bit).
    I am a beginner of Qt or even software engineer. So please forgive me if I ask some stupid question. Below is some background info about my question.

    Recently, I am building the QtOpcUa environment with 3rd party plugin Open62541. I took a lot of reference from Basyskom and Qt forum.
    I have already tested the function of OPCUA Data access. It works good for me. I can write/read the variables from the OPCUA server (in my case is KEBA PLC under CoDeSys-base IDE) under none encryption connection (None-None). After this, I want to implement secure connection feature to my application. So first, I use UaExpert as a client to connect to my server with encrypted secure connection (Basic256Sha256, Sign and encrypted). It works, so I know the secure connection functionality of server part is okay. I also know I have to put the certificate into the PLC for it to recognize the client. Then I use QtOpcUa eample "Opcuaviewer", when I try to connect the server. It shows the error code:
    qt.opcua.plugins.open62541: The open62541 plugin has been built without encryption support
    qt.opcua.plugins.open62541: Unsupported security policy: "http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256"

    And I realized that base on the information from BasysKom, one step of building qtopcua is after execute qmake, make sure "mbedtls ..........yes"1.JPG

    So now I try to make "mbedtls" function enable. I download the mbedtls lib from (https://github.com/ARMmbed/mbedtls) and extracted to QDIR\qtopcua\src\3rdparty\open62541". And I open the open62541.h via Qt creator to set UA_ENABLE_ENCRYPTION and build project. I got a lot of error related to not found mbedtls lib file and unknown type name. 2.JPG
    Because I feel that qt cannot link the lib of mbedtls, I include the lib (INCLUDEPATH += $$PWD/open62541/mbedtls-development/include) in open62541.pri and build project.
    The not found file and unknown type name error are gone. But it turns to "undefined reference" error.3.JPG

    But when I click "F2" on those undefined reference function. I can link to the mbedtls.h file. So I think it is linked and qt can find the lib, but I don't know why it shows undefined reference error.

    Therefore, I stuck. Can someone help me? Where I am getting wrong? If you can explain more detail about what I have to do, that would be grateful. Cause I am afraid that I cannot understand what I have to do.
    Thanks in advance.

    1 Reply Last reply
    1
    • C Offline
      C Offline
      Chs_QtLearner
      wrote on last edited by
      #2

      I meet same question, but It seems QT5, QOpcUa with Open62541 version 0.3 , not support Open SSL communication. So , now I upgrade to use QT6 ,But I meet another problem "Build QOpcUa issues - https://www.qtcentre.org/threads/72050-QT6-6-QOPCUA-Open62541-Build-issue

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved