Skip to content

Commit 75ec3b3

Browse files
committed
Connecting to The Things Network Using OpenMV content update (1 image require attention but could be an exception due TTN)
1 parent 84e0d6b commit 75ec3b3

File tree

1 file changed

+17
-13
lines changed
  • content/hardware/04.pro/shields/portenta-vision-shield/tutorials/things-network-openmv

1 file changed

+17
-13
lines changed

content/hardware/04.pro/shields/portenta-vision-shield/tutorials/things-network-openmv/content.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Connecting to The Things Network Using OpenMV
33
coverImage: assets/vs_mp_ttn_cover.svg
44
difficulty: intermediate
5-
tags: [Getting Started, OpenMV, IDE, Setup, TTN, LoRa]
5+
tags: [Getting Started, OpenMV, IDE, Setup, TTN, LoRa® Technology]
66
description: This tutorial explains how to connect your Portenta H7 to The Things Network (TTN) using the Vision Shield's LoRa® Connectivity feature.
77
author: Lenard George, Ignacio Herrera, Benjamin Dannegård
88
hardware:
@@ -16,18 +16,18 @@ software:
1616

1717
This tutorial explains how to connect your Portenta H7 to The Things Network (TTN) using the Vision Shield's LoRa® Connectivity feature. A data communication channel will be enabled between the H7 and a TTN application that will be configured on your TTN console.
1818

19-
***In order to connect your Portenta to the TTN, make sure you are within the range (max. 10 Km) from an available LoRa® Gateway. Indoor gateways will have a much shorter range. It is recommended that you check LoRa® Gateway availability on [The Things Network map](https://www.thethingsnetwork.org/map) before you try this tutorial.***
19+
***In order to connect your Portenta to the TTN, make sure you are within the range (max. 10 Km) from an available LoRa® Gateway. Indoor gateways will have a much shorter range. It is recommended that you check LoRa Gateway availability on [The Things Network map](https://www.thethingsnetwork.org/map) before you try this tutorial.***
2020

2121
## You Will Learn
2222

23-
- About LoRaWAN® and The Things Network
23+
- About LoRa® technology and The Things Network
2424
- About creating a TTN application
2525
- How to establish a connection between the H7 and the TTN
2626

2727
## Required Hardware and Software
2828

2929
- [Portenta H7](https://store.arduino.cc/portenta-h7)
30-
- [Portenta Vision Shield - LoRa](https://store.arduino.cc/portenta-vision-shield-lora)
30+
- [Portenta Vision Shield with LoRa® technology](https://store.arduino.cc/portenta-vision-shield-lora)
3131
- [Dipole Pentaband antenna](https://store.arduino.cc/antenna) or a UFL Antenna of the H7 (x1)
3232
- [OpenMV IDE](https://openmv.io/pages/download)
3333
- [Arduino IDE 1.8.10+](https://www.arduino.cc/en/software), [Arduino IDE 2.0+](https://www.arduino.cc/en/software) or [Arduino CLI 0.13.0+](https://arduino.github.io/arduino-cli)
@@ -36,7 +36,7 @@ This tutorial explains how to connect your Portenta H7 to The Things Network (TT
3636

3737
## Instructions
3838

39-
The Portenta Vision Shield - LoRa can be connected to TTN and can transmit data to other devices connected to this network through a secure channel. This channel is nothing but an application on the TTN network dedicated for your board. In this tutorial, you will be guided through a step-by-step process of setting up your Portenta board and the Portenta Vision Shield - LoRa to communicate with a TTN application using OpenMV and MicroPython. As stated before, to be able to follow this guide, you need to be under coverage of one of the TTN gateways. You can check for [the coverage](https://www.thethingsnetwork.org/map) now, if you have not done so yet.
39+
The Portenta Vision Shield with LoRa® technology can be connected to TTN and can transmit data to other devices connected to this network through a secure channel. This channel is nothing but an application on the TTN network dedicated for your board. In this tutorial, you will be guided through a step-by-step process of setting up your Portenta board and the Portenta Vision Shield with LoRa technology to communicate with a TTN application using OpenMV and MicroPython. As stated before, to be able to follow this guide, you need to be under coverage of one of the TTN gateways. You can check for [the coverage](https://www.thethingsnetwork.org/map) now, if you have not done so yet.
4040

4141
### 1. Setting up the Environment
4242

@@ -65,14 +65,14 @@ After completing these two fields, press the "Create application" button located
6565

6666
Let's take a closer look at these sections:
6767

68-
- **Application Overview**: in order to use this app, you will need the Application ID and a device specific AppKey. An EUI is a globally unique identifier for networks, gateways applications and devices. The EUIs are used to identify all parts of the LoRaWAN® inside the backend server.
69-
- **End devices**: here you can see and manage all the associated devices (e.g. your Portenta H7 with Portenta Vision Shield LoRa, Arduino MKR WAN 1300 or MKR WAN 1310) or proceed with the registration of a new one. Registering a new device lets you generate an AppEUI and an AppKey.
68+
- **Application Overview**: in order to use this app, you will need the Application ID and a device specific AppKey. An EUI is a globally unique identifier for networks, gateways applications and devices. The EUIs are used to identify all parts of the LoRa®-based network inside the backend server.
69+
- **End devices**: here you can see and manage all the associated devices (e.g. your Portenta H7 with Portenta Vision Shield with LoRa® technology, Arduino MKR WAN 1300 or MKR WAN 1310) or proceed with the registration of a new one. Registering a new device lets you generate an AppEUI and an AppKey.
7070
- **Collaborators**: here you can see and manage all the app collaborators, to integrate with other collaborative platforms or to manage access rights to the app with other TTN registered profiles.
7171
- **API keys**: here you can create an API key; it is the most sensible information. It is basically the key to gain access to your app, so keep it safe.
7272

7373
### 3. Updating the Modems Firmware
7474

75-
To be able to use the LoRa® functionality, you need to first update the modems firmware through the Arduino IDE. Connect the Portenta H7 and Portenta Vision Shield to your computer and open the Arduino IDE. The LoRa® module on the Portenta Vision Shield can be accessed by using the [MKRWAN library](https://github.com/arduino-libraries/MKRWAN)(if you cannot find it in your examples list, you can go to **Tools > Library Manager** and type "MKRWAN library" to install it). This library provides all the APIS to communicate with LoRa® and LoRaWAN® networks and can be installed from the library manager. Select the **Portenta H7 (M7 core)** board in the Arduino IDE, like shown below.
75+
To be able to use the LoRa® functionality, you need to first update the modems firmware through the Arduino IDE. Connect the Portenta H7 and Portenta Vision Shield to your computer and open the Arduino IDE. The LoRa® module on the Portenta Vision Shield can be accessed by using the [MKRWAN library](https://github.com/arduino-libraries/MKRWAN)(if you cannot find it in your examples list, you can go to **Tools > Library Manager** and type "MKRWAN library" to install it). This library provides all the APIS to establish LoRa® connectivity and can be installed from the library manager. Select the **Portenta H7 (M7 core)** board in the Arduino IDE, like shown below.
7676

7777
![Select the Arduino Portenta H7 (M7 core) in the board selector.](assets/por_ard_gs_upload_sketch.png)
7878

@@ -88,9 +88,9 @@ If it all went correctly, you should see the same text in your Serial Monitor as
8888

8989
### 4. Configuring the Portenta Vision Shield
9090

91-
It is now time to connect your Portenta H7 and Portenta Vision Shield - LoRa to TTN. You will need to upload code to the board using [OpenMV](https://openmv.io/pages/download)
91+
It is now time to connect your Portenta H7 and Portenta Vision Shield with LoRa® technology to TTN. You will need to upload code to the board using [OpenMV](https://openmv.io/pages/download)
9292

93-
Plug the Portenta Vision Shield - LoRa to the Portenta H7 and them to your PC through the USB port. If the Portenta board does not show up on OpenMV, try double-pressing the reset button on the Portenta. Now update to the latest firmware in OpenMV.
93+
Plug the Portenta Vision Shield with LoRa® technology to the Portenta H7 and them to your PC through the USB port. If the Portenta board does not show up on OpenMV, try double-pressing the reset button on the Portenta. Now update to the latest firmware in OpenMV.
9494

9595
The only line you may need to change before uploading the code is the one that sets the frequency. Set the frequency code according to your country if needed. You can find more information about frequency by country at [this TTN link](https://www.thethingsnetwork.org/docs/lorawan/frequency-plans/).
9696

@@ -146,7 +146,7 @@ Before your Portenta H7 can start communicating with the TTN, you need to [regis
146146

147147
![Registering a Device](assets/vs_ard_ttn_click_register.png)
148148

149-
On the registration page, first you have to fill in information about your board. Select brand Arduino SA and Portenta Vision Shield - LoRa as the model. Hardware and firmware versions will automatically be set to the newest ones. Then set your preferred region.
149+
On the registration page, first you have to fill in information about your board. Select brand Arduino SA and Portenta Vision Shield with LoRa® technology as the model. Hardware and firmware versions will automatically be set to the newest ones. Then set your preferred region.
150150

151151
![First step of registering device](assets/vs_ard_ttn_register_device_1.png)
152152

@@ -180,7 +180,7 @@ Message confirmed.
180180
```
181181

182182
## Conclusion
183-
If you receive this message, you have managed to configure the Portenta H7 and the Portenta Vision Shield - LoRa to TTN. You have retrieved the device EUI, used it to register the device in the TTN console and programmed the board using the data provided by TTN. Now, you can send data over LoRa® network, which can be viewed from anywhere in the world (as long as you have an Internet connection and your device is in range from a TTN gateway).
183+
If you receive this message, you have managed to configure the Portenta H7 and the Portenta Vision Shield with LoRa® technology to TTN. You have retrieved the device EUI, used it to register the device in the TTN console and programmed the board using the data provided by TTN. Now, you can send data over LoRa-based network, which can be viewed from anywhere in the world (as long as you have an Internet connection and your device is in range from a TTN gateway).
184184

185185
### Complete Sketch
186186

@@ -234,10 +234,14 @@ while (True):
234234
### Next Steps
235235

236236
- Experiment your Portenta Vision Shield's capabilities with OpenMV and the examples from the dedicated library for Arduino. You can continue with [this tutorial](https://docs.arduino.cc/tutorials/portenta-vision-shield/blob-detection) from the Arduino DOCS site.
237-
- Combine LoRaWAN® protocol with an OpenMV example to develop your own IoT application. Take advantage of the Portenta Vision Shield's camera to detect, filter, classify images, read QR codes or more.
237+
- Combine LoRa® protocol with an OpenMV example to develop your own IoT application. Take advantage of the Portenta Vision Shield's camera to detect, filter, classify images, read QR codes or more.
238238

239239
## Troubleshooting
240240

241241
The most common issue is that the device cannot connect to a TTN gateway. Again, it is a good idea to check if you have coverage in the area you are conducting this tutorial, by checking out [this map](https://www.thethingsnetwork.org/map).
242242

243243
If you are within a good range from a gateway, you should also try to move your device and antenna to a window and even hold it out the window and move it around. This has proven successful on numerous accounts, as the signal can travel less obstructed.
244+
245+
## Trademark Acknowledgments
246+
247+
- **LoRa®** is a registered trademark of Semtech Corporation.

0 commit comments

Comments
 (0)