Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 030ac59

Browse files
authored
Merge pull request #1069 from arduino/sync/taddy/portenta-catm1nb-cheatsheet-band-update
[PC-1242] Portenta Cat. M1/NB IoT GNSS Shield: Cheat Sheet Frequency Band Update
2 parents 63ff88b + f19d74e commit 030ac59

File tree

1 file changed

+91
-53
lines changed
  • content/hardware/04.pro/shields/portenta-cat-m1-nb-iot-gnss-shield/tutorials/cheat-sheet

1 file changed

+91
-53
lines changed

‎content/hardware/04.pro/shields/portenta-cat-m1-nb-iot-gnss-shield/tutorials/cheat-sheet/cheat-sheet.md‎

Lines changed: 91 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: 'Arduino® Portenta Cat. M1/NB IoT GNSS Shield Cheat Sheet'
3-
description: 'Learn how to set up the Arduino® Portenta Cat. M1/NB IoT GNSS Shield and get a quick overview of its functionality. Obtain information regarding pins and how to use the different communication technologies.'
3+
description: 'Learn how to set up the Portenta Cat. M1/NB IoT GNSS Shield and get a quick overview of its functionality. Obtain information regarding pins and how to use the different communication technologies.'
44
tags:
55
- Installation
66
- Cat. M1
@@ -20,30 +20,27 @@ libraries:
2020
url: https://github.com/107-systems/107-Arduino-NMEA-Parser
2121
---
2222

23-
![The Arduino® Portenta Cat. M1/NB IoT GNSS Shield](assets/featured.png)
23+
![The Arduino Portenta Cat. M1/NB IoT GNSS Shield](assets/featured.png)
2424

25-
The **Arduino® Portenta Cat. M1/NB IoT GNSS Shield** is a board that enables cellular connectivity with both Cat. M1 and NB-IoT networks. Easily track your valuable assets across the city or worldwide by choosing among GPS, GLONASS, Galileo or BeiDou Satellite navigation system.
25+
The **Arduino Portenta Cat. M1/NB IoT GNSS Shield** is a board that enables cellular connectivity with both Cat. M1 and NB-IoT networks. Easily track your valuable assets across the city or worldwide by choosing among GPS, GLONASS, Galileo or BeiDou Satellite navigation system.
2626

27-
This article is a collection of guides, API calls and tutorials that can help you get started with the Arduino® Portenta Cat. M1/NB IoT GNSS Shield board. You can also visit the [documentation product page for the Arduino® Portenta Cat. M1/NB IoT GNSS Shield](/hardware/portenta-cat-m1-nb-iot-gnss-shield) for more in-depth tutorials about the different features.
27+
This article is a collection of guides, API calls and tutorials that can help you get started with the Portenta Cat. M1/NB IoT GNSS Shield board. You can also visit the [documentation product page for the Portenta Cat. M1/NB IoT GNSS Shield](/hardware/portenta-cat-m1-nb-iot-gnss-shield) for more in-depth tutorials about the different features.
2828

2929
## Core
3030

31-
The Arduino® Portenta Cat. M1/NB IoT GNSS Shield uses the libraries from the [Arduino Mbed OS Portenta core](https://github.com/arduino/ArduinoCore-mbed).
31+
The Portenta Cat. M1/NB IoT GNSS Shield uses the libraries from the [Arduino Mbed OS Portenta core](https://github.com/arduino/ArduinoCore-mbed).
3232

3333
***The libraries are included in the mbed Core version greater than 2.6.1***
3434

3535
## Installation
3636

37-
### Arduino IDE 1.8.X
37+
### Arduino IDE
3838

39-
The Portenta Cat. M1/NB IoT GNSS Shield can be programmed through the **Classic Arduino IDE 1.8.X**. To install your board, you can check out the guide below:
39+
The Portenta Cat. M1/NB IoT GNSS Shield can be programmed through the **Classic Arduino IDE 1.8.X** and **Arduino IDE 2**.
4040

41-
- [Installing the Arduino Mbed OS Portenta Boards core](/software/ide-v1/tutorials/getting-started/cores/arduino-mbed_portenta)
42-
43-
### Arduino IDE 2
44-
45-
The Portenta Cat. M1/NB IoT GNSS Shield can be programmed through the **Arduino IDE 2**. To install your board, you can check out the guide below:
41+
To install your board, you can check out the guides below:
4642

43+
- [Installing the Arduino Mbed OS Portenta Boards core](/software/ide-v1/tutorials/getting-started/cores/arduino-mbed_portenta)
4744
- [How to use the board manager with the Arduino IDE 2](https://www.arduino.cc/en/Tutorial/getting-started-with-ide-v2/ide-v2-board-manager)
4845

4946
### Web Editor
@@ -53,6 +50,7 @@ The board can be programmed through the **Web Editor**. To get started with your
5350
- [Getting started with the Web Editor](/cloud/web-editor/tutorials/getting-started/getting-started-web-editor)
5451

5552
## Pins
53+
5654
As a Portenta family shield, it uses High Density Connectors to interface with the Portenta board which is connected to.
5755

5856
![The pinout of the Portenta Cat. M1/NB IoT GNSS Shield.](assets/ASX00027-pinout.png)
@@ -75,7 +73,7 @@ Make sure you go to the `arduino_secrets.h` tab and:
7573

7674
APN stands for 'Access Point Name'. An APN is a gateway between a cellular network and the Internet.
7775

78-
After finishing this setup, compile and upload the program. If everything went fine, you should see the HTML content of the webpage printed in the Serial Monitor.
76+
After finishing this setup, compile, and upload the program. If everything went fine, you should see the HTML content of the webpage printed in the Serial Monitor.
7977

8078
***Sometimes it takes time to connect to the provider's APN, please be patient, it can take up to 30 minutes. If you cannot connect after that time, make sure you entered the correct SIM pin and the APN. If the issue persists, contact your provider and verify whether Cat. M1 is enabled on your SIM card.***
8179

@@ -85,47 +83,93 @@ To get familiar with the commands, you can take a look at the [GSM library](http
8583

8684
This library contains some commands that are quite different, because it leverages mbed APIs. In this case, it uses the NetworkInterface, CellularContext and CellularDevice classes. For more information about API visit [https://os.mbed.com/docs/mbed-os/v6.14/apis/network-interface-apis.html](https://os.mbed.com/docs/mbed-os/v6.14/apis/network-interface-apis.html).
8785

88-
89-
90-
| Command | Information |
91-
| :----------------------------------------------------: | :----------------------------------------------------------: |
92-
| `GSM.begin(PIN, APN, USERNAME, PASSWORD, CATNB/CATM1)` | Unlock the SIM card using the PIN parameter and connects to the provider. |
93-
| `GSMClient`| Client constructor, on the examples we define it as client |
94-
| `GSM.getTime()`|Returns the time, you can set a new one with setTime()|
95-
| `GSM.getLocalTime()`| Returns the local time|
96-
| `GSM.setTime()`| Set the time, it will be saved and it can be read with getTime() |
97-
| `GSM.debug()`| After this command, the Serial Monitor will output more detailed info about the GSM class commands, connections, etc... |
98-
| `GSMClient.connect(server,port)` | Connect to a remote server |
99-
| `GSMClient.available()` | Check if the server that is connected to has some bytes ready to be read |
100-
| `GSMClient.read()` | Returns data from the server |
101-
| `GSMClient.stop()` | Disconnects from the server |
86+
| Command | Information |
87+
|----------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
88+
| `GSM.begin(PIN, APN, USERNAME, PASSWORD, CATNB/CATM1, BAND_#)` | Unlock the SIM card using the PIN parameter and connects to the provider |
89+
| `GSMClient` | Client constructor, on the examples we define it as client |
90+
| `GSM.getTime()` | Returns the time, you can set a new one with setTime() |
91+
| `GSM.getLocalTime()` | Returns the local time |
92+
| `GSM.setTime()` | Set the time, it will be saved and it can be read with getTime() |
93+
| `GSM.debug()` | After this command, the Serial Monitor will output more detailed info about the GSM class commands, connections, etc... |
94+
| `GSMClient.connect(server,port)` | Connect to a remote server |
95+
| `GSMClient.available()` | Check if the server that is connected to has some bytes ready to be read |
96+
| `GSMClient.read()` | Returns data from the server |
97+
| `GSMClient.stop()` | Disconnects from the server |
98+
99+
### Available Frequency Bands
100+
101+
It is possible to establish a connection within desired frequency band for the Portenta Cat. M1/NB IoT GNSS Shield. To do this, you need to define frequency bands for `GSM.begin(PIN, APN, USERNAME, PASSWORD, CATNB/CATM1, BAND_#)` by replacing `BAND_#` with desired band.
102+
103+
The **list of available frequency bands** that can be used for the device's credential configuration is as follows:
104+
105+
| 32-bit Hexadecimal Value | LTE Band | Band Designation | Argument Designation |
106+
| ------------------------ | -------- | ---------------- | -------------------- |
107+
| 0x01 | LTE 2100 | B1 | BAND_1 |
108+
| 0x02 | LTE 1900 | B2 | BAND_2 |
109+
| 0x04 | LTE 1800 | B3 | BAND_3 |
110+
| 0x08 | LTE 1700 | B4 | BAND_4 |
111+
| 0x10 | LTE 850 | B5 | BAND_5 |
112+
| 0x80 | LTE 900 | B8 | BAND_8 |
113+
| 0x800 | LTE 700 | B12 | BAND_12 |
114+
| 0x1000 | LTE 700 | B13 | BAND_13 |
115+
| 0x20000 | LTE 850 | B18 | BAND_18 |
116+
| 0x40000 | LTE 800 | B19 | BAND_19 |
117+
| 0x80000 | LTE 800 | B20 | BAND_20 |
118+
| 0x1000000 | LTE 1900 | B25 | BAND_25 |
119+
| 0x2000000 | LTE 850 | B26 | BAND_26 |
120+
| 0x8000000 | LTE 700 | B28 | BAND_28 |
121+
122+
These are Cat.M and Cat.NB frequency bands that are available for use with TX62-W, referred to as the LTE Cat.M1 and Cat.NB1 Engine. The Portenta Cat. M1/NB IoT GNSS Shield is capable of the present network connectivity thanks to its onboard TX62-W Cellular-GNSS LPWAN modem.
123+
124+
The band configuration is available to allow the user to restrict to a specific or combination of frequency bands. It helps to operate under enforced frequency policy requirements, or to lower the network search time, reducing the device power consumption.
125+
126+
If you leave the frequency band `BAND_#` field blank for the `GSM.begin(PIN, APN, USERNAME, PASSWORD, CATNB/CATM1, BAND_#)` method, it will configure using the default setting, which allows it to search within all available supported bands. The Portenta Cat. M1/NB IoT GNSS Shield will then select a compatible network automatically depending on the availability in the operating region.
127+
128+
Each country has a compatible frequency band, so it is a good practice to check the if desired band is suitable for its region. You can check the frequency band compatibility of the region by using a website that compiles network status such as [here](https://www.frequencycheck.com/countries).
102129

103130
#### Connect to Your Provider
104131

105132
You need to enter the Pin code and the APN link of your provider.
106-
The user name and password depend on your provider; they are required to authenticate with the APN gateway. These values can usually be found by searching online for APN credentials + provider name. Sometimes they can be left blank.
107133

108-
This sketch will initialize the SIM card and connect to your provider network
134+
The username and password depend on your provider; these are required to authenticate with the APN gateway. These values can usually be found by searching online for APN credentials and provider names. Sometimes they can be left blank.
135+
136+
The following sketch will initialize the SIM card and connect to your provider network within supported bands:
109137

110138
```cpp
111139
#include <GSM.h>
112140

113-
char pin[] = SECRET_PIN; //example "1234"
114-
char apn[] = SECRET_APN;//example "live.provider.com"
141+
char pin[] = SECRET_PIN; //example "1234"
142+
char apn[] = SECRET_APN;//example "live.provider.com"
115143
char username[] = SECRET_USERNAME;
116144
char pass[] = SECRET_PASSWORD;
117145

118146
void setup() {
119147
Serial.begin(115200);
120148
while(!Serial) {}
121149

122-
if(GSM.begin(pin, apn, username, pass, CATM1)){
123-
Serial.println("connected");
150+
if(GSM.begin(pin, apn, username, pass, CATM1)){
151+
Serial.println("connected");
152+
// ...
153+
}
154+
}
155+
```
156+
157+
The following example shows how the `GSM.begin()` method would look if you were to define the frequency band for the shield to mask multiple bands to be used or searched. The `BAND_20` and `BAND_19` are one example of a combination of bands to configure credential to restrict the shield's network to the compatible region. It will allow to increase the network search speed and reduce the time spent seeking, saving power consumption of the device.
158+
159+
```cpp
160+
void setup() {
161+
Serial.begin(115200);
162+
while(!Serial) {}
163+
164+
if(GSM.begin(pin, apn, username, pass, CATM1, BAND_20 | BAND_19)){
165+
Serial.println("connected");
124166
// ...
125-
}
167+
}
126168
}
127169
```
128170

171+
Please check how the frequency band configuration works briefly within the [Available Frequency Bands section](#available-frequency-bands). The list of available frequency bands for the shield's cellular connectivity configuration can also be found in the previous [section](#available-frequency-bands).
172+
129173
#### Send a HTTP GET Request and Receive Data
130174

131175
The following sketch will connect to your provider and use a HTTP GET request to get data from the server you are connected to. In this case, it connects to "example.com" and prints out the content through the Serial Monitor.
@@ -210,17 +254,15 @@ Make sure you go to the `arduino_secrets.h` tab and:
210254
211255
### API
212256
213-
214-
| Command | Information |
215-
| :--------------------------------------------------: | :----------------------------------------------------------: |
216-
| `GPS.begin()` | Initialize the GPS modem |
217-
| `GPS.end()` | Turn OFF the GPS modem. |
218-
| `GPS.available()` | Check if the GPS has new data to be read. |
219-
| `GPS.read()` | Returns a `char` with the reading from the GPS module. |
220-
| `GPS.readAndPrint()` | Output data on the Serial Monitor, only if there is new data.|
221-
| `GPS.readAndDrop()` | Read the data and do nothing with it. |
222-
| `GPS.checkGNSSEngine()` | Check if the GNSS modem is receiving data correctly. |
223-
257+
| Command | Information |
258+
| ----------------------- | ------------------------------------------------------------ |
259+
| `GPS.begin()` | Initialize the GPS modem |
260+
| `GPS.end()` | Turn OFF the GPS modem |
261+
| `GPS.available()` | Check if the GPS has new data to be read |
262+
| `GPS.read()` | Returns a `char` with the reading from the GPS module |
263+
| `GPS.readAndPrint()` | Output data on the Serial Monitor, only if there is new data |
264+
| `GPS.readAndDrop()` | Read the data and do nothing with it |
265+
| `GPS.checkGNSSEngine()` | Check if the GNSS modem is receiving data correctly |
224266
225267
#### Get GPS Data
226268
@@ -276,7 +318,7 @@ To do so, you can use an **NMEA parser**. This will convert messages received fr
276318

277319
In this way, it is possible to interact with the data that you need for your application, for instance getting only latitude and longitude. You will be able to save those values into variables, instead of having the whole NMEA messages.
278320

279-
Open the example from the library at **Examples > 107-Arduino-NMEA-Parser > NMEA-Basic** and add the following:
321+
Open the example from the library at **Examples > 107-Arduino-NMEA-Parser > NMEA-Basic** and add the following:
280322

281323
Include the needed libraries.
282324

@@ -337,6 +379,7 @@ One way to save power on your project is to enable the GPS module only when it n
337379
//stop and disable the GNSS engine
338380
GPS.end();
339381
```
382+
340383
By using this method, you don't need to initialize the GPS inside the `setup()`.
341384
342385
## Conclusion
@@ -345,10 +388,5 @@ This cheat sheet is written as a quick reference to look up the GSM and GPS feat
345388
346389
## Troubleshooting
347390
348-
### Getting Compiling Errors Using GPS and GSM
349-
350-
Make sure you included first the `GPS.h` library and then the `GSM.h`
351-
352-
### Can't Upload the Sketch
353-
354-
Sometimes, while the GPS module is getting readings, you will not be able to upload a new sketch. Double tap the reset button on your Portenta H7 and upload the new sketch.
391+
- If you are getting compiling errors using GPS and GSM, make sure you included first the `GPS.h` library and then the `GSM.h`.
392+
- Sometimes, while the GPS module is getting readings, you will not be able to upload a new sketch. Double tap the reset button on your Portenta H7 and upload the new sketch.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /