Introduction to TPC For Arduino Makers

Overview of this Activity

The goal of this activity is to introduce the extensive services of the ThingPark Community (TPC) LPWAN platform, the Arduino development environment (Arduino IDE 2.0), a user-friendly integrated development environment (IDE), and an IoT module (Arduino MKR WAN 1310).

This exercise will enable you to use the Arduino IDE with an Arduino MKR WAN 1310 board to send a LoRaWAN® message to the Actility TPC platform. This exercise does not require prior knowledge of the Arduino environment or prior experience working with TPC. A deep understanding of computer hardware or software development is not required to successfully perform the activity.

This cookbook will, in a nutshell, demonstrate how to set up a whole LoRaWAN® solution using free services without any prior experience. Additionally, you can use any LoRaWAN® compatible sensor in this activity with only minor modifications.

The solution works as follows: When the LoRaWAN® packet sent using your IoT device is received by the LoRaWAN® gateway managed by TPC, it is transferred to the TPC LoRaWAn Network Server, and then relayed by the network server to the backend application. These packets sent by you can be monitored by connecting to the Webhook site on your web browser.

In this activity, you are going to perform two sets of steps. The first set is to prepare the environment, and the second set is to monitor the LoRaWAN® packets sent by Arduino MKR WAN 1310.

Implementation Approach

To implement the solution described in the Solution Overview section, you need to do the following:

  • Step 1: Install the Arduino IDE on your computer to manage the application on your Arduino device, update the firmware of the LoRaWAN® module and access your device DevEUI.
  • Step 2: Upload the necessary libraries to the Arduino IDE to enable it to use Arduino MKR WAN 1310.
  • Step 3: Install and run the BLINK application that comes with the Arduino IDE to verify your basic setup.
  • Step 4: Install the Arduino MKR WAN library to enable the application environment to send LoRaWAN® packets.
  • Step 5: Update the LoRaWAN® module firmware on Arduino MKR WAN 1310 using MKR WAN library sketch.
  • Step 6: Create the Arduino MKR WAN 1310 device definitions in TPC using the FirstSteps sketch with the Arduino MKR WAN library on the device.
  • Step 7: Create a Webhook page to monitor LoRaWAN® packets without application development.
  • Step 8: Create a TPC account, if you don’t already have one.
  • Step 9: Create a route to your WebHook application on the TPC platform.
  • Step 10: Commission your Arduino MKR WAN 13110 on TPC using its LoRaWAN® DevEUI identifier.
  • Step 11: Send your first LoRaWAN® test packet using the LoRaSendAndReceive sketch that comes with the Arduino MKR WAN library.
 

Monitoring Approach

LoRaWAN® packets sent using the Arduino MKR WAN 1310 device pass through many systems. Therefore, it is useful to describe how to monitor all key interface points.

  • Step 12: Monitor uplinks and downlinks using the Arduino IDE console.
  • Step 13: Monitor LoRAWAN frames on the device management dashboard of TPC.
  • Step 14: Review the device communication history on TPC Wireless Logger.
  • Step 15: Connect to the Webhook site using any web browser.
 

Requirements

To implement this solution, you will require the following components:

  • ThingPark Community account
  • Arduino IDE
  • Arduino MKR WAN 1310
  • Arduino MKRWAN library
  • Webhook.site

ThingPark Community account

The Actility ThingPark Community platform is an IoT network platform that gives developers, solution providers, and system integrators a place to work together to make and deploy IoT applications. The platform is based on LoRaWAN® technology, which is a low-power, long-range wireless communication protocol that lets devices connect to the internet.

The ThingPark Community platform gives developers a number of features and tools to help them build IoT solutions.

  1. Device management: The platform makes it easy for users to sign up and manage their devices, as well as check on how well they are working and change their settings.
  2. Data management: The platform provides tools to collect, store, and analyze data from IoT devices and to generate insights and actionable intelligence.
  3. Application development: The platform provides a range of tools and APIs (Application Programming Interfaces) to enable developers to create customized IoT applications.
  4. Integration: The platform is easy to connect to other systems and platforms, such as enterprise applications and cloud services.
  5. Collaboration: The platform provides a collaborative environment for developers, solution providers, and system integrators to share knowledge and expertise and collaborate on projects and solutions.
 

Overall, Actility’s ThingPark Community platform is a comprehensive and flexible platform that enables users to create, deploy, and manage a wide range of IoT applications and solutions. It provides information about LoRaWAN® and related IoT topics.

You can find more information at the ThingPark Community website.

In the course of the activity, you’re going to create an account on TPC if you don’t already have one.

Arduino IDE

The Arduino IDE (Integrated Development Environment) is an open-source software application used to program and upload code to Arduino boards. It provides a user-friendly interface for writing, compiling, and uploading code to Arduino boards. The IDE is designed to work with a variety of Arduino boards, including the popular Uno, Mega, and Nano boards, and supports programming in the C++ language.

The Arduino IDE comes with a built-in text editor that allows you to write and edit code, and it also includes a library manager that makes it easy to find and install third-party libraries. Additionally, the IDE includes a serial monitor that allows you to communicate with your Arduino board and monitor its output.

Overall, the Arduino IDE is a powerful tool that enables hobbyists, students, and professionals alike to create a wide range of electronic projects, from simple LED blinking to more complex robotics and automation systems.

You can find additional information on the Arduino IDE page. In the course of the activity, you will download and install the software on your computer.

Arduino MKR WAN 1310

The Arduino MKR WAN 1310 is a small, powerful board made for IoT projects. It is based on the Microchip SAMD21 32-bit ARM Cortex-M0+ microcontroller and the Murata CMWX1ZZABZ LoRaWAN® transceiver module, which provides long-range communication capabilities.

The board includes a built-in battery charger, which allows it to be powered by a Li-Po battery, and it also includes a range of sensors, such as an accelerometer, a gyroscope, and a temperature sensor. Additionally, it features a secure element chip for enhanced security.

It can also be programmed using the Arduino IDE, making it easy to get started for those familiar with Arduino boards.

Overall, the MKR WAN 1310 is a powerful and flexible board that works well for a wide range of IoT applications, such as monitoring the environment, tracking assets, and smart farming, among others.

You can use the Arduino MKR WAN 1310 to send LoRaWAN® packets to Actility TPC.

You can find more information on the official product page of the Arduino MKR WAN 1310. And you can purchase the device from the Arduino store.

Arduino MKRWAN library

The Arduino MKRWAN library is a software library designed to work with the Arduino MKR WAN 1300 and MKR WAN 1310 boards. These boards are designed to provide a simple and cost-effective way to connect devices to the LoRaWAN® network, a Low Power Wide Area Network (LPWAN) protocol that allows long-range wireless communication with low power consumption.

The MKRWAN library provides a set of functions that allow you to easily communicate with the LoRaWAN® network. This includes functions for configuring the radio module, sending and receiving data, and managing the device’s connection to the network.

The library is open source and designed to be used with the Arduino IDE, making it easy for developers to get started with LoRaWAN® communication using the Arduino platform.

You can find more information on the library at the Arduino library reference page .

Finally, you can find the source code on the GitHub page of the library. You don’t have to download the repository, it will be installed during the course of the activity using the Arduino IDE.

 

Webhook.site

Webhook.site is a website that provides a simple and convenient way to test webhooks. A webhook is a mechanism that allows an application to receive real-time information from another application or service. With Webhook.site, you can easily create a unique URL that can be used as a webhook endpoint to receive and inspect the payload of HTTP requests, such as POST or GET requests.

The website is often used by developers and testers to quickly and easily test webhook integrations without having to set up a separate server or use complex tools. The website provides a clean, user-friendly interface for viewing and analyzing the data sent by webhook requests, making it a useful tool for debugging and troubleshooting. The service is free to use, and you can create as many webhook endpoints as you need.

Activity Steps

In this activity, you are going to perform two sets of steps. The first set is to prepare the environment, and the second set is to monitor the LoRaWAN® packets sent by Arduino MKR WAN 1310.