Overview
The following sections demonstrate how to use a NetComm router with Device Integration Platform. It describes how to
- Configure the router.
- Connect the router to your Device Integration Platform account.
- Configure WAN, LAN and DHCP parameters.
- Manage software and firmware.
- Monitor system resourcess.
- Use the built-in GPS functionality.
- Use the built-in GPIO pins.
- View configuration parameters.
- Configure devices to use SMS mode.
- Remotely execute text commands via device shell.
- Get event notifications.
- Connect Modbus devices.
- View logs.
The following sections assume that the router has the NetComm agent package installed. The agent is compatible with the NTC-6200. For more information on a particular feature of the router, please consult the respective manual found in the "Downloads" section of the router's home page.
Configuring the router
The support for Device Integration Platform can be configured through the router's web user interface. To do so, login to the user interface as described in the router's manual. Navigate to the "System" tab and click on the "Internet of Things" menu item.
Verify that the toggle switch "Device Integration Platform agent" is set to "ON" and the URL shown in "Server" points to the Device Integration Platform instance that you want to connect. For example, use
- https://management.ram.m2m.telekom.com/s for connecting to Deutsche Telekom Cloud of Things.
Optionally, you can activate data collecting for the following functionalities:
- GPIO analog measurements: Send the voltages of the analog inputs [seconds].
- GPS position interval: Update the current GPS position [seconds].
- GPS position event: Send a location trace of the GPS position [seconds].
- System resources measurements: Get information about CPU usage, memory usage and network traffic [seconds].
All these options are disabled by default (the interval is set to 0).
The web interface also shows the status of the connection to Device Integration Platform:
(For version 2.x)
- Off: The software is disabled.
- Initializing: The software is initializing.
- Registering: The device waits for being registered to Device Integration Platform (see next section).
- Starting: The software starts all its components.
- No credentials: The device did not get credentials for accessing Device Integration Platform, the credentials were deactivated, or the credentials were wrong.
- Started: The software is started.
- Connecting: The software is connecting to Device Integration Platform.
- Connected: The software is connected to Device Integration Platform.
- Disconnected: The software is not connected to Device Integration Platform.
- Reconnecting: The software is retrying the connection.
- Stopping: The software is terminating.
(For version 3.x)
- Checking network connection: waiting for mobile network connection at boot.
- Bootstrapping: load credentials or request credentials from Device Integration Platform.
- Integrating: Connecting to Device Integration Platform.
- Loading plugins: loading Lua plugins.
- Connected: The agent is successfully connected to Device Integration Platform.
- No server URL: no or invalid server URL.
- Bootstrap failed: Can not get credentials from Device Integration Platform.
- Integration failed: can not connect to Device Integration Platform.
- Create threads failed: not able to start reporter or device push.
Connecting the router
To register your NetComm router to Device Integration Platform, you need the router's serial number as Device ID. The registration process is described in section "Connecting devices" in the User Guide. The serial number is printed on the back side of the router as shown below. Alternately, it is also available in the router's web user interface. Navigate to "System", "Internet of Things" and view the "Device ID" field.
Users of version 2.x or upgrading from 2.x to 3.x should use the router's MAC address. Please make sure to use only lowercase letters and numbers when entering the MAC address. Do not use colons to separate the MAC address. For example, the MAC address from the picture would be entered as
006064dda4ae
After clicking the "accept" button, navigate to "All devices", the router should appear here after registration. The default name of a router is "NTC-6200 (S/N <serial number>)". For example, the above router would appear as "NTC-6200 (S/N 165711141901036)". Click on the router to view the detailed information and to access the functionality described in the remaining sections of this document. In order to distinguish a registered router from other devices in the listing, you can change the router's name on the "Info" tab, which also displays basic information such as serial number of the router and SIM card data. After changing the name, remember to click "save changes" button at the bottom of the "Info" page.
Configuring network parameters
You can view and configure the essential mobile network ("WAN") and local area network ("LAN") parameters in the "Network" tab as shown in the screenshot below.
The mobile network ("WAN") parameters shown in the user interface correspond to the first profile stored in the router. These parameters can be remotely configured directly or via SMS.
For SMS configuring, the router needs to be configured to accept SMS commands. Consult the router's manual on the relevant parameters for SMS configuration, or use the router's web user interface. You also need to have an SMS gateway configured with your account. Contact support@softwareag.com for setting up an SMS gateway. For more information on Device Shell, consult the user's guide.
When you configure a wrong APN setting, the device will lose mobile network connection and can only be managed by limited SMS functionality.
LAN and DHCP parameters can be directly configured from Device Integration Platform as well.
Managing software and firmware
The installed software and firmware on the router can be remotely managed using the standard software and firmware management feature from Device Integration Platform, as described in the Device management user's guide.
Software packages need to be in ipkg format and follow the naming convention "<package>_<version>_<arch>.ipk". Version numbers including letters are not supported. All package management methods (install, upgrade, downgrade, removal) are supported through the router's package manager. If software packages have dependencies, please make sure to install these first.
The package "smartrest-agent_<version>_arm.ipk" represents the NetComm agent. It is prohibited to remove this package from Device Integration Platform.
When upgrading from versions older than 2.1.1, the device needs to be re-registered.
Firmware can be uploaded and installed on the router as well. To successfully upgrade the firmware, make sure that the target firmware includes the agent package. If the agent package is not included in the target firmware, the agent will not start after the installation. Firmware files need to follow Netcomm's naming convention ("<name>_<version>.cdi").
Monitoring system resources
You can record statistics of the router's system resources usage for troubleshooting purposes. The following statistics are available:
- CPU load in percent.
- Used and total memory in MB.
- Uplink and downlink traffic over all interfaces in KB/sec.
By default, collection of resource statistics is disabled. They can be enabled by setting a non-zero collecting interval in the "System resources measurements" entry of the router user interface or using Device Shell:
set service.cumulocity.plugin.system_resources.interval=<interval>
Collected data can be accessed in the "Measurements" tab or in a dashboard.
Using GPS
To locate or trace the router, connect a GPS antenna to the router and enable its GPS functionality. Then configure the frequency of data collection by setting the "GPS position interval" and/or the "GPS position event" to a non-zero value. "GPS position interval" defines how often the current location of the router is updated. "GPS position event" defines how often the current location is stored as location update event for tracing. Similarly, you can set these parameters from Device Shell:
set service.cumulocity.plugin.ntc6200.gps.update_interval=<update interval>
set service.cumulocity.plugin.ntc6200.gps.interval=<event interval>
After you applied the configuration changes, wait a moment for the first GPS data to arrive, then refresh the page. A "Location" and a "Tracking" tab should now appear. See the "Location" and "Tracking" sections in the user guide for more information.
Using GPIO
The following GPIO functionalities are supported:
- Send the voltage of an analog input as measurements to Device Integration Platform.
- Raise or clear alarms when a digital input turn 1 or 0, respectively.
- Write to a digital output remotely from Device Integration Platform.
Consult the documentation of your router for more information about its specific IO settings. The available functionalities may vary between different device models. For example, the NTC 6200 model supports GPIO pins 1-3.
Analog input
To regularly poll the input voltage of a GPIO pin and send it to Device Integration Platform, set "GPIO analog measurements" to a non-zero value. Alternatively, use Device Shell:
set service.cumulocity.plugin.ntc6200.gpio.interval=<interval>
set service.cumulocity.gpio.<port>.notify=measurement
<port> is the numbering of the GPIO pin. For the NTC-6200, replace <port> with 1, 2 or 3. The Visualized result is then visible in "Measurements".
Digital input
You can raise alarms from digital inputs. These can be configured using the router user interface or through Device Shell. The format is
set service.cumulocity.gpio.<port>.notify=alarm
set service.cumulocity.gpio.<port>.debounce.interval=<SECONDS>
set service.cumulocity.gpio.<port>.alarm.text=<ALARM_TEXT>
set service.cumulocity.gpio.<port>.alarm.severity=<severity>
Possible values for the notify parameter are:
- off: The pin is disabled for any notification.
- alarm: An alarm is raised when the pin reading is "high".
- measurement: Analog reading of voltage will be send as measurement.
The debounce interval reduces electrical noise from the GPIO inputs: The shorter the interval, the noisier the value but the faster the reaction to signal changes. The default debounce interval is 10 mins.
You can override the default alarm text by setting the "text" property. By default, this value is empty and "gpio<N> is active" is used as text, where <N> is the numbering of a GPIO pin.
Valid alarm severities are:
- WARNING
- MINOR
- MAJOR [default]
- CRITICAL
The inputs are checked every second for changes.
Digital output
Digital outputs can be controlled using the "Relay array" plugin, see below in the screenshot. The numbering of the GPIO pins are the same as listed on the router. For the NTC-6200 model, three GPIO pins can be set.
Configuration Management
You can retrieve, modify and save user configuration data. To do this, navigate to the "Configuration" tab of the router, click on the "Reload" button in the "CONFIGURATION" widget to request configuration data. It will take a few seconds to download. After the configuration data has arrived, you will see a list of parameters and their corresponding values. You can then make changes to the configuration and save them back to the device.
You can also request a configuration snapshot from the device and later apply the configuration snapshot to other devices.
Starting from agent version 3.1.1 there is also RDB snapshot support, which is a super-set of the configurations. This is mainly for troubleshooting purpose.
You can also take entire configuration snapshots including the non-textual parts of the device and send reference configuration snapshots back to the device.
Configuring devices to use SMS mode
To use SMS commands for devices, open the router's web interface and navigate to "Services", "SMS messaging", then "Diagnostics". Configure the device as follows:
- Either disable "Only accept authenticated SMS messages", or add permitted senders to the white list. Usage of passwords is not supported.
- Turn the other settings on.
For more information please refer to "Control devices via SMS".
Device Shell
With Device Shell, you can read and write individual configuration parameters from the device, as well as execute diagnostic commands. For more information, please refer to the user guide. Consult the Netcomm documentation for valid parameters and diagnostic commands. The general format is:
- "get <parameter>" to read a parameter from the device.
- "set <parameter>=<value>" to write a parameter to the device.
- "execute <command>" to execute a diagnostic command on the device.
Multiple get, set and execute commands can be sent using a semicolon as separator. Click the "Get Predefined" link to access frequently used parameters and commands.
Event notifications
The router reports certain system events as notifications, which can be forwarded to Device Integration Platform as alarms. The system events help, for example, in troubleshooting mobile network issues. For more information on the different types of events and how to forward them, please consult the Netcomm documentation (for example, Section "Event notification" in the user's guide). To forward an event as alarm, set up a UDP destination sending to Port 1331 on localhost (Section "Destination configuration").
Cloud Fieldbus
You can connect Modbus-TCP and Modbus-RTU slaves to the router via LAN and serial port, respectively, and manage them remotely in Device Integration Platform. To do so, you need to
For Modbus-TCP setup:
- Establish LAN connectivity. Use the "Network" tab as described above and the corresponding configuration mechanism on the Modbus device to enable IP communication between the router and the your Modbus-TCP slaves.
- Configure the Modbus-TCP port in the Device Integration Platform menu on NetComm device's web UI if you are using a different port than the default 502, see "Configuring the router".
For Modbus-RTU setup:
- Connect the router and your Modbus-RTU slaves via a serial cable.
Configure serial port mode via device shell:
set serial.iomode.default=<mode>
where <mode>
can be rs232, rs422 or rs485. You may need to reboot the device after changing the mode.
The default serial port
/dev/ttyAPP4
should work with no further configuration. In case it's empty or you need to configure a different port, it can be configured in the Device Integration Platform menu in devices' web UI, see "Configuring the router".Some USB to serial adapters have echo mode enabled by default, this can render the Modbus communication stop working completely. If you have one of these adapters, consult the adapter's manufacturer about how to disable it.
Then:
- Subscribe your account to the Cloud Fieldbus app by contacting support@softwareag.com.
- Configure Modbus communication as described in the Cloud Fieldbus user's guide.
- Enable or disable write permission by setting the "Modbus read only" property in the Device Integration Platform menu on the device's web UI, see "Configuring the router". Set it to 0 means allow write permission, while 1 means disallow Modbus write permission.
Log viewer
You can download and view logs from the device. Log files can be quite big, you can set filtering criteria to get only what is interesting for you.
From right you can set date range (date from and date to), you can select log file. Next you can search the text, and only matching lines are retrieved from the device. You can also limit matched lines.
Received logs are visible in a list below. You can click on it to show log file content at the bottom of the page. Last requested log is opened automatically.