Skip to content

Commit d5131d2

Browse files
committed
Initial commit - Mid Carrier user manual AT commands section update (wip)
1 parent ea83013 commit d5131d2

File tree

1 file changed

+71
-15
lines changed
  • content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual

1 file changed

+71
-15
lines changed

content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md

Lines changed: 71 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2338,25 +2338,29 @@ You may find additional examples within the library to try various functionaliti
23382338

23392339
For more details on how the library works, including a comprehensive guide on setup and usage of the above examples, please refer to this [library documentation](https://github.com/arduino-libraries/Arduino_Cellular/tree/main/docs).
23402340

2341-
#### AT Commands Utility
2341+
### AT Commands Utility
23422342

23432343
AT commands, also known as Hayes commands, are instructions used to control modems. These commands allow you to perform various functions, such as checking the modem status, signal quality, and network registration. Understanding how to send these commands is essential for managing and troubleshooting your Arduino Pro 4G Module.
23442344

2345-
This section explains using AT commands to interact with the Cat.4 modem. These instructions will guide you through setting up your environment, sending AT commands, and managing your modem effectively.
2345+
This section explains how to use AT commands to interact with the Cat.4 modem, specifically addressing the differences between the **EG25 (Global)** and **EC200A-EU (EU)** modules. These instructions will guide you through setting up your environment, sending AT commands, and managing your modem effectively.
23462346

2347-
#### Using Linux
2347+
### Using Linux
2348+
2349+
This subsection provides instructions on using **ModemManager**, **mmcli**, and **qmicli** to send AT commands to your Cat.4 modem with the Portenta X8.
2350+
2351+
#### EG25 (Global) Module
23482352

2349-
This subsection provides instructions on using **ModemManager** and **mmcli** to send AT commands to your Cat.4 modem with the Portenta X8.
2353+
For the EG25 module, which is generally supported directly by NetworkManager, ModemManager handles most of the modem's operations. Begin by ensuring that the Pro 4G Module is properly mounted on the Portenta Mid Carrier and recognized by the Portenta X8.
23502354

2351-
Ensure that the Pro 4G Module is properly mounted on the Portenta Mid Carrier and that the Portenta X8 recognizes it. You can verify the connection using the following command:
2355+
You can verify the connection using the following command:
23522356

23532357
```bash
23542358
lsusb
23552359
```
23562360

23572361
***Please set up the Pro 4G Module referring to [this section](#using-linux-4). Otherwise, the __ModemManager__ service may not be recognized or working as intended.***
23582362

2359-
First identify the modem with:
2363+
If ModemManager is enabled, you can identify the modem with:
23602364

23612365
```bash
23622366
mmcli -L
@@ -2370,19 +2374,19 @@ The output will list the detected modems, including the Pro 4G Module. Note the
23702374

23712375
![Arduino Pro 4G Module - AT Commands](assets/portentaMIDcarrier_mpcie_4gmodem_at1.png)
23722376

2373-
To send AT commands, *ModemManager* must be in debug mode:
2377+
Before sending AT commands, ModemManager must be in debug mode. First, stop the ModemManager service using:
23742378

23752379
```bash
23762380
sudo systemctl stop ModemManager
23772381
```
23782382

2379-
The following command starts *ModemManager* in the background and redirects its output to a log file:
2383+
Then start it in the background with debugging enabled by running:
23802384

23812385
```bash
23822386
sudo ModemManager --debug > /var/log/modemmanager.log 2>&1 &
23832387
```
23842388

2385-
To send an AT command, the following command can be used:
2389+
You can now send AT commands using `mmcli`, for example:
23862390

23872391
```bash
23882392
sudo mmcli -m /org/freedesktop/ModemManager1/Modem/0 --command="ATI"
@@ -2410,15 +2414,67 @@ You can now start sending AT commands. Here are a few basic AT commands to test
24102414

24112415
The **`mmcli`** tool allows you to send AT commands to your Cat.4 modem from a Linux environment to check modem status, signal quality, and network registration. You can manage and troubleshoot the Pro 4G Module using AT commands in the Portenta X8's Linux environment by following the above steps.
24122416

2413-
#### Using Arduino
2417+
To configure the EG25 module with NetworkManager, you can use the following command:
2418+
2419+
```bash
2420+
nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.autoconnect yes
2421+
```
2422+
2423+
#### EC200A-EU (EU) Module
2424+
2425+
The EC200A-EU module, unlike the EG25, is not officially supported by ModemManager and thus requires a different approach. After ensuring that the Pro 4G Module is properly mounted and recognized by the Portenta X8, you may find it presents as a USB Ethernet device (`eth0`). For appropriate configuration, you will need to remap it using an udev rule into an `ec200aeu` network device.
2426+
2427+
The ModemManager requires a small compatibility patch for it to work with the module and to send configuration AT commands to the modem. Once patched, you can connect to the network using the following command for example:
2428+
2429+
```bash
2430+
mmcli -m 0 --simple-connect='apn=iot.1nce.net,ip-type=ipv4v6'
2431+
```
2432+
2433+
If ModemManager is disabled or if you prefer an alternative method, you can use `qmicli` to identify the modem and interact with it. For instance, you can retrieve the manufacturer information by running:
2434+
2435+
```bash
2436+
sudo qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer
2437+
```
2438+
2439+
Power management for the EC200A-EU module may require manual intervention, especially if ModemManager is disabled. You can power on the modem using a custom script that leverages the `gpiod` library. The script would include commands to set the GPIO pin high and then wait a few seconds for the modem to become available, for example:
2440+
2441+
```bash
2442+
gpiod set-value <gpio-pin> 1
2443+
```
2444+
2445+
Followed by:
2446+
2447+
```bash
2448+
sleep 10
2449+
```
2450+
2451+
#### Docker Container Considerations
2452+
2453+
Disable ModemManager to prevent conflicts with tools like `qmicli` when managing either modem within a Docker container. This can be done by using the following command:
2454+
2455+
```bash
2456+
sudo systemctl stop ModemManager
2457+
```
2458+
2459+
Inside the container, you will need to manage the modem’s power state manually. Use an `entrypoint.sh` script that includes commands to power on the modem with `gpiod`, followed by a short delay to allow the modem to initialize.
2460+
2461+
To send AT commands, use `qmicli` within the Docker container. For example, you might use following command to interact with the modem:
2462+
2463+
```bash
2464+
sudo qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer
2465+
```
2466+
2467+
If you are using the EG25 module, NetworkManager can manage the connection outside the container. For the EC200A-EU module, however, you will need to handle the connection using `qmicli` or similar tools within the container.
2468+
2469+
### Using Arduino
24142470

24152471
The AT commands can be sent to the Pro 4G Module using the Portenta H7 or Portenta C33 with the Arduino IDE.
24162472

24172473
You will need the [**Arduino_Cellular**](https://github.com/arduino-libraries/Arduino_cellular) library, which you can access through the Arduino IDE's library manager by navigating to **Sketch -> Include Library -> Manage Libraries** or using the IDE's side panel with the books icon.
24182474

24192475
![Arduino Cellular Library for Pro 4G Modules](assets/arduino_cellular_library.png)
24202476

2421-
Make sure the mini PCIe power configuration is set as described in the [Mini PCIe Power Breakout Header](#mini-pcie-power-breakout-header-j9) section. The Portenta H7 or C33 requires the **SERIAL1 Breakout** pins to be connected to the corresponding **PCIe Breakout** pins:
2477+
Ensure the mini PCIe power configuration is set as described in the [Mini PCIe Power Breakout Header](#mini-pcie-power-breakout-header-j9) section. The Portenta H7 or C33 requires the **SERIAL1 Breakout** pins to be connected to the corresponding **PCIe Breakout** pins:
24222478

24232479
| **SERIAL1 Breakout Pins (17)** | **PCIe Breakout Pins (16)** |
24242480
|--------------------------------|-----------------------------|
@@ -2428,13 +2484,13 @@ Make sure the mini PCIe power configuration is set as described in the [Mini PCI
24282484
| SERIAL1 CTS | mPCIe_RX_P |
24292485
| mPCIE_GPIO_RST (GPIO6) | mPCIe_RST |
24302486

2431-
***Please use a 5.0 V external power source when using an Arduino Pro 4G Module (EMEA / GNSS Global) or any other mPCIe modules due to their high power consumption. This ensures a stable power supply to the Portenta SOM and the carrier, especially during extended use.***
2487+
***Due to their high power consumption, please use a 5.0 V external power source when using an Arduino Pro 4G Module (EMEA / GNSS Global) or any other mPCIe modules. This ensures a stable power supply to the Portenta SOM and the carrier, especially during extended use.***
24322488

24332489
The image below shows the setup with the Portenta H7 and Pro 4G Module connected to the Portenta Mid Carrier, along with a mini PCIe power configuration:
24342490

24352491
![Portenta Mid Carrier Mini PCIe & Portenta H7/C33 Setup](assets/portentaMIDcarrier_h7_c33_mpcie_set.png)
24362492

2437-
The following example, **ModemTerminal**, is available in the [**Arduino_Cellular**](https://github.com/arduino-libraries/Arduino_cellular) library and compatible with the Portenta H7 and Portenta C33.
2493+
The following example, **ModemTerminal**, is available in the [**Arduino_Cellular**](https://github.com/arduino-libraries/Arduino_cellular) library and is compatible with the Portenta H7 and Portenta C33.
24382494

24392495
```arduino
24402496
/**
@@ -2487,7 +2543,7 @@ void loop() {
24872543

24882544
This example allows you to send raw AT commands to the Pro 4G Module using the Arduino IDE with the Portenta H7 and Portenta C33.
24892545

2490-
To send AT commands with the Arduino IDE, please use the **Message** space within the **Serial Monitor** and enter commands that follows after **`AT`**. For example:
2546+
To send AT commands with the Arduino IDE, use the **Message** space within the **Serial Monitor** and enter commands that follow after **`AT`**. For example:
24912547

24922548
| **AT Command** | **AT Command Input Format** |
24932549
|:--------------:|:---------------------------:|
@@ -2501,7 +2557,7 @@ To send AT commands with the Arduino IDE, please use the **Message** space withi
25012557
| AT+CEER | +CEER |
25022558
| AT+QNWINFO | +QNWINFO |
25032559

2504-
***For complete information on AT commands compatible with the Pro 4G Module, please refer to the [AT Commands Manual](assets/Quectel_EC2x&EG9x&EG2x-G&EM05_Series_AT_Commands_Manual_V2.0.pdf).***
2560+
For complete information on AT commands compatible with the Pro 4G Module, please refer to the [AT Commands Manual](assets/Quectel_EC2x&EG9x&EG2x-G&EM05_Series_AT_Commands_Manual_V2.0.pdf).
25052561

25062562
The script requires the **arduino_secrets.h** file to be defined with the following credentials:
25072563

0 commit comments

Comments
 (0)