Skip to main content

RAK7432/RAK7434 Quick Start Guide

Prerequisite

Before going through each step in the installation guide of the WisNode Bridge Analog RAK7432 (4-20 mA) or RAK7434 (0-5 V), make sure to prepare the necessary items listed below:

Hardware Tools

  • RAK7432/RAK7434
  • Micro USB cable
  • Gateway in range, for testing
  • A Windows/Mac OS/Linux computer

Software Tools

Product Configuration

Typical Network Application

RAK7432/RAK7434 converts data from the 4-20 mA/0-5 V analog protocol into LPWAN wireless messages and delivers it to a cloud server through an LPWAN gateway. Using the RAK7432/RAK7434, you can convert data from a conventional 4-20 mA/0-5 V analog sensor to a wireless network.

Figure 11917: Sample communication with 4-20mA/0-5V analog-enabled devices

Connect the RAK7432/RAK7434 to the Sensor

Power Interface Configuration

The RAK7432/RAK7434 device can be powered either by:

  • DC (VIN/GND) terminals
  • Micro USB

The DC screw terminals are supporting 12 V to 24 V. The Micro USB port can be used to power the RAK7432/RAK7434, up to 5 V / 500 mA DC. At the same time, the USB port is used as the configuration port for the device. You can import your configuration settings using the Micro USB cable to connect the RAK7432/RAK7434 to a computer’s USB port.

NOTE

The Micro USB port can be used only for powering the device. It cannot provide power to VOUT and power other devices in the other connected 4-20 mA/0-5 V.

Figure 11918: RAK7432/RAK7434 bridge with connected sensor and power supply

Data Interface Configuration

The RAK7432/RAK7434 analog interface allows you to connect sensors with the same output. The VOUT on the data interface can supply external power to the analog sensor (only when the device is powered from the DC input). The VOUT output voltage is the same as the DC input voltage VIN.

Figure 11919: RAK7432/RAK7434 interface pin definition

Gateway Connection Settings

In this section, the RAK7432/RAK7434 WisNode Bridge Analog will be connected to the RAKwireless LoRaWAN Gateway. For this demonstration, a RAK7289 WisGate Edge Pro V2 gateway will be used. Listed below are the prerequisites for this section.

  • RAK Serial Port Tool – Used to configure and set up the RAK7432/RAK78434 WisNode Bridge Analog.
  • Documentation – A guide on how to configure RAK7289 WisGate Edge Pro V2.

Gateway Configuration

Built-In Network Server Setup
  1. Start by accessing the gateway. You can see how to do it on the WisGateOS V2 user manual.
Figure 11920: WisGateOS V2 login page
  1. Once logged in, head to the LoRa menu.
Figure 11921: LoRa page
  1. By default, the gateway works as a Built-In Network server. If that is not the case, check the Built-in Network Server Mode Settings on the WisGateOS V2 User manual to switch the mode to Built-in network server.
Adding Application
  1. Once the gateway is in Built-in network server mode, head to the Applications tab.
Figure 11922: Application page
  1. Click the Add application button or add one now link to add a new application. On the new page fill in the following information.
  • Application name - type a name for the application.
  • Application description - optionally you can write a description of the application.
  • Application Type - from the drop-down menu select the type of application.
  • Unified Application key - all devices will use the same application key. Selecting this option pops up an Application Key field. You can type your application key there or use the Autogenerate button to generate one.
Figure 11923: Unified application key

The Auto Add Device switch activates an Application EUI field. The device will be automatically added to the application after the application EUI and key verification.

Figure 11924: Auto add device
  • Separate Application keys – each device will have its own application key. The key is added when registering the device.
  • Payload type - from the drop-down select CayenneLPP payload type and turn on the Only forward data object feature.
Figure 11925: Adding application
  1. Once this is set, click Save Application to add the application.
  2. After the application is added, head to the End devices tab. The devices should automatically register upon join request if you are using the Auto Add Device feature.
Figure 11926: Successfully added end device

If that’s not the case, click the Add end device button. On the End device information page fill in the following information:

  • Activation Mode - choose the activation mode of your device:
    • OTAA
    • ABP - This mode pops up two additional fields:
      • Application Session Key
      • Network Session Key
Figure 11927: Adding ABP device
  • End device (group) name – the name of the device.
  • End device description (optional) – optionally, you can add a description for the device.
  • Class – the class of the device.
  • Frame Counter width – the width of the frame counter. Leave it as default.
  • LoRaWAN MAC Version – the LoRaWAN MAC version. V1.0.2 pops up a LoRaWAN Regional Parameters reversion field where you need to select the reversion of the device.
Figure 11928: Successfully created application
Adding the Device
  1. Once everything is set, click Add end devices to go to the page and add the device.
Figure 11929: Adding end device
  1. In the Adding end devices page, type the device EUI at the End Device EUI (main) and click Add to “End Devices list”. If the EUI is correct, the device will show in the End devices list. If the EUI is not correct, the devices will show in the End devices with an error.
  2. Once the device is added to the End devices list click Add end devices. Confirm you are adding the device.
Figure 11930: Confirmation message for adding a device

RAK7432/RAK7434 Configuration

Connect the RAK7432/RAK7434 to Your Network
  1. Connect the RAK7432/RAK7434 to a computer using the Micro USB cable.
  2. Open the RAK Serial Tool and select the correct COM port. The default baud rate is 115200.
  3. After selecting, press Open.
Figure 11931: RAK Serial tool
  1. Run the following commands:
  • To set up the Device EUI, run the command:

    AT+DEVEUI=<Device EUI>
  • To check the Device EUI, run the command:

AT+DEVEUI
  • To set up the Application EUI, run the command:
AT+APPEUI=<application EUI>
  • To set up the Application Key, run the command:
AT+APPKEY=<application Key>
  • To check the previously configured Application EUI and Key, run the commands:
AT+APPEUI
AT+APPKEY
Figure 11932: Configuring the RAK7432/RAK7434
Set the Frequency Region

The node supports the following Regional Frequencies:

  • EU433
  • CN470
  • CN470
  • RU864
  • IN865
  • EU868
  • US915
  • AU915
  • KR920
  • AS923

For this demonstration, EU868 will be used. To set the desired regional frequency band, use the command:

AT+REGION=EU868
NOTE

The regional frequency settings need to be consistent with the RAK commercial gateway-supported band.

Operating and Activation Mode Settings
  1. Supported operating modes are three: Class A, Class B,and Class C. To set the operating mode (Class C in this case), you need to execute the AT command:
AT+CLASS=C
NOTE

Changes will take effect as soon as they are made.

  1. Activation mode supports the following two modes: ABP and OTAA. To set the activation mode (OTAA in this case), you need to execute the AT command:
AT+JOINMODE=OTAA
  1. Restart is needed for the modification to take effect. To restart the RAK7432/RAK7434, execute the command:
AT+RESTART
  1. If everything is configured right, after the execution of the restart command this output pops up in the RAK Serial Tool:
Figure 11933: RAK7432/RAK7434 successful join

Connecting to The Things Network V3 (TTNv3)

At The Things Conference 2021, it was announced that The Things Network is upgrading to The Things Stack v3.

This section will show how to connect RAK7432/RAK7434 WisNode Bridge Analog to The Things Stack v3.

First, log in to TTNv3. To do so, head to the TTNv3 site. If you already have a TTN account, you can use your The Things ID credentials to log in.

Figure 11934: The Things Network home page
Figure 11935: The console page after successful login
NOTE

To be able to connect RAK7432/RAK7434 WisNode Bridge Analog to TTNv3 you should already have connected a gateway in range to TTNv2 or TTNv3, or you have to be sure that you are in the range of a public gateway.

Adding an Application

NOTE

This tutorial is for the EU868 Frequency band.

  1. To create an application, choose Create an application (for new users that do not already have created applications) or Go to applications > + Add application (for users that have created applications before).
Figure 11936: Create an application
  1. Fill in the needed information:
  • Owner - Automatically filled by The Things Stack, based on your account or created Organization.
  • Application ID - This will be the unique ID of your application in the Network. Note that the ID must contain only lowercase letters, numbers, and dashes (-).
  • Application name (optional) - This is the name of your application.
  • Description (optional) – Description of your application. Optional application description; can also be used to save notes about the application.
  1. After you fill in the information, click Create application. If everything is filled in correctly, you will see the same page, as shown in Figure 21.
Figure 11937: Application overview

Registering and Configuring the Device in OTAA Mode

Registering the Device in OTAA Mode
  1. From the Application Overview page, click + Register end device.
Figure 11938: Adding a device in OTAA mode
  1. Select Enter device specifics manually and fill in the Frequency plan.
  2. Select LoRaWAN version 1.0.3 and fill in the JoinEUI (AppEUI).
NOTE

For this example, the Europe 863-870 MHz (SF9 for RX2 - recommended) plan is chosen.

  1. For the JoinEUI, the AppEUI uniquely identifies the owner of the end device. It is provided by the device manufacturer. To get the AppEUI, connect your device via a USB cable to your computer. Open RAK Serial Port Tool, choose the correct COM port and BaudRate, and run the following command:
AT+APPEUI
Figure 11939: AppEUI of the device
  1. Press the Confirm button next to the JoinEUI field.
Figure 11940: Registering the device
  1. The Provisioning information section will expand. Scroll down to enter the required data for the device.
Figure 11941: Registration Data

Here you must enter the following information:

  • DevEUI - The DevEUI is the unique identifier for this end device. It is provided by the manufacturer and is printed on the label on the back of the device.
  • AppKey - The root key to deriving session keys to secure communication between the end device and the application. AppKey can be generated by clicking the Generate button name.
  • End device ID – The End device ID is automatically filled based on the DevEUI. It can be changed. Note that the end device ID must contain only lowercase letters, numbers, and dashes (-).
NOTE

If you are going to register more than one device of this type, you can choose the option Register another end device of this type and be transferred to the same page to register the next device.

  1. After filling in the registration information, click Register end device.
Figure 11942: Registered device
Configuring the Device in OTAA Mode
  1. For configuring the node you will need the following three parameters: Device EUI, Application EUI, and Application Key. You can see them all on the Device Overview page, but since the two EUIs come with the device, you only need the Application Key from there.
Figure 11943: OTAA device parameters
  1. Using the RAK Serial Port Tool, set the join mode, device class, and your LoRaWAN region to your correct frequency band, with the following set of AT commands:
  • For the join mode (OTAA)

    AT+JOINMODE=OTAA
  • For the class (Supported classes are: Class A, Class B, and Class C. Remember for different classes to change the command with the correct letter, for example for Class B it will be AT+CLASS=B, in this case, it is Class A.)

AT+CLASS=A
  • For the region, replace the frequency band with the one of your LoRaWAN region. Refer to the TTN site to see more about your frequency plan.
AT+REGION=EU868
Figure 11944: Setting up the RAK7432/RAK7434 operating modes
NOTE

The following tutorial is based on using the EU868 frequency band.

  1. Now that those parameters are set, enter the App Key, using the command below. Remember to replace the "XXXX" with the corresponding parameter value for your particular case.
AT+APPKEY=XXXX
Figure 11945: Setting up the RAK7432/RAK7434 OTAA parameters
  1. To connect to the LoRaWAN Network after configuration, the device must be restarted. Restart it with the command:
AT+RESTART
Figure 11946: Joining the network configuration
  1. You can see in the Live data feed that the RAK7432/RAK7434 WisNode Bridge Analog is successfully joined.
Figure 11947: Receiving data in the Live data feed
Configuring the Analog Interface

Modifying the following values is not necessary but depends on the use case you need.

  1. Let’s set the AINPERIOD. This value determines the acquisition reporting period. The default value is 600 s. Now we are going to set it to 100 s:
AT+AINPERIOD=100
Figure 11948: AINPERIOD command execution
  1. The next step is to change the value range (the minimum and maximum value) of the analog interface data.
AT+AINVALUERANGE=1:-150:150
Figure 11949: AINVALUERANGE command execution
  1. AINLPMODE (Low power mode) will also need to be changed. Enabling this value will allow the analog data input interface to be turned off while the device is in AINPERIOD (while no acquisition is initiated).
AT+AINLPMODE=1
Figure 11950: AINLPMODE command execution