Skip to main content

DeviceOn

This guide explains how to install and activate DeviceOn on AIM-Linux (RISC) platforms, including the required packages, zero-config service, and first-boot behaviour.

Required Packages

Obtain the following components from Advantech PM/AE contacts:

  • WISE-Agent – example: wise-agent-Poky_3.0.4-imx8-1.4.31.0.run
  • CreateAccount – example: createaccount_2020_04_10_a59cbe72.tar.gz
  • Service-SDK – example: Service-SDK_Release_20200421_fsl_imx8_yocto_3f5ea785.tar.gz
  • SUSI-IoT – example: SusiIoT_Release_2021_08_31_Poky_3.0.4-imx8_x64_16490.tar.gz
  • SUSI 4.0 – example: SUSI4.0_Release_2021_10_29_Poky_3.0.4-imx8_x64_16557.tar.gz

The bundle mechanism integrates these components with the BSP release you are targeting.

Installation Workflow

1. Install WISE-Agent

Run the installer and defer configuration for later steps:

./wise-agent-Poky_xxx.run

When prompted, respond as follows:

  • Setup Agent [y/n] (default:n)y
  • Do you want to configure RMM Agent now? [y/n] (default:y)n
  • Do you want to start RMM Agent now? [y/n] (default:y)n

2. Install CreateAccount

tar -zxvf createaccount_xxx.tar.gz
cd createaccount
cp -a * /usr/local/AgentService/

3. Configure Zero-Config Service

System V init

Create /etc/init.d/zero-config with the following content:

#!/bin/sh

SERVICE_PATH="/usr/local/AgentService/"
SERVICE_PROGRAM="node index.js"

. /etc/init.d/functions

case "$1" in
start)
echo -n "Starting CreateAccount: "
cd $SERVICE_PATH
$SERVICE_PROGRAM > /dev/null 2>&1
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo "OK"
else
echo "Failure"
fi
;;
*)
echo "Usage: $0 {start}"
exit 1
;;
esac

exit 0

Register the service:

cp zero-config /etc/init.d
chown root:root /etc/init.d/zero-config
chmod 0750 /etc/init.d/zero-config
update-rc.d -f zero-config remove
update-rc.d zero-config defaults 99 20

systemd

Create /etc/systemd/system/zero-config.service:

[Unit]
Description=CreateAccount
After=saagent.service

[Service]
User=root
Group=root
Type=idle
WorkingDirectory=/usr/local/AgentService/
ExecStartPre=/bin/sleep 10
ExecStart=/usr/bin/node /usr/local/AgentService/index.js

[Install]
WantedBy=multi-user.target

Enable the unit:

cp zero-config.service /etc/systemd/system
chown root:root /etc/systemd/system/zero-config.service
chmod 750 /etc/systemd/system/zero-config.service
systemctl enable zero-config.service

4. Install Service-SDK

tar -zxvf Service-SDK_Release_xxx.tar.gz
cp -a Service-SDK/.libs/libEIServiceSDK.so* /usr/lib/

5. Install SUSI-IoT

tar -zxvf SusiIoT_Release_xxx.tar.gz
cd release/library
sudo ./install.sh

6. Install SUSI 4.0

tar -zxvf SUSI4.0_Release_xxx.tar.gz
cd SUSI4.x.x/Driver
sudo ./install.sh

Note: Ensure all installed files are owned by root:root.

First Boot Sequence

  1. Connect the device to the internet and power it on.
  2. During boot, saagent populates /usr/local/AgentService/agent_config.xml with unique identifiers (MAC-based).
  3. The zero-config service registers the device, after which agent_config.xml receives credential updates.

Example entries:

<DeviceName>imx6dlubc220a1</DeviceName>
<DevID>00000001-0000-0000-0000-00049F0130E0</DevID>
<SN>00049F0130E0</SN>
<UserName>00049F0130E0@advtrial.net</UserName>
<CredentialURL>https://deviceonapp.wise-paas.com/rmm/v1/iothub/credential</CredentialURL>
<IoTKey>10da34e72025c137618bb4d4aefff18d</IoTKey>

The MAC address is used as the device ID. No manual steps are required beyond network connectivity.

Connecting to the DeviceOn Server

  1. On a PC or mobile device, open the DeviceOn QR code portal (https://deviceonapp.wise-paas.com/#/DeviceQRCode).

  2. Enter the MAC address of your target device. To confirm the correct MAC when multiple Ethernet ports exist:

    cat /usr/local/AgentService/agent_config.xml | grep SN

    Example output:

    <SN>00049F0130E0</SN>
  3. Generate the QR code, then click or scan it to launch the DeviceOn home page.

If the portal reports that the MAC does not exist, the six-month trial account may have expired or the <IoTKey> in agent_config.xml is empty. Reconnect the device to the internet and reboot to request fresh credentials.

Logs and Connection Verification

Check /usr/local/AgentService/logs for connection status:

04-01 07:35:11.306 1687 [WiseAgent] Agent Credential: mqtt,…
04-01 07:35:11.306 1687 [WiseAgent] Connecting to broker: deviceonapp.wise-paas.com
04-01 07:35:11.389 1740 [WiseAgent] Broker connected!

Successful MQTT connection confirms the device is enrolled with DeviceOn.