使用 Open62541 的 OPC UA 客户端服务器连接

问题描述

我在将 Raspberry Pi 上的客户端连接到 Raspberry pi 上的服务器时遇到了一些问题,希望你们对如何解决这个问题有一些想法。

它们都已使用本指南进行设置 https://open62541.org/doc/current/building.html

为了简单起见,我也使用了他们网站上的简单客户端和服务器设置,可在

https://open62541.org/doc/current/tutorial_client_firststeps.html

https://open62541.org/doc/current/tutorial_server_firststeps.html

唯一的区别是因为我使用的是 UA_ENABLE_AMALGAMATION 选项

#include <open62541/plugin/log_stdout.h>
#include <open62541/server.h>
#include <open62541/server_config_default.h>

已更改为

#include "open62541.h"

我得到的读数是

[2020-12-29 13:32:40.456 (UTC+0100)] warn/server        AccessControl: Unconfigured AccessControl. Users have all permissions.
[2020-12-29 13:32:40.456 (UTC+0100)] info/server        AccessControl: Anonymous login is enabled
[2020-12-29 13:32:40.456 (UTC+0100)] warn/server        Username/Password configured,but no encrypting SecurityPolicy. This can leak credentials on the network.
[2020-12-29 13:32:40.456 (UTC+0100)] warn/userland      AcceptAll Certificate Verification. Any remote certificate will be accepted.
[2020-12-29 13:32:40.458 (UTC+0100)] info/network       TCP network layer listening on opc.tcp://xx:4840/

用于服务器和

[2020-12-29 13:32:43.668 (UTC+0100)] warn/userland      AcceptAll Certificate Verification. Any remote certificate will be accepted.
[2020-12-29 13:32:43.671 (UTC+0100)] warn/network       Connection to opc.tcp://localhost:4840 failed with error: Connection refused
[2020-12-29 13:32:43.671 (UTC+0100)] info/client        Client Status: ChannelState: Closed,SessionState: Closed,ConnectStatus: BadDisconnect

为了客户

我可以使用 UaExpert 连接到两个树莓派,但由于某种原因客户端不想连接?

任何想法可能导致此问题?

这些也是 Open62541 的当前配置

Open62541 configuration

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)