Skip to main content

Get Started with Wio-WM1110 Dev Kit

Preparation

  • Wio-WM1110 Dev Kit x 1
  • Computer x 1
  • USB Type-C Cable x 1
  • J-Link Debug Programmer x 1

Device Connection

Connect the Wio-WM1110 Dev Board to the J-Link Debug Programmer as follows:

pir

Connection:

3V3 (Wio-WM1110 Dev Board) -> VTref (J-Link Debug Programmer Pin 1)
CLK (Wio-WM1110 Dev Board) -> SWCLK (J-Link Debug Programmer Pin 9)
DIO (Wio-WM1110 Dev Board) -> SWDIO (J-Link Debug Programmer Pin 7)
GND (Wio-WM1110 Dev Board) -> GND (J-Link Debug Programmer GND)

Set up your toolchain

Before you can start developing,the following tools are required for this Getting Started Guide.

SEGGER Embedded Studio (SES)

SES is an all-in-one solution for managing, building, testing and deploying embedded applications. This means smooth, efficient development operations thanks to its wide range of features. The powerful project manager enables the management of projects large and small. Version control features enable automatic application deployment.

SEGGER Embedded Studio (SES)-Download
tip

It's recommended to use 5.68 version.

pir

SEGGER J-Link Software and Documentation Pack-Download

nRF5 SDK

The nRF5 SDK provides a rich developing environment for nRF5 Series devices by including a broad selection of drivers, libraries, examples for peripherals, SoftDevices, and proprietary radio protocols.

All code examples included in the SDK are tailored to compile for and run on Wio-WM1110 Dev Kit.

nRF5 SDK-Download

pir

Seeed Example Package

Seeed provides an example project for developers to get started more quickly. This example includes LoRaWAN communication, positioning information acquisition, onboard sensor data acquisition, etc.

Seeed Example-Download

pir

Running a First Test

Add Seeed Example file to nRF5 SDK

Copy the Seeed Example file to the following path of nRF5 SDK: .../nRF5_SDK_17.1.0_ddde560/examples/peripheral/

pir

Let's build the ses_blinky" project to check if your toolchain is set up correctly. Import the "ses_blinky" project.

pir

pir

Compiling the test application

Select "Build" > "Compile project_target".

pir

Programming the test application

After compiling the application, you can program it to the Dev board.

Click "Target" -- "Connect J-Link"

pir

Click "Build" -- "Build and Run" to build the blinky project.

pir

You will see "Download successful" when it has completed.

pir

Then the 2 LEDs on the board will blink as follows.

Get Started

This chapter will walk you through displaying current location information on Node-Red via TTN, and explains how to set up all required servers(Network Server(NS) and an Application Server(AS)).

Architecture & Data Flow

pir

Setup the Keys

Before a device can communicate via the NS, we need to register it with the 3 keys.

Wio-WM1110 DK allows users to set the DevEUI, AppEUI, and AppKey, this is required on the next steps, so you can define our own parameters in the 'lorawan_key_config.h' file, then flash it onto the DK.

File located at: .../nRF5_SDK_17.1.0_ddde560/examples/peripheral/Seeed_Wio_WM1110_Dev_Board/apps/common/lorawan_key_config.h

pir

Or you can get the keys generated by TTN, then fill into the 'lorawan_key_config.h' file and run it on the DK.

pir

LoRa Cloud™ Modem & Geolocation Services

The LoRa Cloud Modem & Geolocation Services provide a full set of lifecycle management features for LoRa® devices operating on a LoRaWAN network. These features include but are not limited to:

  • Comprehensive device telemetry
  • Device and application configuration
  • Clock synchronization
  • Advanced data transport services with robustness against packet loss and transparent data fragmentation (buffer streaming and file upload).
  • Geolocation

To begin, go to the LoRa Cloud™ portal and register for an account.

pir

Step 1: Create an Owner

To create a token, you first need to create an owner. Navigate to the DEVICE OWNERS page. Click CREATE NEW OWNER.

pir

pir

Step 2: Get a Token

A token is required for the application server to authenticate calls to the LoRa Cloud Modem & Geolocation Services server.

pir

Step 3: API URL

The LoRa Cloud Modem & Geolocation Services URL depends on the region in which the device will be deployed. Click "Manage Tokens", then you can check the API URL:

pir

tip

When data is received from a device, it is automatically registered with the LoRa Cloud Modem & Geolocation Services server. This means that the device does not need to be registered beforehand.

LoRaWAN® Network Server(TTN)

Currently we use The Things Network V3

To begin, register for an account with The Things Industries or The Things Network.

Step 1: Create an application

Navigate to Applications page, click "+Create application".

pir

Enter an Application ID, click Create Application to save your changes.

pir

Step 2: Register the Device

Click "Register end device".

pir

Set the following parameters:

Frequency Plan: Select the appropriate Frequency plan for the target region

LoRaWAN version:LoRaWAN Specification 1.0.3

Regional Parameters version: V1.0.3 REV A

pir

tip

JoinEUI/DevEUI/APPEUI: Which you defined in the 'lorawan_key_config.h' file in the previous setting.

pir

Step 3: Create Credentials

The Things Network V3 network server requires that you generate a unique MQTT password. On the Application page of the console:

  • Click Integrations and then MQTT.

pir

  • Select Generate new API Key.

pir

  • Copy the values from the following fields: Server Address, Username, and Password.

pir

Application Server

The application server handles application data and device management frames. As there is no background connection between the LoRaWAN® network server and the LoRa Cloud™ Modem & Geolocation Services, all uplinks related to modem traffic must be forwarded by the application server to the Lora Cloud Modem & Geolocation Services.

We use Node-RED as the application server. Node-RED is a browser-based visual programming tool that allows for fast prototyping. Built on Node.js, Node-RED can be used to wire flows together using a wide array of nodes. These nodes can then be deployed to the Node-RED runtime with a single click.

Install Node.js®

To install Node-RED locally you will need a Supported Node Version

Download the latest 16.x LTS version of Node.js from the official Node.js It will offer you the best version for your system.

pir

When installing Node.js, if you are using a computer that has not had any programming environment installed, we would recommend that you check the box to install the necessary tools while installing Node.js, which will save you a lot of necessary trouble.

The easiest way to install Node-RED is, using Node's package management tool, npm. However, we do not recommend installing Node-RED with npm 1.x, but rather upgrading it to the latest npm 2.x version.

note

On Windows (Requires Windows 10 and above), use the Win+R shortcut and type cmd in the pop-up window to bring up the terminal and execute the following command.

If you are using MacOS or Linux, please execute the following command in the terminal and add sudo in front of the command for non-root users.

npm install -g npm@2.x

Once installed, open a command prompt and run the following command to ensure Node.js and npm are installed correctly.

node --version && npm --version

You should receive back output that looks similar to:

> v18.7.0
> 9.6.5

pir

Install Node-RED

Installing Node-RED as a global module adds the command node-red to your system path. Execute the following at the command prompt:

npm install -g --unsafe-perm node-red

If Node-RED is installed as a global npm package, then execute the command node-red directly:

node-red

This will allow you to see the Node-RED editor on http://localhost:1880.

pir

The user interface has three key areas:

pir

  • Palette: This is where you can select nodes; these are functional blocks that can be dragged-and-dropped, and then can be linked together to create a flow.
  • Flow: This is the source code of the program. In this pane, you can link nodes together to create an application.
  • Sidebar: The Sidebar displays any Help or debugging information available for the selected node.

Install libraries

To set up the demonstration, we will install 2 additional libraries:

Click the menu in the top right corner and select "Manage palette".

pir

Select Install on the Palette menu.

pir

Search for "node-red-contrib-loracloud-utils" and install.

pir

Repeat these steps to install the "node-red-contrib-web-worldmap" libraries.

pir

Importing the Flow

The Seeed package includes useful samples to walk you through this example project,just need to import these 2 config file.

.../nRF5_SDK_17.1.0_ddde560/examples/peripheral/Seeed_Wio_WM1110_Dev_Board-master/apps/examples/geolocation_application_server/modem.json

.../nRF5_SDK_17.1.0_ddde560/examples/peripheral/Seeed_Wio_WM1110_Dev_Board-master/apps/examples/geolocation_application_server/geolocation.json

pir

pir

pir

Then you will see the following flows:

pir

Configure the Flow

Configuring the LoRaWAN Network Server (MQTT) All network server connectors are activated by default; however, the MQTT connection must be set up separately. Before you begin, get the required data:

  • MQTT server address
  • MQTT port
  • MQTT username
  • MQTT password

This data can be obtained in Step 3: Create Credentials

pir

Doule click"TTN v3-Uplinks" node,and edit MQTT node.

pir

You can find the Server, Port in the previous step.

pir

Then add the username and password to "Security".

pir

Click Add and then click Done.

pir

Doule click"TTN joinReq" node,and select the MQTT server we added in the previous step.

pir

Modem & Geolocation Service Configuration

To configure the server, the MGS URL and MGS TOKEN values from the previous step

pir

pir

Fill in the EUI of your device.

pir

Click "Deploy" button to delpoy the flow.

pir

Data View

Click "Debug", to view the data returned by the LoRa Cloud Modem & Geolocation Services:

pir

Geolocation

To display the map, add /worldmap to the URL in your web browser. For example: http://127.0.0.1:1880/worldmap

pir

Resources

Seeed_Wio_WM1110_Dev_Board

nRF5-SDK

SEGGER J-Link Software and Documentation Pack

Tech Support

Need help with your Wio-WM1110 Dev Kit? We're here to assist you!

Loading Comments...