Connecting a Modbus device

Modbus is a serial communications protocol originally published by Modicon and used to establish primary-replica/client-server communication between devices.

Before you connect a Modbus device, ensure that the agent is running.

How to check/change the agent state

Use the following command to check if the agent is running in Cumulocity IoT Edge (running on port 6670):

[admin@iot-edge-server ~]$ systemctl status cumulocity-agent

If the agent is not running, start it with the following command:

[admin@iot-edge-server ~]$ systemctl start cumulocity-agent

The Modbus agent is pre-registered. In the Device management application, click All devices in the navigator and find the Modbus agent (called “linux-agent”) in the device list.

How to connect Modbus devices

For more information about connecting and managing Modbus devices, see Cloud Fieldbus in the Protocol integration guide.

Connecting an OPC UA device

Important
While configuring the OPC UA server, ensure that the server is reachable from the Edge appliance. If you are using a hostname, configure the DNS accordingly.

To connect an OPC UA device in the Edge appliance, follow the steps below.

Preparation

OPC UA Management service

Check if the OPC UA management service is running in Cumulocity IoT Edge (running on port 8083):

[admin@iot-edge-server ~]$ sudo service opcua-mgmt-service status

If the agent is not running, start it with the following command:

[admin@iot-edge-server ~]$ sudo service opcua-mgmt-service start

OPC UA Device Gateway

Check if the OPC UA device gateway is running in Cumulocity IoT Edge (running on port 1099):

[admin@iot-edge-server ~]$ sudo service opcua-device-gateway status

If the agent is not running, start it with the following command:

[admin@iot-edge-server ~]$ sudo service opcua-device-gateway start

Registering the device

Next, you must register a device in the Device management application with the name opcua-gateway.

Follow the description in Device management > Connecting devices in the User guide to register a device.

In the Device management application, click All devices in the navigator and find the OPC UA device in the device list.

For further information about managing and configuring OPC UA devices, see OPC UA in the Protocol integration guide.