Configure

  1. Follow the physical installation instruction

  2. Power up the totem

  3. Connect the ethernet M12 connector.

  4. Choice any controlling system

  1. Configure the totem

Note

For the first installation, we recommend using serial interface that is the simplest to setup and require no authentication.

User management

Warning

This device use default admin and user credential. You should first change those before start using.

First, you need to download the current rpc_auth.txt using FS.Get file will be downloaded onto your host filesystem. Add your user manually or using the tool htdigest:

You can create a new with the tool htdigest that will add for you a new line in rpc_auth.txt:

htdigest rpc_auth.txt sdnesp01 <username>

Then upload this file back to the device’s file system using FS.Put.

Get device IP

By default, device use DHCP to request an available IP address. You can see the device IP using your DHCP server, scan the network ip and search for you device hostname. If you has a physical access to your device, you can connect to it using USB and send an RPC request Sys.GetInfo and you should be able to view the IP address.

Set device static IP

You can set a static IP address inside the configuration by editing system’s configuration. To do this see Config.Set.

Transfer a file to the device

Then send the file encoded to your device. Example using RPC over HTTP and curl client:

echo "{\"filename\": \"file.txt\", \"append\":false, \"data\": \"$(base64 -i file.txt)\"}" | curl http://<device-ip>/rpc/FS.Put -d @- --digest -u <username>:<password>

You can check that your file has been correctly uploaded with the RPC FS.List:

curl http://<device-ip>/rpc/FS.List --digest --digest -u <username>:<password>

Enable HTTPS

First, make sure you have a certificate and the corresponding private key.

Hint

Generate using OpenSSL: openssl req  -nodes -new -x509  -keyout key.pem -out cert.pem

Then push both certificate on device (see here)

Finally edit device’s configuration to listen on port 443 and use public certificate cert.pem with encryption key key.pem:

curl http://<device-ip>/rpc/Config.Set -d '{"config":{"http":{"listen_addr":"443","ssl_key":"key.pem","ssl_cert":"cert.pem"}}}' --digest -u <username>:<password>

Enable MQTT over TLS

By default, MQTT communications are note encrypted. To enable MQTT encryption over TLS, you need to get the CA certificate of the broker, a client certificate and a private key.

Warning

Your CA certificate should end with CR LF characters corresponding to RFC1421.

Upload those 3 files on the totem using this command and then configure following settings using settings configuration api:

  • mqtt.ssl_ca_cert=<ca.pem>

  • mqtt.ssl_cert=<CLIENT_CERT.pem>

  • mqtt.ssl_key=<PRIVATE_KEY.pem>