Skip to content

benjamindannegard/ Fix-max-carrier-h7-getting-started #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,11 @@ The Portenta Max Carrier carries a cellular modem SARA-R412M-02B to carry out ta

***Please DO NOT USE the cellular modem without the external antenna attached to the SMA connector. It might damage the Portenta Max Carrier if used without.***

To begin using the modem, it will require some packages to be installed beforehand. Given the network technology, Cat-M1 and NB-IoT, it will require the use of `GSMClient` library. If the library is not installed or needs to be updated, please make sure to have the `Arduino Mbed OS Portenta Core` up to date from the board manager.
To begin using the modem, it will require some packages to be installed beforehand. Given the network technology, Cat-M1 and NB-IoT, it will require the use of the `MKRNB` library. Please also make sure to have the `Arduino Mbed OS Portenta Core` up to date from the board manager.

We will use the `arduino_secrets.h` header file for PIN and APN configuration of the SIM card that will be inserted into microSIM slot on-board Portenta Max Carrier. Following code pieces are to be used to initialize the GSM and set the general network configuration.
We will use the `arduino_secrets.h` header file for PIN and APN configuration of the SIM card that will be inserted into microSIM slot on-board Portenta Max Carrier.

```cpp
// Initializes GSM
GSM.begin(pin, apn, username, pass, CATNB);

// Establishes connection to desired server
client.connect(server, port);
```

Inside the `GSM.begin(pin, apn, username, pass, CATNB)` function, where CATNB is the fifth argument of the function, must be defined to which network technology will be used.

- To use the NB-IoT network technology, please use `CATNB` as the argument
- To use the Cat-M1 network technology, please use `CATM1` as the argument

For the `client.connect(server, port);` function, the port is predefined as `80`. It is required to define the server, and the port argument if necessary, to successfully carry out the operation.
If you want to learn how to run a sketch with this library or how to switch between Cat M1 and NB IoT, please take a look at our [Portenta Max Carrier and Portenta H7 Cat M1/NB IoT tutorial](https://docs.arduino.cc/tutorials/portenta-max-carrier/catM1-and-NBIoT)

The antenna connectors for both LoRaWAN® and cellular modem with the microSIM slot are indicated as the following image:

Expand Down