Example OPC-UA Device Provisioning Using TOML File

This topic provides the parameters required to setup an example OPC-UA connection using the TOML configuration file.

Caution

IOTech STRONGLY recommends that this approach only be used for Device Service development, or when a service has a fixed set of devices (for example, for a sensor kit).

For information on the Edge Xpert OPC-UA Device Service, see OPC-UA.

Ensure that the profile is in the configuration directory.

OPC-UA Example TOML

To set up the Device Service, you must edit the [[DeviceList]] section of the OPC-UA configuration.toml file, as illustrated below:

[[DeviceList]]
    Name = "Prosys OPC-UA Simulation Server"
    Profile = "Prosys OPC-UA Simulation Server - Profile"
    Description = "An OPC-UA device"
    [DeviceList.Protocols]
      [DeviceList.Protocols.OPC-UA]
          "Address", "172.17.0.1:53530/OPCUA/SimulationServer"
          "Security", "Basic256Sha256"
          "Certificate":"certificate.der",
          "PrivateKey":"private_key.der"
          "SecurityMode", "SignEncrypt"

Note

This example assumes that there is no Application URI in the certificate. If the certificate contains an Application URI, this must be specified or the OPC-UA Device Service cannot connect to the OPC-UA server.

Viewing Readings

For information on viewing the readings, see Viewing The Readings.