0
Under review

OPCUA4Unity can't connect to opcua server with username and password

VBKsjjW 1 year ago in OPCUA4Unity updated by Support 1 year ago 5

On the OPCUA server, I logged in a user.

I set up the "OPCUA_Interface" component in Unity.

At that time, the "user name" and "password" set on the server were set to "OPCUA_Interface".

In this state, click the "Import nodes" button of "OPCUA_Interface".

Then the following error is displayed in the console.

「OPCUA Interface - Error in activating session [BadUnknownResponse]UnityEngine.Debug:LogError (object)」

Please tell me how to improve.

Answer

Answer

Hi, I was able to connect with your type of OPCUA server. I will send you in a private message a beta. If successful it will be included in our next release (2021.15).

Under review

Can we test this by installing your OPCUA server on our side or getting somehow remote access to your server?

The OPC server you want to use can be downloaded from the following address.

https://www.faweb.net/en/download/download/

The software name is "[DEMO] DeviceXPlorer OPC Server V7" and supports "64bit" and "32bit".
The one I used is for 64 bit.

A demo version is available and is free to use.

After installing the software, you can use the OPC server by the following operations.

(1) Click「Tool」→「Option」
(2) Click the "..." button of "OPC UA Server Setting" in the displayed window.
(3) When the "OPC UA Server Setting" screen opens, check "Enable OPC UA Server".
(4) Uncheck "Enable Anonymous".
(5) Click the "OK" button.
(6) Click “Tool” → “User Management” → “Configuration”.
(7) The "User authority" window opens. Set the user name and password and click "OK".
(8) Click “Tool” → “User Management” → “Login” to log in to the user created in (7).

(9) Go to Unity.
(10) Set the "user name" and "password" set in (7) to the "user name" and "password" of the "OPCUA_Interface" component.
(11) Set the "Port No." displayed in the "OPC UA Server Setting" window.
(12) It is assumed that the OPCUA server and Unity are running on the same PC, so set the IP to "localhost".
(13) Click the "Import nodes" button of the "OPCUA_Interface" component.

After doing the above, an error will be displayed in the Unity console.

I want to communicate with this OPCUA server using username and password, please help.

I did like you described above. Do I need anything to start the OPC server. I even was not able to connect with OPCWatch and anonymous mode. Do I need to configure a project in DeviceXPlorer?

Hi, just was able to test and debug. I did not found a solution. I posted a question to the LibUA forum - the basis library we are using.

Answer

Hi, I was able to connect with your type of OPCUA server. I will send you in a private message a beta. If successful it will be included in our next release (2021.15).