Getting Started with Advantech's WISE-4610 Industrial LoRaWAN I/O Module

Description

This post covers setting up the WISE-4610P-NA Industrial LoRaWAN I/O module with the S617T plugin I/O base, reviewing it’s attributes/capabilities, configuring it and adding it to The Things Stack private LoRaWAN network. As part of the setup, Advantech’s WISE Studio software utility will be used to configure and communicate with the WISE-4610 over USB.

image

Hardware

Software

  • Advantech WISE Studio
    WISE-Studio is a tool for configuring WISE modules. The software provides a web based interface that is similar for different models. For WISE modules configured via Ethernet, LAN, or WLAN, WISE-Studio enables communication with the WISE module’s internal web server. For modules configured via USB, WISE-Studio executes a web server on the computer installed with the software. The web server then uses the USB interface to communicate with the WISE module.
  • The Things Stack
    The Things Stack is an enterprise grade LoRaWAN network server, built on an open source core. The Things Stack allows you to build and manage LoRaWAN networks on your own hardware or in the cloud.

Background and Unboxing

Advantech’s WISE-4610 has multiple I/O options in the form of plugin modules that are attached to the base of the 4610. I/O options include analog input (current or voltage), digital input/output, RS-485 and switched output voltage. Hardware used in the project include the WISE-4610P-NA and WISE-S617T modules.
Unboxing the WISE-4610P-NA reveals the WISE-4610, 868/915 MHz antenna, DIN mounting base, and screws for securing a plug-in I/O module as shown below.

Unboxing the WISE-S617T module reveals the plugin module and an S617 sticker (describing S617T I/O types) for attaching to the WISE-4610.

The S617T includes 2 analog inputs, 2 digital inputs, 1 digital output, 2 power outputs with 1 RS-485 for I/O. Details on pinout and I/O are shown in below I/O screw terminal connector picture and diagram.
image

The analog inputs can be configured as either voltage or current depending on jumper CN6 and CN7 setting (default setting is voltage on AI1 and AI2 inputs). Jumpers are located in the S617T module as indicated below.

The S617T nodule is inserted into the base of the WISE-4610 and secured using the provided screws.

WISE-Studio Software Utility Setup

WISE-Studio is a tool for configuring WISE modules (the utility can be downloaded from WISE Studio). The tool provides a web based interface that is similar across multiple WISE models. For modules configured via Ethernet, LAN, or WLAN, WISE-Studio enables communication with the WISE module’s internal web server. For modules configured via USB (like the WISE-4610), WISE-Studio executes a web server on the computer installed with the software. The web server then uses the USB interface to communicate with the WISE module. The module information can be accessed via the embedded web page or a web browser.

1 - Download and install the USB driver from https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers.

2 - Download and install WISE Studio from http://support.advantech.com/.

3 - To power the module, connect a DC power source to
the +Vs and -Vs pins.

4 - Connect the module to your computer via the microUSB port.

5 - Open WISE Studio Utility, on Serial Port select Go To Configuration. Then select appropriate COM port and click connect.

image

Once the PC is connected to the WISE-4610 you can go to the Information page to view module, LoRa, device and power status details. Additional pages include Configuration, I/O Status and Advanced that are used when setting up the 4610. Detailed information on configuring the WISE-4610 can be found in the WISE-4610 User Manual.

Hardware Setup

For this project, a 24V DIN rail power supply is used to power the WISE-4610 and a USB cable connected to a PC running WISE Studio. Below schematic diagram illustrates how the setup is implemented and includes a BOM with Digi-Key part numbers (see Scheme-it AdvantechWISE4610 Project ).
note: USB connection to PC is only used during configuration of the WISE-4610.

Determine WISE-4610 LoRa device EUI, App EUI and App KEY values

The WISE-4610’s Device EUI, App EUI and App key can be found in WISE Studio by navigating to the RF Module tab of the Configuration page.
note: these LoRa parameters will be needed when adding the 4610 to the Things Stack LoRaWAN network.

Add the WISE-4610 I/O controller to The Things Stack LoRaWAN network server

The Things Stack is an enterprise grade LoRaWAN network server, built on an open source core. The Things Stack allows you to build and manage LoRaWAN networks on your own hardware or in the cloud. The WISE-4610 will be added to The Things Stack server so the I/O data payload of the 4610 can be received by the LoRaWAN server. Since the 4610 data payload consists of a multi character string, it needs to be decoded for the various analog/digital I/O and RS-485 data parameter values using a custom Javascript payload parser. Advantech has developed and provides a general purpose WISE Javascript payload parser that needs to be modified to work with The Things Stack.
This project and below steps assume that a Things Stack LoRaWAN server is running and available to add devices to it’s network.

1 - First step is to login to The Things Stack server as admin.

2 - Select “Applications” and open the application to add the WISE-4610 as an end device (for this project example, farm1 will be used).

3 - In application ID “farm1” select + Add end device.

4 - In Register end device screen, select “Register manually”
For Frequency plan select “United States 902-928 MHz FSB 2(used by TTN)”
For LoRaWAN version select “LoRaWAN Specification 1.0.2”
For Regional Parameters version select “RP001 Regional Parameters 1.0.2”
Enter DevEUI, AppEUI and Appkey parameters as determined by RF Module screen in WISE Studio above.
Once all the data parameters have been entered, select Register end device to complete registration of the WISE-4610.

5 - Next, a payload decoder will need to be set up in The Things Stack to decode the parameter values being sent from the 4610. Advantech provides a reference Javascript payload parser for use with 3rd party LoRaWAN gateways that was modified to work with The Things Stack. The decoder and information on the modifications made can be found on github at LoRaWAN/WISE4610 at main · eewiki/LoRaWAN · GitHub .

6 - To set up the payload decoder in The Things Stack, go to the End device screen for the WISE-4610 (end devices are listed by eui ID). Select the Payload Formatters tab. Under Formatter type select “Custom Javascript formatter”. Copy the Javascript code at github link https://github.com/eewiki/LoRaWAN/blob/main/WISE4610/WiseParserV1_6_8_TTNmod.js and paste in Formatter code window and then select Save changes.

7 - Review LoRaWAN messages for WISE-4610 activity. Once the payload decoder has been saved, decoded payload messages will be observable in the Live Data tab.

Example of decoded payload is listed below:

    "received_at": "2023-04-04T18:45:13.139889859Z",
    "uplink_message": {
      "session_key_id": "AYcT4+JJKoHLe7tygE7ZnA==",
      "f_port": 1,
      "f_cnt": 3843,
      "frm_payload": "gQM3AAcHAgAAAAAAAAcnAgAAAAAANAofIACAAAD//+5+NAo/IP9/AADXj/1/EAIBAGAHFgNUMHAsZJw=",
      "decoded_payload": {
        "AI0": {
          "Event": 0,
          "MaxVal": 65535,
          "MinVal": 32494,
          "Range": 4,
          "Raw Data": 32768,
          "status": {
            "High Alarm": 0,
            "Low Alarm": 0
          }
        },
        "AI1": {
          "Event": 0,
          "MaxVal": 36823,
          "MinVal": 32765,
          "Range": 4,
          "Raw Data": 32767,
          "status": {
            "High Alarm": 0,
            "Low Alarm": 0
          }
        },
        "DI0": {
          "mode": 0,
          "status": {
            "DI Change": 0,
            "Get/Clean Counter Overflow": 0,
            "Get/Clean H2L Latch": 0,
            "Get/Clean L2H Latch": 0,
            "Signal Logic": 0,
            "Start Counter": 1
          },
          "value": 0
        },
        "DI1": {
          "mode": 0,
          "status": {
            "DI Change": 0,
            "Get/Clean Counter Overflow": 0,
            "Get/Clean H2L Latch": 0,
            "Get/Clean L2H Latch": 0,
            "Signal Logic": 0,
            "Start Counter": 1
          },
          "value": 0
        },
        "DO0": {
          "Mode": "DO",
          "status": {
            "DO Change": 0,
            "Pulse Output Continue": 0,
            "Signal Logic": 0
          }
        },
        "Device": {
          "BatteryLevel": 84,
          "PowerSrc": 3,
          "Time": 1680633904
        },
        "SequenceNumber": 3,
        "SourceAddress": null,
        "TotalLength": 55
      },

Adding Applications and Integrations

Once the WISE-4610 has been configured and added to The Things Stack LoRaWAN network server the data being uplinked/downlinked from/to the WISE-4610 can be acted upon and/or visualized by adding Applications and Integrations. Many options can be implemented including MQTT, Node-RED, IFTTT, Cloud and others. Additional information can be found at https://www.thethingsindustries.com/docs/integrations/ .

Conclusion

The Advantech WISE-4610P-NA paired with the S617T I/O module provides multiple I/O data capability for sensing and control of digital/analog signals and RS-485 devices over LoRaWAN. Having the data available in The Things Stack or other LoRaWAN network server provides the opportunity for visualizing and acting on the data by of implementing/adding Applications and Integrations in or to a network server.

References