how to implement aws integration for wisgate edge v2

Learn how to set up a LoRaWAN® end device with the RAK7268V2 Gateway to enable uplinks and downlinks with Amazon AWS IoT Core for IoT data and control.

Uplinks can be used to send sensor data, including temperature, motion, GPS, or energy readings. In contrast, downlinks enable remote control, configuration updates, alerts, and smart actions, such as switching relays or modifying device behavior based on cloud logic.

Prerequisites

🗒️
NOTE

For this tutorial, the RAK19007 and a RAK4631 from the WisBlock Family as the End Node, and the RAK7268V2 WisGate Edge Lite 2 for the gateway.

Set Up Environment for Evaluation

Configure the Built-in Network Server

All WisGate Edge V2 gateways are pre-configured in the Network Server mode of operation. 

Configure built-in network server
Figure 1: Configure built-in network server

If you want to make modifications, create the application, and add the device needed for this demonstration, refer to the WisGate OS 2 User Manual. It shows the details of the Built-in Network server configuration.

Integrate AWS IoT Core

AWS IoT Core is a cloud-based service that connects your things (devices, sensors, etc.) to other devices and AWS cloud services. It offers software to help you integrate your IoT devices into AWS IoT-based solutions. If your devices can connect to AWS IoT, they can also connect to the cloud services provided by other providers.

1. To go to the IoT Core, from your Console Home, type in the search bar IoT and select the option IoT Core

AWS Search Bar IoT Core
Figure 2: AWS Search Bar IoT Core

Create a Thing

2. To create a thing (add a device) in the AWS IoT console, use the navigation panel on the left side. In the Manage section, click the All Devices dropdown and then choose Things.

IoT Core Main Page
Figure 3: IoT Core Main Page

3. Click on the button Create things.

IoT Core Thing Page
Figure 4: IoT Core Thing Page

4. Select the number of things to add. For this demonstration, select Create single thing and click Next.

IoT Core Create Things
Figure 5: IoT Core Create Things

5. Enter a name for your item in the Thing Name field, then click Next.

IoT Core Specify Thing Properties
Figure 6: IoT Core Specify Thing Properties

6. To generate certificates for your thing, select Auto-generate a new certificate (recommended) and click Next.

Figure 7: IoT Core Configure Device Certificate

7. A policy is required for your item. Click Create Policy.

IoT Core Attach Policies to the Certificate
Figure 8: IoT Core Attach Policies to the Certificate

8. You will be automatically redirected to the Security > Policies section in a new window.

IoT Core Create Custom Policy
Figure 9: IoT Core Create Custom Policy

9. Fill in the following fields, then click Create:

  • Name: Enter a name for your policy. For this example, use RAK_Policy.
  • Policy effect: Select Allow.
  • Policy action: Choose * for all actions.
  • Policy resource: Enter *.

10. Return to the previous window and refresh it by clicking the Refresh button. You will then see the newly created policy appear in the list. Select it and click Create Thing.

11. Select the newly created policy.

IoT Core RAK Policy Attached to the Certificate
Figure 10: IoT Core RAK Policy Attached to the Certificate

12. In the open window, download all the certificates and keys, then click Done.

‼️
IMPORTANT

Save the downloaded certificates and Public and Private keys, as they cannot be downloaded again if needed.

IoT Core Download Certificates and Keys
Figure 11: IoT Core Download Certificates and Keys

Your thing has been successfully created.

IoT Core Thing Created Successfully
Figure 12: IoT Core Thing Created Successfully 

Configure Global Integration for the AWS Proxy

1. Configure the global integration of the gateway for AWS IoT Core. 

2. In the gateway's web UI, navigate to LoRa > Configuration > Integration Interface Parameters

3. Click on Enable Integration Interface and select AWS IoT Core as the Integration Mode.

WisGateOS 2 AWS Certificate Loading
Figure 13: WisGateOS 2 AWS Certificate Loading

4. Fill in the following information:

  • AWS URL: You can now configure the endpoint and manage it, along with other domain settings, in a centralized location under the Connect section of the AWS IoT navigation. This information can be found in the Domain Configuration section.
IoT Core AWS URL on the Domain Configuration Tab
Figure 14: IoT Core AWS URL on the Domain Configuration Tab
  • AWS Port: Enter port 8883 for the AWS IoT Core.
  • CA Certificate: Use the certificate you downloaded (see Figure 15).
  • Vendor Certificate: Use the certificate you downloaded (see Figure 15).
  • Vendor Key: Use the key you downloaded (see Figure 15).
WisGateOS 2 Order Of the Certificates and Keys
Figure 15: WisGateOS 2 Order Of the Certificates and Keys

Firmware Configuration for the End Device

In this section, RAK19007 and RAK4631 are used from the WisBlock Family as the End Device.

1. Navigate to the examples in Arduino and search for LoRaWan_OTAA. The path is: Examples > RAK WisBlock RUI examples > Example > LoRaWan_OTAA.

Arduino Firmware Example
Figure 16: Arduino Firmware Example

2. Write your LoRaWAN parameters as follows:

  • OTAA_BAND: The band used in your country; in this case, it is AU912.
  • OTAA_DEVEUI: This can be found on the device itself, specifically on the RAK4631.
  • OTAA_APPEUI: In this case, it is the same as the DEVEUI.
  • OTAA_APPKEY: This key can be found on the LNS of the gateway.
Arduino Firmware Keys
Figure 17: Arduino Firmware Keys

3. After uploading the firmware, you will see how the end devices send data to the gateway and then to the AWS Console.

Arduino Console Output Sending Messages
Figure 18: Arduino Console Output Sending Messages

4. On the AWS topics, you can verify the connection by using the # topic, where the Uplinks will be displayed on the console.

Message Received on AWS
Figure 19: Message Received on AWS

Verify a Successful Integration

See Messages from the Device in the AWS IoT Console

1. To view messages from the end node, navigate to the Test > MQTT test client tab in the AWS IoT console.

IoT Core MQTT Test Client Page
Figure 20: IoT Core MQTT Test Client Page

In the Subscription topic field, subscribe to all topics by typing # to view the data (join, uplink, downlinks, etc.) from the node.

RAKwireless offers a decoder for all WisNode devices based on RUI. All WisNode devices support the Cayenne LPP payload format, which can be activated through the gateway's Web UI. 

2. To do this, navigate to LoRa > Applications > Your_application > Configuration > Payload format.

WisGateOS 2 Built-In Server RAK_AWS Application
Figure 21: WisGateOS 2 Built-In Server RAK_AWS Application

3. In the Payload Type drop-down menu, select Cayenne LPP. Then, enable the option to Only forward data object to receive only the sensor data. Click Save Changes.

MQTT Client Subscribe to a Topic
Figure 22: MQTT Client Subscribe to a Topic

4. To send messages to the end node, navigate to the AWS IoT console and select Test > MQTT test client > Subscribe to a topic.

You need to fill in the following:

Specify a topic to publish to, for example, myTopic/1. This is the name of the topic to which you want to publish a message. Below is the template for the downlink topic used by the RAK Gateway: application/application_name/device/eui/tx 

Where:

  • Application_name: This is the name of your application.
  • eui: This is the device’s EUI.

An example of a downlink topic is:

application/RAK_AWS/device/ac1f09fffe06XXXX/tx

Message Payload: This is the message you want to send to the end node. It must be in the following format:

{"confirmed":true,"data":"SGVsbG8gRnJvbSBSQUs=","fPort":10}

Where:

  • Confirmed can be either true or false.
  • Data: This represents the message content, which in this case is "Hello From RAK." The content must be base64 encoded. You can use a converter for this purpose.
  • fPort is the port number used to send the data, which can range
    from 1 to 255.

5. Once everything is set up correctly, go to Publish a Topic to send the message.
 

MQTT Client Publish to a Topic
Figure 23: MQTT Client Publish to a Topic

6. The message can be viewed in the Live Device Data section of the node within the gateway's web UI.

WisGateOS 2 End Device Packet Capture
Figure 24: WisGateOS 2 End Device Packet Capture

 

If the process is done correctly, you can check that the downlink message appears on the end device in the Arduino Console.

Arduino Console Downlink Message Received 
Figure 25: Arduino Console Downlink Message Received 

 

harold-duarte.png

Harold Duarte

Harold is an electronics engineer and senior technical content writer at RAKwireless. He is passionate about learning and developing new solutions for IoT, making it #IoTMadeEasy.


Changelog
  • Version 1 - How to Implement AWS Integration for WisGate Edge V2
    • Date Published: 02/15/2023
  • Version 2 - How to Implement AWS Integration for WisGate Edge V2
    • Author: Harold Duarte
    • Reviewer: Caryl Enanor
    • Date Published: 08/12/2025

Updated