From d5131d2eaa53e5fcd105be7fcf6d2424c19cdfc8 Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Sun, 1 Sep 2024 15:54:49 -0600 Subject: [PATCH 01/19] Initial commit - Mid Carrier user manual AT commands section update (wip) --- .../tutorials/user-manual/content.md | 86 +++++++++++++++---- 1 file changed, 71 insertions(+), 15 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index 329f763d30..fdf1b8e9bc 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2338,17 +2338,21 @@ You may find additional examples within the library to try various functionaliti 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). -#### AT Commands Utility +### AT Commands Utility 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. -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. +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. -#### Using Linux +### Using Linux + +This subsection provides instructions on using **ModemManager**, **mmcli**, and **qmicli** to send AT commands to your Cat.4 modem with the Portenta X8. + +#### EG25 (Global) Module -This subsection provides instructions on using **ModemManager** and **mmcli** to send AT commands to your Cat.4 modem with the Portenta X8. +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. -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: +You can verify the connection using the following command: ```bash lsusb @@ -2356,7 +2360,7 @@ lsusb ***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.*** -First identify the modem with: +If ModemManager is enabled, you can identify the modem with: ```bash mmcli -L @@ -2370,19 +2374,19 @@ The output will list the detected modems, including the Pro 4G Module. Note the ![Arduino Pro 4G Module - AT Commands](assets/portentaMIDcarrier_mpcie_4gmodem_at1.png) -To send AT commands, *ModemManager* must be in debug mode: +Before sending AT commands, ModemManager must be in debug mode. First, stop the ModemManager service using: ```bash sudo systemctl stop ModemManager ``` -The following command starts *ModemManager* in the background and redirects its output to a log file: +Then start it in the background with debugging enabled by running: ```bash sudo ModemManager --debug > /var/log/modemmanager.log 2>&1 & ``` -To send an AT command, the following command can be used: +You can now send AT commands using `mmcli`, for example: ```bash sudo mmcli -m /org/freedesktop/ModemManager1/Modem/0 --command="ATI" @@ -2410,7 +2414,59 @@ You can now start sending AT commands. Here are a few basic AT commands to test 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. -#### Using Arduino +To configure the EG25 module with NetworkManager, you can use the following command: + +```bash +nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.autoconnect yes +``` + +#### EC200A-EU (EU) Module + +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. + +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: + +```bash +mmcli -m 0 --simple-connect='apn=iot.1nce.net,ip-type=ipv4v6' +``` + +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: + +```bash +sudo qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer +``` + +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: + +```bash +gpiod set-value 1 +``` + +Followed by: + +```bash +sleep 10 +``` + +#### Docker Container Considerations + +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: + +```bash +sudo systemctl stop ModemManager +``` + +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. + +To send AT commands, use `qmicli` within the Docker container. For example, you might use following command to interact with the modem: + +```bash +sudo qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer +``` + +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. + +### Using Arduino The AT commands can be sent to the Pro 4G Module using the Portenta H7 or Portenta C33 with the Arduino IDE. @@ -2418,7 +2474,7 @@ You will need the [**Arduino_Cellular**](https://github.com/arduino-libraries/Ar ![Arduino Cellular Library for Pro 4G Modules](assets/arduino_cellular_library.png) -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: +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: | **SERIAL1 Breakout Pins (17)** | **PCIe Breakout Pins (16)** | |--------------------------------|-----------------------------| @@ -2428,13 +2484,13 @@ Make sure the mini PCIe power configuration is set as described in the [Mini PCI | SERIAL1 CTS | mPCIe_RX_P | | mPCIE_GPIO_RST (GPIO6) | mPCIe_RST | -***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.*** +***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.*** 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: ![Portenta Mid Carrier Mini PCIe & Portenta H7/C33 Setup](assets/portentaMIDcarrier_h7_c33_mpcie_set.png) -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. +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. ```arduino /** @@ -2487,7 +2543,7 @@ void loop() { 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. -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: +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: | **AT Command** | **AT Command Input Format** | |:--------------:|:---------------------------:| @@ -2501,7 +2557,7 @@ To send AT commands with the Arduino IDE, please use the **Message** space withi | AT+CEER | +CEER | | AT+QNWINFO | +QNWINFO | -***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).*** +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). The script requires the **arduino_secrets.h** file to be defined with the following credentials: From 45d8c98254bbd8f0e9fa93d35831a6678c462a1d Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Wed, 4 Sep 2024 19:04:25 -0600 Subject: [PATCH 02/19] User manual 4g module content update --- .../tutorials/user-manual/content.md | 69 ++++++++++++++++++- 1 file changed, 66 insertions(+), 3 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index fdf1b8e9bc..1d15d42194 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2072,6 +2072,8 @@ The image below shows the anticipated configuration, featuring the Portenta X8 a ![Portenta Mid Carrier Mini PCIe & Portenta X8 Setup](assets/portentaMIDcarrier_x8_mpcie_set.png) +#### Overlay Configuration + Once the setup is ready, the following sequence of commands is used to set the overlays required for the Portenta X8 and the Portenta Mid Carrier: ```bash @@ -2090,6 +2092,12 @@ fw_setenv carrier_name mid fw_setenv overlays 'ov_som_lbee5kl1dx ov_som_x8h7 ov_carrier_breakout_usbfs ov_carrier_mid_pcie_mini' ``` +For managing the Pro 4G Module (EG25 and EC200A-EU), you **only need the USB overlay**, and **mPCIe overlay is not necessary** for these USB modems. You can configure the necessary USB overlays using the following command: + +```bash +fw_setenv overlays 'ov_som_lbee5kl1dx ov_som_x8h7 ov_carrier_breakout_usbfs' +``` + Alternatively, it is possible to use the **tenta-config** process implemented in the [GIGA Display Connector's Linux Setup](#using-linux-1) section to apply the overlays to enable mini PCIe for the Portenta Mid Carrier with the Portenta X8. ***Please check out the guidelines in the [GIGA Display Connector's Linux Setup](#using-linux-1) section for detailed information on how the __tenta-config__ works if you have yet to become familiar with the usage.*** @@ -2124,6 +2132,8 @@ It will prompt a message showing a new set of overlays that will be applied once Select **Ok** to confirm, and the device will be configured with the overlays for mini PCIe support. +#### Enabling the Module via GPIO + The module must be enabled, and this can be accomplished either by putting the GPIO 5 (iMX8 Pin 165) manually via the 3.3V line or by command as follows: ```bash @@ -2138,6 +2148,8 @@ echo out > /sys/class/gpio/gpio165/direction echo 1 > /sys/class/gpio/gpio165/value ``` +#### Network Interface Management and Raw IP Mode + Afterward, the setup process involves bringing down the `wwan0` interface, setting it to raw IP mode, and then bringing it back up: ```bash @@ -2152,7 +2164,56 @@ echo Y > /sys/class/net/wwan0/qmi/raw_ip ip link set dev wwan0 up ``` -The following steps include using `qmicli` commands to check the card status and start a network connection: +This step ensures the modem functions properly in QMI mode. + +#### ModemManager and Power Management + +The **ModemManager** service manages the power for the Pro 4G Module via a script. **Global (EG25)** and **EU (EC200A-EU)** modems are different and require different configurations: + +- **Global EG25 Module**: This modem is supported directly by **NetworkManager**, which works alongside **ModemManager**. +- **EU EC200A-EU Module**: This modem is **not officially supported** by **ModemManager** and creates a USB `eth0` connection. This can be remapped into an `ec200aeu` network device using an `udev` rule. + +The modem is powered down when **ModemManager** is stopped using + +```bash +systemctl stop ModemManager +``` + +After stopping **ModemManager**, there will be a delay before the modem can be powered back on and detected by **mmcli**. + +#### Modem Configuration + +For the **Global EG25 Module**, you can configure the modem using **NetworkManager** with the following command: + +```bash +nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.autoconnect yes +``` + +For the **EU EC200A-EU Module**, **ModemManager** does not support it out of the box, so a patch is required for compatibility. You can then use the following command to connect: + +```bash +mmcli -m 0 --simple-connect='apn=iot.1nce.net,ip-type=ipv4v6' +``` + +If the modem creates a USB `eth0` interface, remap it into an `ec200aeu` network device using an `udev` rule. + +In a Docker environment, it may be beneficial to disable **ModemManager** and control the modem using **qmicli**. To avoid conflicts, disable **ModemManager** with the following command: + +```bash +sudo systemctl stop ModemManager +``` + +Next, provide a Docker container with an **entrypoint.sh** script to manage the modem's power using **gpiod**: + +```bash +gpiod set-value 1 +``` + +```bash +sleep 10 +``` + +Once the modem is powered on, use **qmicli** to configure and manage the modem. For instance, to check the modem status, use: ```bash qmicli --device=/dev/cdc-wdm0 --device-open-proxy --uim-get-card-status @@ -2160,13 +2221,15 @@ qmicli --device=/dev/cdc-wdm0 --device-open-proxy --uim-get-card-status ![Pro 4G Module - Card Status](assets/portentaMIDcarrier_mpcie_card_status.png) +To start a network connection, use: + ```bash qmicli --device=/dev/cdc-wdm0 --device-open-proxy --wds-start-network="ip-type=4,apn=iot.1nce.net" --client-no-release-cid ``` ![Pro 4G Module - Network Initialization](assets/portentaMIDcarrier_mpcie_network_start.png) -After establishing the network connection, you can use `udhcpc` to manage dynamic IP configuration: +After establishing the network connection, manage the dynamic IP using: ```bash udhcpc -q -f -n -i wwan0 @@ -2196,7 +2259,7 @@ docker run -it --mount type=bind,source="$(pwd)",target=/app python:3.8-slim-bus /app/speedtest-cli ``` -Once the speed test concludes, you can see similar behavior to the following image. +Once the speed test concludes, you can see similar behavior to the following image which shows the download and upload speeds ![Arduino Pro 4G Module - Speed Test](assets/portentaMIDcarrier_mpcie_4gmodem_result.png) From 28e6087f4ba830c47532efc8e28771b6e00f46a7 Mon Sep 17 00:00:00 2001 From: TaddyHC <94547080+TaddyHC@users.noreply.github.com> Date: Sun, 29 Sep 2024 12:24:22 -0600 Subject: [PATCH 03/19] Update content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Julián Caro Linares --- .../portenta-mid-carrier/tutorials/user-manual/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index 1d15d42194..8af3c865a5 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2195,7 +2195,7 @@ For the **EU EC200A-EU Module**, **ModemManager** does not support it out of the mmcli -m 0 --simple-connect='apn=iot.1nce.net,ip-type=ipv4v6' ``` -If the modem creates a USB `eth0` interface, remap it into an `ec200aeu` network device using an `udev` rule. +The modems will create a USB 'eth0' interface that will be remapped into ec200aeu by an udev rule``` In a Docker environment, it may be beneficial to disable **ModemManager** and control the modem using **qmicli**. To avoid conflicts, disable **ModemManager** with the following command: From 7dce09db1018a621a1aca56e32e368b08748e06f Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Tue, 1 Oct 2024 18:32:33 -0600 Subject: [PATCH 04/19] Documentation for AT commands post upgrade block update --- .../tutorials/user-manual/content.md | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index 8af3c865a5..0f2ad814eb 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2092,7 +2092,7 @@ fw_setenv carrier_name mid fw_setenv overlays 'ov_som_lbee5kl1dx ov_som_x8h7 ov_carrier_breakout_usbfs ov_carrier_mid_pcie_mini' ``` -For managing the Pro 4G Module (EG25 and EC200A-EU), you **only need the USB overlay**, and **mPCIe overlay is not necessary** for these USB modems. You can configure the necessary USB overlays using the following command: +For managing the Pro 4G Module (**EG25** and **EC200A-EU**), you **only need the USB overlay (`ov_carrier_breakout_usbfs`)**, and **mPCIe overlay (`ov_carrier_mid_pcie_mini`) is not necessary** for these USB modems. You can configure the necessary USB overlays using the following command: ```bash fw_setenv overlays 'ov_som_lbee5kl1dx ov_som_x8h7 ov_carrier_breakout_usbfs' @@ -2134,7 +2134,7 @@ Select **Ok** to confirm, and the device will be configured with the overlays fo #### Enabling the Module via GPIO -The module must be enabled, and this can be accomplished either by putting the GPIO 5 (iMX8 Pin 165) manually via the 3.3V line or by command as follows: +The module must be enabled, and this can be accomplished by putting the GPIO 5 (iMX8 Pin 165) manually via the 3.3V line and additionally securing with a command as follows: ```bash echo 165 > /sys/class/gpio/export @@ -2173,7 +2173,19 @@ The **ModemManager** service manages the power for the Pro 4G Module via a scrip - **Global EG25 Module**: This modem is supported directly by **NetworkManager**, which works alongside **ModemManager**. - **EU EC200A-EU Module**: This modem is **not officially supported** by **ModemManager** and creates a USB `eth0` connection. This can be remapped into an `ec200aeu` network device using an `udev` rule. -The modem is powered down when **ModemManager** is stopped using +Power management is handled by **ModemManager** using the following script setup. Before starting **ModemManager**, the system runs a script to power on the modem, and another script is run after the service stops to power off the modem: + +```bash +systemctl cat ModemManager.service +``` + +The relevant parts of the service configuration include: + +- `ExecStartPre=/usr/sbin/modem_on.sh`: Powers on the modem before starting ModemManager. +- `ExecStart=/usr/sbin/ModemManager`: Starts the ModemManager service. +- `ExecStopPost=/usr/sbin/modem_off.sh`: Powers of the modem after stopping ModemManager. + +To manually stop the **ModemManager** service, use the following command: ```bash systemctl stop ModemManager @@ -2499,7 +2511,7 @@ If ModemManager is disabled or if you prefer an alternative method, you can use sudo qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer ``` -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: +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 around 20 seconds for the modem to become available, for example: ```bash gpiod set-value 1 @@ -2508,7 +2520,7 @@ gpiod set-value 1 Followed by: ```bash -sleep 10 +sleep 20 ``` #### Docker Container Considerations From 9bfb6ac565458c93269cd28ed7e88054039a4f13 Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Wed, 2 Oct 2024 11:46:59 -0600 Subject: [PATCH 05/19] Pro 4G Modules content block update --- .../tutorials/user-manual/content.md | 42 +++++++++++++------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index 0f2ad814eb..2a6d7263cb 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2092,7 +2092,7 @@ fw_setenv carrier_name mid fw_setenv overlays 'ov_som_lbee5kl1dx ov_som_x8h7 ov_carrier_breakout_usbfs ov_carrier_mid_pcie_mini' ``` -For managing the Pro 4G Module (**EG25** and **EC200A-EU**), you **only need the USB overlay (`ov_carrier_breakout_usbfs`)**, and **mPCIe overlay (`ov_carrier_mid_pcie_mini`) is not necessary** for these USB modems. You can configure the necessary USB overlays using the following command: +For managing the Pro 4G Module (**EG25** and **EC200A-EU**), you **only need the USB overlay (`ov_carrier_breakout_usbfs`)**, and **mPCIe overlay (`ov_carrier_mid_pcie_mini`) is not necessary** for these USB modems. You can configure the necessary overlays with USB overlay using the following command: ```bash fw_setenv overlays 'ov_som_lbee5kl1dx ov_som_x8h7 ov_carrier_breakout_usbfs' @@ -2166,7 +2166,7 @@ ip link set dev wwan0 up This step ensures the modem functions properly in QMI mode. -#### ModemManager and Power Management +#### ModemManager and Power Management Service The **ModemManager** service manages the power for the Pro 4G Module via a script. **Global (EG25)** and **EU (EC200A-EU)** modems are different and require different configurations: @@ -2191,40 +2191,58 @@ To manually stop the **ModemManager** service, use the following command: systemctl stop ModemManager ``` -After stopping **ModemManager**, there will be a delay before the modem can be powered back on and detected by **mmcli**. +After stopping **ModemManager**, there will be a delay before the modem can be powered back on and detected by **mmcli**. The delay is around 20 seconds for appropriate initialization. #### Modem Configuration -For the **Global EG25 Module**, you can configure the modem using **NetworkManager** with the following command: +#### Global EG25 Module + +The **Global EG25 Module** is supported by **NetworkManager**, allowing you to configure it easily. To set up a connection, use the following command: ```bash nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.autoconnect yes ``` -For the **EU EC200A-EU Module**, **ModemManager** does not support it out of the box, so a patch is required for compatibility. You can then use the following command to connect: +This command establishes a GSM connection on the `cdc-wdm0` interface and automatically connects to the `hologram` APN. + +#### EU EC200A-EU Module + +The **EU EC200A-EU Module** is not directly supported by **ModemManager** out of the box and requires a compatibility patch. Once the patch is applied, you can connect to the network using: ```bash mmcli -m 0 --simple-connect='apn=iot.1nce.net,ip-type=ipv4v6' ``` -The modems will create a USB 'eth0' interface that will be remapped into ec200aeu by an udev rule``` +The modem will create a USB `eth0` interface that will be remapped into `ec200aeu` by an udev rule. + +#### Docker Environment and Power Management -In a Docker environment, it may be beneficial to disable **ModemManager** and control the modem using **qmicli**. To avoid conflicts, disable **ModemManager** with the following command: +In a Docker environment, it may be helpful to disable **ModemManager** to avoid conflicts and instead control the modem using **qmicli**. You can disable **ModemManager** with the following command: ```bash -sudo systemctl stop ModemManager +systemctl stop ModemManager ``` -Next, provide a Docker container with an **entrypoint.sh** script to manage the modem's power using **gpiod**: +For modem power management, ensure that the Docker container has access to the GPIO device files by passing them into the container: ```bash -gpiod set-value 1 +docker run --device /dev/gpiochip5 ``` +Inside the container, an **entrypoint.sh** script can control the modem's power via GPIO. To enable the 3.3V Buck Converter, the following command can be added to the script: + ```bash -sleep 10 +gpioset gpiochip5 5=1 ``` +This will enable the power to the modem, and add a delay for modem initialization: + +```bash +sleep 20 +``` + +This configuration ensures proper modem control and avoids power issues during startup. + Once the modem is powered on, use **qmicli** to configure and manage the modem. For instance, to check the modem status, use: ```bash @@ -2511,7 +2529,7 @@ If ModemManager is disabled or if you prefer an alternative method, you can use sudo qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer ``` -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 around 20 seconds for the modem to become available, for example: +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 around 20 seconds for the modem to become available, for example: ```bash gpiod set-value 1 From 4a61ccbe4daa71a4c63f133513f667a1b8262bb0 Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Wed, 2 Oct 2024 12:09:23 -0600 Subject: [PATCH 06/19] Pro 4G Module content block update --- .../tutorials/user-manual/content.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index 2a6d7263cb..f650becf1c 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2193,6 +2193,12 @@ systemctl stop ModemManager After stopping **ModemManager**, there will be a delay before the modem can be powered back on and detected by **mmcli**. The delay is around 20 seconds for appropriate initialization. +Make sure the mini PCIe power configuration is configured as described in the [Mini PCIe Power Breakout Header](#mini-pcie-power-breakout-header-j9) section. The Portenta X8 requires the **PCIE Enable (GPIO5)** pin to be connected to a **VCC (3V3)** pin. This is a mandatory power setup for proper system operation. + +The modems may get stuck during operation, so managing power through software is recommended to allow modem rebooting when necessary. This method also helps to handle modem failures in case it happens. + +To adjust for modem initialization, an extended delay of **20 seconds** is required for the modem to power up properly. + #### Modem Configuration #### Global EG25 Module @@ -2235,13 +2241,15 @@ Inside the container, an **entrypoint.sh** script can control the modem's power gpioset gpiochip5 5=1 ``` +***It is mandatory to have **PCIE Enable (GPIO5)** pin connected to the **VCC (3V3)** pin to enable the 3.3V Buck Converter.*** + This will enable the power to the modem, and add a delay for modem initialization: ```bash sleep 20 ``` -This configuration ensures proper modem control and avoids power issues during startup. +This configuration ensures proper modem control and avoids power issues during startup. For the following example, we will use the **Pro 4G Module GNSS Global (EG25)**. Once the modem is powered on, use **qmicli** to configure and manage the modem. For instance, to check the modem status, use: From 70147a72492e9205ac4ee2851a8546ea157b959d Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Wed, 2 Oct 2024 18:33:45 -0600 Subject: [PATCH 07/19] Pro 4G Module content major update --- .../tutorials/user-manual/content.md | 118 ++++++++++++++---- 1 file changed, 93 insertions(+), 25 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index f650becf1c..e31db2d339 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -653,12 +653,12 @@ The Mini PCIe slot of the Portenta Mid Carrier has a dedicated breakout pin to c | 5 | NC | | NC | | | 6 | GND | Ground | | | -To accommodate the power requirements and ensure reliable connectivity, jumper cables with appropriate electrical standards, such as ASTM B 258 standard, should be used to support a current of up to 2A. **Jumper cables with a cross-sectional area of 0.82 mm² to 1.3 mm² (approximately equivalent to AWG 18-16) should support 2.0 A of current**. +To accommodate the power requirements and ensure reliable connectivity, jumper cables with appropriate electrical standards, such as ASTM B 258 standard, should be used to support a current of up to 2.0 A. **Jumper cables with a cross-sectional area of 0.82 mm² to 1.3 mm² (approximately equivalent to AWG 18-16) should support 2.0 A of current**. This precaution is necessary to prevent wire overheating and ensure reliable power transmission for the connected Mini PCIe-compatible module, such as Cat.4 modems. A minimum requirement to set the mini PCIe interface with the Portenta Mid Carrier consists of: - **3V3 PCIE** pin connected to **3V3 BUCK** pin -- Properly inserted mini PCIe module, e.g., Pro 4G GNSS Module Global / Pro 4G EMEA Module +- Properly inserted mini PCIe module, e.g., Pro 4G GNSS Module Global (EG25) / Pro 4G EMEA (EC200A-EU) Module ***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 is important for maintaining a stable power supply to the Portenta SOM and the carrier, particularly for extended periods of use.*** @@ -2008,7 +2008,7 @@ It is available in two variants, **EMEA** and **Global (covering the US)**. This ![Arduino Pro 4G GNSS Module Global / Module EMEA](assets/portentaQuectel_overview.gif) -***Make sure to attach external antennas to the Pro 4G Module to work correctly with wireless signals. There are three external antenna connectors: a main antenna connector, an Rx-diversity antenna connector, and a GNSS antenna connector. The impedance of the antenna connectors is 50 Ω.*** +***Make sure to attach external antennas to the Pro 4G Module to work correctly with wireless signals. There are three external antenna connectors: a main antenna connector, an Rx-diversity antenna connector, and a GNSS antenna connector. The impedance of the antenna connectors is **50 Ω**.*** #### Setting Up Via Out-Of-The-Box Experience @@ -2193,9 +2193,9 @@ systemctl stop ModemManager After stopping **ModemManager**, there will be a delay before the modem can be powered back on and detected by **mmcli**. The delay is around 20 seconds for appropriate initialization. -Make sure the mini PCIe power configuration is configured as described in the [Mini PCIe Power Breakout Header](#mini-pcie-power-breakout-header-j9) section. The Portenta X8 requires the **PCIE Enable (GPIO5)** pin to be connected to a **VCC (3V3)** pin. This is a mandatory power setup for proper system operation. +Make sure the mini PCIe power configuration is configured as described in the [Mini PCIe Power Breakout Header](#mini-pcie-power-breakout-header-j9) section. The Portenta X8 requires the **PCIE Enable (GPIO5)** pin to be connected to a **VCC (3V3)** pin. This is a required power setup for proper system operation. -The modems may get stuck during operation, so managing power through software is recommended to allow modem rebooting when necessary. This method also helps to handle modem failures in case it happens. +Modems may get stuck on certain occasions, so managing power through software is recommended to allow modem rebooting when necessary. This method also helps handle modem failures in case they happen. To adjust for modem initialization, an extended delay of **20 seconds** is required for the modem to power up properly. @@ -2211,39 +2211,71 @@ nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.auto This command establishes a GSM connection on the `cdc-wdm0` interface and automatically connects to the `hologram` APN. -#### EU EC200A-EU Module +#### Zero Interface Ban Implementation for Global EG25 Module -The **EU EC200A-EU Module** is not directly supported by **ModemManager** out of the box and requires a compatibility patch. Once the patch is applied, you can connect to the network using: +For the **Global EG25 Module**, it is important to consider a zero interface ban to prevent network conflicts. The zero interface (`cdc-wdm0` or similar) is often created automatically and can lead to connectivity issues. To avoid this, we can tell the system to ignore this interface when managing the modem. + +To implement a zero interface ban, you can create a custom `udev` rule that prevents the system from using this interface. The following steps show how to create this rule. + +Create a new `udev` rule in `/etc/udev/rules.d/` to ignore the zero interface. + +```bash +sudo nano /etc/udev/rules.d/99-ban-zero-interface.rules +``` + +In the rule file, write the following line to ignore the `cdc-wdm0` interface (Change `cdc-wdm0` to the corresponding interface if the name differs in your case): + +```bash +SUBSYSTEM=="net", ACTION=="add", KERNEL=="cdc-wdm0", ATTR{authorized}="0" +``` + +This tells the system to disable the interface automatically. Then, reload the `udev` rules with the following commands: + +```bash +sudo udevadm control --reload-rules +``` + +```bash +sudo udevadm trigger +``` + +This will prevent the **Global EG25 Module** from using the zero interface (`cdc-wdm0`) and ensure the system uses the correct network interface for establishing connections. + +#### EMEA EC200A-EU Module + +The **EMEA (EC200A-EU) Module** is not directly supported by **ModemManager** out of the box and requires a compatibility patch. Once the patch is applied, you can connect to the network using: ```bash mmcli -m 0 --simple-connect='apn=iot.1nce.net,ip-type=ipv4v6' ``` -The modem will create a USB `eth0` interface that will be remapped into `ec200aeu` by an udev rule. +The modem will create a USB `eth0` interface that will be remapped into `ec200aeu` by an **udev** rule. #### Docker Environment and Power Management -In a Docker environment, it may be helpful to disable **ModemManager** to avoid conflicts and instead control the modem using **qmicli**. You can disable **ModemManager** with the following command: +In a Docker environment, it is often useful to disable **ModemManager** to avoid conflicts and instead control the modem using **qmicli**: ```bash -systemctl stop ModemManager +sudo systemctl stop ModemManager ``` -For modem power management, ensure that the Docker container has access to the GPIO device files by passing them into the container: +For modem power management, the connection between the **PCIE Enable (GPIO5)** pin and **VCC (3V3)** pin is now required for a proper power setup. This bridge ensures proper hardware functionality when controlling the modem power. Moreover, you should manage power through software to allow the modem to be rebooted in case it becomes unresponsive. + +Ensure that the Docker container has access to the GPIO device files by passing them into the container: ```bash docker run --device /dev/gpiochip5 ``` -Inside the container, an **entrypoint.sh** script can control the modem's power via GPIO. To enable the 3.3V Buck Converter, the following command can be added to the script: +Inside the container, an **entrypoint.sh** script can control the modem's power via GPIO, having the 3.3V Buck Converter line connected to **PCIE Enable (GPIO5)** pin, the following command can be added to the script: ```bash gpioset gpiochip5 5=1 ``` -***It is mandatory to have **PCIE Enable (GPIO5)** pin connected to the **VCC (3V3)** pin to enable the 3.3V Buck Converter.*** +***It is required to have **PCIE Enable (GPIO5)** pin connected to the **VCC (3V3)** pin to secure power supply line.*** -This will enable the power to the modem, and add a delay for modem initialization: +This will enable the power to the modem and add a delay for modem initialization: ```bash sleep 20 @@ -2275,6 +2307,8 @@ udhcpc -q -f -n -i wwan0 ![Pro 4G Module - Dynamic IP Configuration](assets/portentaMIDcarrier_mpcie_dynamic.png) +### Module Network Performance Test + A speed test can be performed to test the speed and performance of the connection. It involves downloading the `speedtest-cli` script, converting it to an executable, and running it inside a Docker container: ```bash @@ -2445,13 +2479,15 @@ AT commands, also known as Hayes commands, are instructions used to control mode 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. +***Before continuing, it is very important to have read all the [__Cat.4 Modem Cellular Connectivity__](#cat4-modem-cellular-connectivity) section. If you have not read it yet, please go through the section for a better understanding of the requirements and basic setup to use different variants of the Pro 4G Module.*** + ### Using Linux This subsection provides instructions on using **ModemManager**, **mmcli**, and **qmicli** to send AT commands to your Cat.4 modem with the Portenta X8. #### EG25 (Global) Module -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. +For the **GNSS Global (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. You can verify the connection using the following command: @@ -2461,7 +2497,7 @@ lsusb ***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.*** -If ModemManager is enabled, you can identify the modem with: +If **ModemManager** is enabled, you can identify the modem with: ```bash mmcli -L @@ -2521,34 +2557,40 @@ To configure the EG25 module with NetworkManager, you can use the following comm nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.autoconnect yes ``` -#### EC200A-EU (EU) Module +#### EMEA EC200A-EU Module -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. +The **EMEA (EC200A-EU)** module, unlike the EG25 module, 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. -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: +The **ModemManager** requires a small compatibility patch to work with the module and send configuration AT commands to the modem. Once patched, you can connect to the network using the following command for example: ```bash mmcli -m 0 --simple-connect='apn=iot.1nce.net,ip-type=ipv4v6' ``` -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: +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: ```bash sudo qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer ``` -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 around 20 seconds for the modem to become available, for example: +Power management for the **EC200A-EU module** may require manual intervention, particularly if **ModemManager** is disabled or when using Docker. Make sure the mini PCIe power configuration is configured as described in the [Mini PCIe Power Breakout Header](#mini-pcie-power-breakout-header-j9) section. The Portenta X8 requires the **PCIE Enable (GPIO5)** pin to be connected to a **VCC (3V3)** pin. This is a required power setup for proper system operation. + +Additionally, sometimes the modem may become unresponsive, so it is recommended that you have a software based power control, which allows you to reboot the modem when necessary. + +You can create a custom script using the `gpiod` library to manage modem power via software. Ensure that the jumper connection mentioned previously is in place for this to work. The script can be used to power the modem and provide the required delay for proper initialization. A typical example is as follows: ```bash -gpiod set-value 1 +gpioset gpiochip5 5=1 #PCIE 3V3 BUCK EN (stm32h7 PE10) ``` -Followed by: +After powering on the modem, allow **20 seconds** for the modem to initialize properly: ```bash sleep 20 ``` +This ensures the modem powers up correctly and becomes available for network operations. The software based power control also helps you reboot the modem if it becomes unresponsive, improving overall reliability and preventing manual resets. + #### Docker Container Considerations 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: @@ -2557,7 +2599,7 @@ Disable ModemManager to prevent conflicts with tools like `qmicli` when managing sudo systemctl stop ModemManager ``` -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. +Inside the container, you will need to manage the modem’s power as explained in this [**EC200A-EU**](#emea-ec200a-eu-module-1) section. To send AT commands, use `qmicli` within the Docker container. For example, you might use following command to interact with the modem: @@ -2565,7 +2607,33 @@ To send AT commands, use `qmicli` within the Docker container. For example, you sudo qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer ``` -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. +If you are using the **GNSS Global (EG25)** module, **NetworkManager** can manage the connection outside the container. For the **EMEA (EC200A-EU)** module, however, you will need to handle the connection using `qmicli` or similar tools within the container. + +For example, to retrieve the modem’s manufacturer information: + +```bash +sudo qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer +``` + +To send AT commands, you can use `qmicli` directly. For example, to send the `ATI` command to retrieve basic information about the modem, you can use: + +```bash +sudo qmicli -d /dev/cdc-wdm0 --device-open-proxy --dms-get-revision +``` + +Or if you want to send custom AT commands, such as `ATI`, you can use the following: + +```bash +sudo qmicli -d /dev/cdc-wdm0 --device-open-proxy --dms-set-test-mode --dms-set-raw-at-command="ATI" +``` + +If **ModemManager** is disabled and you want to directly send AT commands to the **EC200A-EU** module using `qmicli`, an example command for sending AT commands is as follows: + +```bash +sudo qmicli -d /dev/cdc-wdm0 --device-open-proxy --dms-set-raw-at-command="AT+CGMI" +``` + +This command sends the `AT+CGMI` command, which retrieves the manufacturer information from the modem. ### Using Arduino From 80180b981a71a0a3a998d0341613e0289c07645e Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Wed, 2 Oct 2024 18:54:40 -0600 Subject: [PATCH 08/19] Pro 4G Module content major update --- .../tutorials/user-manual/content.md | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index e31db2d339..812bfe37c8 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2088,16 +2088,12 @@ fw_setenv is_on_carrier yes fw_setenv carrier_name mid ``` -```bash -fw_setenv overlays 'ov_som_lbee5kl1dx ov_som_x8h7 ov_carrier_breakout_usbfs ov_carrier_mid_pcie_mini' -``` - -For managing the Pro 4G Module (**EG25** and **EC200A-EU**), you **only need the USB overlay (`ov_carrier_breakout_usbfs`)**, and **mPCIe overlay (`ov_carrier_mid_pcie_mini`) is not necessary** for these USB modems. You can configure the necessary overlays with USB overlay using the following command: - ```bash fw_setenv overlays 'ov_som_lbee5kl1dx ov_som_x8h7 ov_carrier_breakout_usbfs' ``` +For managing the Pro 4G Module (**GNSS Global (EG25)** and **EMEA (EC200A-EU)**), you **only need the USB overlay (`ov_carrier_breakout_usbfs`)**, and **mPCIe overlay (`ov_carrier_mid_pcie_mini`) is not necessary** for these USB modems. You can configure the necessary overlays with USB overlay using the following command: + Alternatively, it is possible to use the **tenta-config** process implemented in the [GIGA Display Connector's Linux Setup](#using-linux-1) section to apply the overlays to enable mini PCIe for the Portenta Mid Carrier with the Portenta X8. ***Please check out the guidelines in the [GIGA Display Connector's Linux Setup](#using-linux-1) section for detailed information on how the __tenta-config__ works if you have yet to become familiar with the usage.*** @@ -2191,13 +2187,11 @@ To manually stop the **ModemManager** service, use the following command: systemctl stop ModemManager ``` -After stopping **ModemManager**, there will be a delay before the modem can be powered back on and detected by **mmcli**. The delay is around 20 seconds for appropriate initialization. - -Make sure the mini PCIe power configuration is configured as described in the [Mini PCIe Power Breakout Header](#mini-pcie-power-breakout-header-j9) section. The Portenta X8 requires the **PCIE Enable (GPIO5)** pin to be connected to a **VCC (3V3)** pin. This is a required power setup for proper system operation. +After stopping **ModemManager**, there will be a delay before the modem can be powered back on and detected by **mmcli**. The delay is around **20 seconds** for appropriate initialization. -Modems may get stuck on certain occasions, so managing power through software is recommended to allow modem rebooting when necessary. This method also helps handle modem failures in case they happen. +Make sure the mini PCIe power configuration is configured as described in the [Mini PCIe Power Breakout Header](#mini-pcie-power-breakout-header-j9) section. The Portenta X8 requires the **PCIE Enable (GPIO5)** pin to be connected to a **VCC (3V3)** pin. -To adjust for modem initialization, an extended delay of **20 seconds** is required for the modem to power up properly. +Modems may get stuck on certain occasions, so it is recommended that power be managed through software to allow modem rebooting when necessary. #### Modem Configuration @@ -2213,7 +2207,7 @@ This command establishes a GSM connection on the `cdc-wdm0` interface and automa #### Zero Interface Ban Implementation for Global EG25 Module -For the **Global EG25 Module**, it is important to consider a zero interface ban to prevent network conflicts. The zero interface (`cdc-wdm0` or similar) is often created automatically and can lead to connectivity issues. To avoid this, we can tell the system to ignore this interface when managing the modem. +For the **Global EG25 Module**, it is important to consider a **zero interface ban** to prevent network conflicts. The zero interface (`cdc-wdm0` or similar) is often created automatically and can lead to connectivity issues. We can tell the system to ignore this interface when managing the modem to avoid this. To implement a zero interface ban, you can create a custom `udev` rule that prevents the system from using this interface. The following steps show how to create this rule. @@ -2229,7 +2223,7 @@ In the rule file, write the following line to ignore the `cdc-wdm0` interface (C SUBSYSTEM=="net", ACTION=="add", KERNEL=="cdc-wdm0", ATTR{authorized}="0" ``` -This tells the system to disable the interface automatically. Then, reload the `udev` rules with the following commands: +Then, reload the `udev` rules with the following commands: ```bash sudo udevadm control --reload-rules @@ -2249,7 +2243,7 @@ The **EMEA (EC200A-EU) Module** is not directly supported by **ModemManager** ou mmcli -m 0 --simple-connect='apn=iot.1nce.net,ip-type=ipv4v6' ``` -The modem will create a USB `eth0` interface that will be remapped into `ec200aeu` by an **udev** rule. +The modem will create a USB `eth0` interface that will be remapped into `ec200aeu` by an `udev` rule. #### Docker Environment and Power Management @@ -2267,15 +2261,15 @@ Ensure that the Docker container has access to the GPIO device files by passing docker run --device /dev/gpiochip5 ``` -Inside the container, an **entrypoint.sh** script can control the modem's power via GPIO, having the 3.3V Buck Converter line connected to **PCIE Enable (GPIO5)** pin, the following command can be added to the script: +Inside the container, an **entrypoint.sh** script can control the modem's power via GPIO, with the 3.3V Buck Converter line connected to the **PCIE Enable (GPIO5)** pin. The following command can be added to the script: ```bash gpioset gpiochip5 5=1 ``` -***It is required to have **PCIE Enable (GPIO5)** pin connected to the **VCC (3V3)** pin to secure power supply line.*** +***It is required to have __PCIE Enable (GPIO5)__ pin connected to the __VCC (3V3)__ pin to secure the power supply line.*** -This will enable the power to the modem and add a delay for modem initialization: +This will enable the power to the modem and add a delay for proper modem initialization: ```bash sleep 20 From c6cf68df2df626037f7f70c7c5ead332a7bf7509 Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Wed, 2 Oct 2024 19:24:58 -0600 Subject: [PATCH 09/19] PCIe modem tutorial update - Max Carrier section --- .../tutorials/mpcie-4g-modem/content.md | 106 +++++++++++++++++- 1 file changed, 104 insertions(+), 2 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md index 749b661189..274f7b8121 100644 --- a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md +++ b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md @@ -312,16 +312,68 @@ fw_setenv is_on_carrier yes fw_setenv carrier_name max ``` -The previous commands are used to set environment variables, which we will use to set and use the needed overlays to link the mini PCIe interface under its profile. The overlays are as follows and set using the following command: +The previous commands are used to set environment variables, which we will use to set and apply the needed overlays to link the USB modem interface under its profile. The overlays are as follows and set using the following command: ```bash -fw_setenv overlays 'ov_som_lbee5kl1dx ov_som_x8h7 ov_carrier_enuc_bq24195 ov_carrier_max_usbfs ov_carrier_max_sdc ov_carrier_max_cs42l52 ov_carrier_max_pcie_mini' +fw_setenv overlays 'ov_som_lbee5kl1dx ov_som_x8h7 ov_carrier_enuc_bq24195 ov_carrier_max_usbfs ov_carrier_max_sdc ov_carrier_max_cs42l52' ``` +***The `ov_carrier_max_pcie_mini` overlay is not required for USB modems such as the GNSS Global (EG25) and EMEA (EC200A-EU) variants of the Pro 4G Module.*** + Once the overlays are set, please reboot the Portenta X8 to ensure the configuration has been applied correctly. ### Connecting & Testing Network Connectivity +#### GNSS Global EG25 Module + +For the **GNSS Global (EG25) Module**, you can configure the modem using **nmcli**: + +```bash +nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.autoconnect yes +``` + +If your SIM card requires a PIN, update the command as follows: + +```bash +nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn mobile.vodafone.it gsm.pin +``` + +#### EMEA EC200A-EU Module + +For the **EMEA (EC200A-EU) Module**, which requires **mmcli**, use the following command to connect to the network after patching **ModemManager**: + +```bash +mmcli -m 0 --simple-connect='apn=iot.1nce.net,ip-type=ipv4v6' +``` + +Ensure the `udev` rule remaps the USB `eth0` interface to `ec200aeu`. The rule can be applied as follows: + +```bash +sudo nano /etc/udev/rules.d/99-remap-ec200aeu.rules +``` + +Add the following line: + +```bash +SUBSYSTEM=="net", ACTION=="add", KERNEL=="eth0", NAME="ec200aeu" +``` + +Then reload the rules: + +```bash +sudo udevadm control --reload-rules +``` + +```bash +sudo udevadm trigger +``` + +#### For QMI-based Modems + +For **QMI-based modems**, modems that use *Qualcomm MSM Interface*, following steps can help configure the modem, which involves managing the **Raw IP mode** and using **qmicli** for network control. + +#### Setting up Raw IP Mode for QMI-based Modems + With the overlays configured, the setup process involves bringing down the `wwan0` interface, setting it to raw IP mode, and then bringing it back up: ```bash @@ -336,6 +388,8 @@ echo Y > /sys/class/net/wwan0/qmi/raw_ip ip link set dev wwan0 up ``` +#### Inspecting and Configuring the QMI-based Modem + Following that, use `qmicli` commands to inspect the card's status and begin a network connection: ```bash @@ -358,6 +412,54 @@ udhcpc -q -f -n -i wwan0 ![PRO 4G GNSS Module - Dynamic IP Configuration](assets/portentaMAXcarrier_mpcie_dynamic.png) +### Modem Power Management + +The modems might become unresponsive, so it is recommended that power can be controlled through software to allow modem rebooting when necessary. The **gpioset** command should include a jumper and a 20 second delay for proper initialization. + +```bash +gpioset gpiochip5 5=1 #PCIE 3V3 BUCK EN (stm32h7 PE10) +``` + +This is applicable to both USB based and QMI based modems. After powering on the modem, allow **20 seconds** for the modem to initialize properly: + +```bash +sleep 20 +``` + +This ensures the modem powers up correctly and becomes available for network operations. + +### Docker Container Considerations + +In a Docker environment, it is often useful to disable **ModemManager** to avoid conflicts and instead control the modem using **qmicli** for QMI-based modems or use **nmcli/mmcli** for USB-based modems: + +```bash +sudo systemctl stop ModemManager +``` + +For modem power management, the connection between the **PCIE Enable (GPIO5)** pin and **VCC (3V3)** pin is required for a proper power setup. This bridge ensures proper hardware functionality when controlling the modem power. Moreover, you should manage power through software to allow the modem to be rebooted in case it becomes unresponsive. + +Ensure that the Docker container has access to the GPIO device files by passing them into the container: + +```bash +docker run --device /dev/gpiochip5 +``` + +Inside the container, an **entrypoint.sh** script can control the modem's power via GPIO, with the 3.3V Buck Converter line connected to the **PCIE Enable (GPIO5)** pin. The following command can be added to the script: + +```bash +gpioset gpiochip5 5=1 +``` + +***It is required to have **PCIE Enable (GPIO5)** pin connected to the **VCC (3V3)** pin to secure the power supply line.*** + +This will enable the power to the modem and add a delay for proper modem initialization: + +```bash +sleep 20 +``` + +### Testing Network Connectivity and Speed + We now have the Pro 4G Module with the Portenta X8 on the Porteta Max Carrier ready for use. To test the connection speed, perform a speed test by downloading the `speedtest-cli` script, making it executable, and running it within a Docker container: ```bash From df7be02358d90831125d4e69985c9a28a6fb58de Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Wed, 2 Oct 2024 19:33:51 -0600 Subject: [PATCH 10/19] Linter patch --- .../tutorials/mpcie-4g-modem/content.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md index 274f7b8121..c89131a41c 100644 --- a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md +++ b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md @@ -368,11 +368,11 @@ sudo udevadm control --reload-rules sudo udevadm trigger ``` -#### For QMI-based Modems +#### For QMI Based Modems -For **QMI-based modems**, modems that use *Qualcomm MSM Interface*, following steps can help configure the modem, which involves managing the **Raw IP mode** and using **qmicli** for network control. +For **QMI based modems**, modems that use *Qualcomm MSM Interface*, following steps can help configure the modem, which involves managing the **Raw IP mode** and using **qmicli** for network control. -#### Setting up Raw IP Mode for QMI-based Modems +#### Raw IP Mode Setup for QMI Based Modems With the overlays configured, the setup process involves bringing down the `wwan0` interface, setting it to raw IP mode, and then bringing it back up: @@ -388,7 +388,7 @@ echo Y > /sys/class/net/wwan0/qmi/raw_ip ip link set dev wwan0 up ``` -#### Inspecting and Configuring the QMI-based Modem +#### Inspecting and Configuring the QMI Based Modem Following that, use `qmicli` commands to inspect the card's status and begin a network connection: From 767a60ca3f9d1b1103709ead7ee6c7a4dc5bbc41 Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Thu, 3 Oct 2024 21:13:21 -0600 Subject: [PATCH 11/19] Interface exclusion rule content update --- .../tutorials/user-manual/content.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index 812bfe37c8..efb86a98b1 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2205,16 +2205,18 @@ nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.auto This command establishes a GSM connection on the `cdc-wdm0` interface and automatically connects to the `hologram` APN. -#### Zero Interface Ban Implementation for Global EG25 Module +#### Configuring Interface Ignore Rules for GNSS Global EG25 -For the **Global EG25 Module**, it is important to consider a **zero interface ban** to prevent network conflicts. The zero interface (`cdc-wdm0` or similar) is often created automatically and can lead to connectivity issues. We can tell the system to ignore this interface when managing the modem to avoid this. +For the **GNSS Global (EG25) Module**, it is important to consider the system to **ignore unnecessary interfaces** to prevent network conflicts during application development. One such interface, `cdc-wdm0`, is automatically created as a **control interface** used for modem management and is not intended for direct network connections. -To implement a zero interface ban, you can create a custom `udev` rule that prevents the system from using this interface. The following steps show how to create this rule. +If the system attempts to use `cdc-wdm0` for networking, it can lead to conflicts, misconfigurations, or performance issues because this interface is designed for control commands and is not optimized for handling data traffic. For example, for checking the modem status or sending AT commands. The appropriate data interfaces, such as `wwan0` or `eth0`, should be used for actual network connections. -Create a new `udev` rule in `/etc/udev/rules.d/` to ignore the zero interface. +To avoid these issues, you can configure the system to ignore the `cdc-wdm0` interface using a `udev` rule. This ensures that the modem's correct network interface is used without interference from unnecessary control interfaces. To implement this, the following example instructions can help you do so. + +Create a new `udev` rule in `/etc/udev/rules.d/` to ignore the `cdc-wdm0` interface: ```bash -sudo nano /etc/udev/rules.d/99-ban-zero-interface.rules +sudo nano /etc/udev/rules.d/99-ignore-cdc-wdm0.rules ``` In the rule file, write the following line to ignore the `cdc-wdm0` interface (Change `cdc-wdm0` to the corresponding interface if the name differs in your case): @@ -2229,11 +2231,13 @@ Then, reload the `udev` rules with the following commands: sudo udevadm control --reload-rules ``` +The rule can be immediately applied by triggering with following command: + ```bash sudo udevadm trigger ``` -This will prevent the **Global EG25 Module** from using the zero interface (`cdc-wdm0`) and ensure the system uses the correct network interface for establishing connections. +This configuration will prevent the **GNSS Global (EG25) Module** from using the control interface `cdc-wdm0` for networking, ensuring the proper network interface is used for establishing connections. This improves overall system reliability, reduces the risk of network conflicts and optimizes performance. #### EMEA EC200A-EU Module From d7d9e629129f62b939d0cb638f3560e84504634a Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Tue, 22 Oct 2024 18:01:30 -0600 Subject: [PATCH 12/19] Documentation content update post-review --- .../tutorials/mpcie-4g-modem/content.md | 19 ++++++++++++++++++- .../tutorials/user-manual/content.md | 18 ++++++++++++++---- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md index c89131a41c..c6a4d18995 100644 --- a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md +++ b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md @@ -334,6 +334,12 @@ nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.auto If your SIM card requires a PIN, update the command as follows: +```bash +nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn gsm.pin +``` + +For instance, if you are using Vodafone in Italy, you can replace the `` field with `mobile.vodafone.it` and include the PIN number as well: + ```bash nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn mobile.vodafone.it gsm.pin ``` @@ -444,6 +450,12 @@ Ensure that the Docker container has access to the GPIO device files by passing docker run --device /dev/gpiochip5 ``` +The `` field is the name of the Docker image you want to run with access to the GPIO device files. For example, if your Docker image is called `my_modem_image`, the command would look like this: + +```bash +docker run --device /dev/gpiochip5 my_modem_image +``` + Inside the container, an **entrypoint.sh** script can control the modem's power via GPIO, with the 3.3V Buck Converter line connected to the **PCIE Enable (GPIO5)** pin. The following command can be added to the script: ```bash @@ -488,7 +500,6 @@ After the speed test, you might observe results similar to the following image. ***The download and upload speed may vary depending on the region.*** - For a more streamlined approach, you can use the following single-line command: ```bash @@ -497,6 +508,12 @@ nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.auto If your SIM card requires a PIN, adjust the command as follows: +```bash +nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn gsm.pin +``` + +For instance, if you are using Vodafone in Italy, you can replace the `` field with `mobile.vodafone.it` and include the PIN number as well: + ```bash nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn mobile.vodafone.it gsm.pin ``` diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index efb86a98b1..6081af9ad3 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2189,9 +2189,7 @@ systemctl stop ModemManager After stopping **ModemManager**, there will be a delay before the modem can be powered back on and detected by **mmcli**. The delay is around **20 seconds** for appropriate initialization. -Make sure the mini PCIe power configuration is configured as described in the [Mini PCIe Power Breakout Header](#mini-pcie-power-breakout-header-j9) section. The Portenta X8 requires the **PCIE Enable (GPIO5)** pin to be connected to a **VCC (3V3)** pin. - -Modems may get stuck on certain occasions, so it is recommended that power be managed through software to allow modem rebooting when necessary. +***Make sure the mini PCIe power configuration is configured as described in the [Mini PCIe Power Breakout Header](#mini-pcie-power-breakout-header-j9) section. The Portenta X8 requires the __PCIE Enable (GPIO5)__ pin to be connected to a __VCC (3V3)__ pin. Modems may get stuck on certain occasions, so it is recommended that power be managed through software to allow modem rebooting when necessary.*** #### Modem Configuration @@ -2265,6 +2263,12 @@ Ensure that the Docker container has access to the GPIO device files by passing docker run --device /dev/gpiochip5 ``` +The `` field is the name of the Docker image you want to run with access to the GPIO device files. For example, if your Docker image is called `my_modem_image`, the command would look like this: + +```bash +docker run --device /dev/gpiochip5 my_modem_image +``` + Inside the container, an **entrypoint.sh** script can control the modem's power via GPIO, with the 3.3V Buck Converter line connected to the **PCIE Enable (GPIO5)** pin. The following command can be added to the script: ```bash @@ -2345,6 +2349,12 @@ nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.auto In case the SIM card requires a PIN number, the format is modified slightly as follows: +```bash +nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn gsm.pin +``` + +For instance, if you are using Vodafone in Italy, you can replace the `` field with `mobile.vodafone.it` and include the PIN number as well: + ```bash nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn mobile.vodafone.it gsm.pin ``` @@ -2573,7 +2583,7 @@ sudo qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer Power management for the **EC200A-EU module** may require manual intervention, particularly if **ModemManager** is disabled or when using Docker. Make sure the mini PCIe power configuration is configured as described in the [Mini PCIe Power Breakout Header](#mini-pcie-power-breakout-header-j9) section. The Portenta X8 requires the **PCIE Enable (GPIO5)** pin to be connected to a **VCC (3V3)** pin. This is a required power setup for proper system operation. -Additionally, sometimes the modem may become unresponsive, so it is recommended that you have a software based power control, which allows you to reboot the modem when necessary. +***Sometimes the modem may become unresponsive, so it is recommended that you have a software based power control, which allows you to reboot the modem when necessary.*** You can create a custom script using the `gpiod` library to manage modem power via software. Ensure that the jumper connection mentioned previously is in place for this to work. The script can be used to power the modem and provide the required delay for proper initialization. A typical example is as follows: From 88bd252d902f4d33d7e13fd808572f62b556b3df Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Tue, 22 Oct 2024 18:03:33 -0600 Subject: [PATCH 13/19] Documentation content minor update post-review --- .../portenta-max-carrier/tutorials/mpcie-4g-modem/content.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md index c6a4d18995..183f30051c 100644 --- a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md +++ b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md @@ -62,6 +62,8 @@ The following image provides the position of the Power Jack on the Portenta Max ![Portenta Max Carrier Power Jack](assets/portentaMAXcarrier_power_distro.png) +***Modems may get stuck on certain occasions, so it is recommended that power be managed through software to allow modem rebooting when necessary.*** + ## Mini PCI Express **Mini PCIe**, short for Mini Peripheral Component Interconnect Express, is a smaller version of the PCIe interface mainly used in laptops and small devices to add features such as Wi-Fi®, Bluetooth®, and cellular connectivity. From cea056867c07b37078c05beba9c0a0d9cdb1ba63 Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Wed, 23 Oct 2024 18:22:37 -0600 Subject: [PATCH 14/19] Documentation content update for feedback 3 & 8 --- .../tutorials/mpcie-4g-modem/content.md | 21 +++++++------------ .../tutorials/user-manual/content.md | 17 +++++++++++++-- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md index 183f30051c..6a7d49175a 100644 --- a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md +++ b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md @@ -348,33 +348,26 @@ nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn mobile.vodafone.it gsm.p #### EMEA EC200A-EU Module -For the **EMEA (EC200A-EU) Module**, which requires **mmcli**, use the following command to connect to the network after patching **ModemManager**: +The **EMEA (EC200A-EU) Module** can be used with **ModemManager** for network connectivity. To connect the module to the network, use the following command: ```bash mmcli -m 0 --simple-connect='apn=iot.1nce.net,ip-type=ipv4v6' ``` -Ensure the `udev` rule remaps the USB `eth0` interface to `ec200aeu`. The rule can be applied as follows: +The latest images include the necessary `udev` rules for managing the EC200A-EU module. To verify the `udev` rule, you can check the `75-ec200aeu.rules` file using the following command: ```bash -sudo nano /etc/udev/rules.d/99-remap-ec200aeu.rules +cat /etc/udev/rules.d/75-ec200aeu.rules ``` -Add the following line: +This rule file typically contains the following: ```bash -SUBSYSTEM=="net", ACTION=="add", KERNEL=="eth0", NAME="ec200aeu" +SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="6005", NAME="ec200aeu" +ACTION=="add", SUBSYSTEM=="net", KERNEL=="ec200aeu", TAG+="systemd", ENV{SYSTEMD_WANTS}="ec200a-eu.service" ``` -Then reload the rules: - -```bash -sudo udevadm control --reload-rules -``` - -```bash -sudo udevadm trigger -``` +These rules automatically manage the `ec200aeu` network interface and ensure the required service starts. #### For QMI Based Modems diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index 6081af9ad3..04bc166a80 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2239,13 +2239,26 @@ This configuration will prevent the **GNSS Global (EG25) Module** from using the #### EMEA EC200A-EU Module -The **EMEA (EC200A-EU) Module** is not directly supported by **ModemManager** out of the box and requires a compatibility patch. Once the patch is applied, you can connect to the network using: +The **EMEA (EC200A-EU) Module** can be used with **ModemManager** for network connectivity. To connect the module to the network, use the following command: ```bash mmcli -m 0 --simple-connect='apn=iot.1nce.net,ip-type=ipv4v6' ``` -The modem will create a USB `eth0` interface that will be remapped into `ec200aeu` by an `udev` rule. +The latest images include the necessary `udev` rules for managing the EC200A-EU module. To verify the `udev` rule, you can check the `75-ec200aeu.rules` file using the following command: + +```bash +cat /etc/udev/rules.d/75-ec200aeu.rules +``` + +This rule file typically contains the following: + +```bash +SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="6005", NAME="ec200aeu" +ACTION=="add", SUBSYSTEM=="net", KERNEL=="ec200aeu", TAG+="systemd", ENV{SYSTEMD_WANTS}="ec200a-eu.service" +``` + +These rules ensure that the `ec200aeu` interface is managed automatically and that the necessary service starts. #### Docker Environment and Power Management From acc21567c6d0fe6d4f77ac1f6bb76d28e895074b Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Wed, 23 Oct 2024 18:33:09 -0600 Subject: [PATCH 15/19] Documentation content update feedback 7 --- .../portenta-max-carrier/tutorials/mpcie-4g-modem/content.md | 2 +- .../portenta-mid-carrier/tutorials/user-manual/content.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md index 6a7d49175a..d89f285184 100644 --- a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md +++ b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md @@ -328,7 +328,7 @@ Once the overlays are set, please reboot the Portenta X8 to ensure the configura #### GNSS Global EG25 Module -For the **GNSS Global (EG25) Module**, you can configure the modem using **nmcli**: +The **GNSS Global (EG25) Module** supports the QMI interface, making it compatible with **NetworkManager**. You can configure the modem using **nmcli** (NetworkManager’s command-line tool): ```bash nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.autoconnect yes diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index 04bc166a80..1820afe977 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2195,7 +2195,7 @@ After stopping **ModemManager**, there will be a delay before the modem can be p #### Global EG25 Module -The **Global EG25 Module** is supported by **NetworkManager**, allowing you to configure it easily. To set up a connection, use the following command: +The **Global EG25 Module** supports the QMI interface, making it compatible with **NetworkManager**. You can configure it using **nmcli**, the command-line tool for **NetworkManager**. To set up a connection, use the following command: ```bash nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.autoconnect yes From 3b2996ac4cd7760984303b845a73b30440d71f5c Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Thu, 24 Oct 2024 18:42:26 -0600 Subject: [PATCH 16/19] Documentation content several update --- .../tutorials/mpcie-4g-modem/content.md | 41 +++++++++++++++++-- .../tutorials/user-manual/content.md | 40 +++++++++++------- 2 files changed, 62 insertions(+), 19 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md index d89f285184..58715e0168 100644 --- a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md +++ b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md @@ -62,7 +62,9 @@ The following image provides the position of the Power Jack on the Portenta Max ![Portenta Max Carrier Power Jack](assets/portentaMAXcarrier_power_distro.png) -***Modems may get stuck on certain occasions, so it is recommended that power be managed through software to allow modem rebooting when necessary.*** +***Modems can be challenging to work with, so it is helpful to understand the software components involved to troubleshoot potential issues effectively.*** + +Modems are complex devices, so it is recommended that the user knows each software component involved in order to troubleshoot potential issues. ## Mini PCI Express @@ -320,7 +322,7 @@ The previous commands are used to set environment variables, which we will use t fw_setenv overlays 'ov_som_lbee5kl1dx ov_som_x8h7 ov_carrier_enuc_bq24195 ov_carrier_max_usbfs ov_carrier_max_sdc ov_carrier_max_cs42l52' ``` -***The `ov_carrier_max_pcie_mini` overlay is not required for USB modems such as the GNSS Global (EG25) and EMEA (EC200A-EU) variants of the Pro 4G Module.*** +***__NOTE:__ The `ov_carrier_max_pcie_mini` overlay is __not required for modems__ such as the __GNSS Global (EG25)__ and __EMEA (EC200A-EU)__ variants of the Pro 4G Module, as these modems rely on the USB interface and not on the PCIe bus.*** Once the overlays are set, please reboot the Portenta X8 to ensure the configuration has been applied correctly. @@ -371,7 +373,27 @@ These rules automatically manage the `ec200aeu` network interface and ensure the #### For QMI Based Modems -For **QMI based modems**, modems that use *Qualcomm MSM Interface*, following steps can help configure the modem, which involves managing the **Raw IP mode** and using **qmicli** for network control. +**QMI-based modems** use the *Qualcomm MSM Interface (QMI)*, a messaging format for communication between software components in the modem and peripheral subsystems. QMI follows a client-server model, where clients interact with QMI services using either a **request/response** format or **unsolicited events** for system notifications. + +To check if a modem supports QMI, use the following command: + +```bash +qmicli -d /dev/cdc-wdm0 --dms-get-model +``` + +If the modem is QMI compatible, you can manage the **Raw IP mode** and control network connections using **qmicli**, which is an alternative to **ModemManager**. Before using **qmicli**, it is recommended to stop and disable the **ModemManager** service to avoid conflicts: + +```bash +sudo systemctl stop ModemManager +``` + +```bash +sudo systemctl disable ModemManager +``` + +This allows **qmicli** to communicate directly with the QMI interface for modem operations. + +***The **EC200A-EU** modem is not compatible with __QMI__. It requires raw AT commands over a USB serial interface. For more information, refer to the [Quectel EC200A-EU documentation](https://python.quectel.com/en/products/ec200a-eu).*** #### Raw IP Mode Setup for QMI Based Modems @@ -415,7 +437,18 @@ udhcpc -q -f -n -i wwan0 ### Modem Power Management -The modems might become unresponsive, so it is recommended that power can be controlled through software to allow modem rebooting when necessary. The **gpioset** command should include a jumper and a 20 second delay for proper initialization. +Modems can become unresponsive, so it is recommended that power can be controlled through software to allow rebooting when necessary. By default, this process is handled automatically by **ModemManager** using customized scripts such as: + +- `/usr/sbin/modem_on.sh` +- `/usr/sbin/modem_off.sh` + +These scripts contain the logic to manage modem power for different carrier boards and are used by **ModemManager** to distinguish between each board type. You can review these scripts by checking the **ModemManager** service configuration: + +```bash +systemctl cat ModemManager +``` + +If you prefer to manage the modem manually, you can use these scripts directly, as they provide a simpler way to handle modem power. For cases where **ModemManager** is disabled, you can use the **gpioset** command to control the modem’s power and add a 20 second delay for proper initialization: ```bash gpioset gpiochip5 5=1 #PCIE 3V3 BUCK EN (stm32h7 PE10) diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index 1820afe977..c1dcde6a02 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2162,12 +2162,14 @@ ip link set dev wwan0 up This step ensures the modem functions properly in QMI mode. +***The **EC200A-EU** modem is not compatible with __QMI__. It requires raw AT commands over a USB serial interface. For more information, refer to the [Quectel EC200A-EU documentation](https://python.quectel.com/en/products/ec200a-eu).*** + #### ModemManager and Power Management Service The **ModemManager** service manages the power for the Pro 4G Module via a script. **Global (EG25)** and **EU (EC200A-EU)** modems are different and require different configurations: - **Global EG25 Module**: This modem is supported directly by **NetworkManager**, which works alongside **ModemManager**. -- **EU EC200A-EU Module**: This modem is **not officially supported** by **ModemManager** and creates a USB `eth0` connection. This can be remapped into an `ec200aeu` network device using an `udev` rule. +- **EU EC200A-EU Module**: This modem is **not officially supported** by **ModemManager**. It is **not QMI-compatible** and requires raw AT commands over a USB serial interface. It connects as a USB device, creating an `ec200aeu` network interface managed by existing `udev` rules. Power management is handled by **ModemManager** using the following script setup. Before starting **ModemManager**, the system runs a script to power on the modem, and another script is run after the service stops to power off the modem: @@ -2189,7 +2191,7 @@ systemctl stop ModemManager After stopping **ModemManager**, there will be a delay before the modem can be powered back on and detected by **mmcli**. The delay is around **20 seconds** for appropriate initialization. -***Make sure the mini PCIe power configuration is configured as described in the [Mini PCIe Power Breakout Header](#mini-pcie-power-breakout-header-j9) section. The Portenta X8 requires the __PCIE Enable (GPIO5)__ pin to be connected to a __VCC (3V3)__ pin. Modems may get stuck on certain occasions, so it is recommended that power be managed through software to allow modem rebooting when necessary.*** +***Make sure the mini PCIe power configuration is configured as described in the [Mini PCIe Power Breakout Header](#mini-pcie-power-breakout-header-j9) section. The Portenta X8 requires the __PCIE Enable (GPIO5)__ pin to be connected to a __VCC (3V3)__ pin. Also, modems are complex devices, so it is recommended to understand the software components involved to troubleshoot issues effectively.*** #### Modem Configuration @@ -2268,9 +2270,22 @@ In a Docker environment, it is often useful to disable **ModemManager** to avoid sudo systemctl stop ModemManager ``` -For modem power management, the connection between the **PCIE Enable (GPIO5)** pin and **VCC (3V3)** pin is now required for a proper power setup. This bridge ensures proper hardware functionality when controlling the modem power. Moreover, you should manage power through software to allow the modem to be rebooted in case it becomes unresponsive. +However, when **ModemManager** is active, it handles modem power automatically using customized scripts, such as: + +- `/usr/sbin/modem_on.sh` +- `/usr/sbin/modem_off.sh` + +These scripts contain the logic to manage power across different carrier boards. They are used by **ModemManager** to control the modem. You can review these scripts within the **ModemManager** service configuration: + +```bash +systemctl cat ModemManager +``` + +If **ModemManager** is disabled, you can manually use these scripts to manage modem power, as they provide a straightforward way to handle it without conflicts. + +For modem power management, the connection between the **PCIE Enable (GPIO5)** pin and **VCC (3V3)** pin is required for a proper power setup. This bridge ensures stable hardware functionality when controlling modem power. -Ensure that the Docker container has access to the GPIO device files by passing them into the container: +If you prefer manual control inside the Docker container, ensure it has access to GPIO device files: ```bash docker run --device /dev/gpiochip5 @@ -2580,25 +2595,18 @@ nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.auto #### EMEA EC200A-EU Module -The **EMEA (EC200A-EU)** module, unlike the EG25 module, 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. +The **EMEA (EC200A-EU)** module is not compatible with **QMI** and operates using raw AT commands over a USB serial interface. It is also **not officially supported by ModemManager**, so it requires a different configuration approach compared to the **EG25 module**. When properly mounted and recognized by the Portenta X8, the module presents as a USB Ethernet device named `ec200aeu`, managed by existing `udev` rules. For more details, plese check [this section](#emea-ec200a-eu-module) -The **ModemManager** requires a small compatibility patch to work with the module and send configuration AT commands to the modem. Once patched, you can connect to the network using the following command for example: +To establish a network connection, use **mmcli** with the following command: ```bash mmcli -m 0 --simple-connect='apn=iot.1nce.net,ip-type=ipv4v6' ``` - -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: - -```bash -sudo qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer -``` +If **ModemManager** is disabled or if you prefer an alternative, you will need to use serial communication with AT commands to manage the modem. For more information, refer to the [Quectel EC200A-EU documentation](https://python.quectel.com/en/products/ec200a-eu). Power management for the **EC200A-EU module** may require manual intervention, particularly if **ModemManager** is disabled or when using Docker. Make sure the mini PCIe power configuration is configured as described in the [Mini PCIe Power Breakout Header](#mini-pcie-power-breakout-header-j9) section. The Portenta X8 requires the **PCIE Enable (GPIO5)** pin to be connected to a **VCC (3V3)** pin. This is a required power setup for proper system operation. -***Sometimes the modem may become unresponsive, so it is recommended that you have a software based power control, which allows you to reboot the modem when necessary.*** - -You can create a custom script using the `gpiod` library to manage modem power via software. Ensure that the jumper connection mentioned previously is in place for this to work. The script can be used to power the modem and provide the required delay for proper initialization. A typical example is as follows: +You can create a custom script using the `gpiod` library to manage modem power via software. Ensure that the jumper connection mentioned earlier is in place for proper functionality. The script can be used to power the modem and provide the required delay for proper initialization. A possible example is as follows: ```bash gpioset gpiochip5 5=1 #PCIE 3V3 BUCK EN (stm32h7 PE10) @@ -2612,6 +2620,8 @@ sleep 20 This ensures the modem powers up correctly and becomes available for network operations. The software based power control also helps you reboot the modem if it becomes unresponsive, improving overall reliability and preventing manual resets. +***Modems can be challenging to work with, so it is recommended to understand the software components involved to troubleshoot issues effectively.*** + #### Docker Container Considerations 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: From b6ce03fc175de095bce9c57d50f4747457331d60 Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Thu, 24 Oct 2024 19:30:04 -0600 Subject: [PATCH 17/19] Documentation minor update --- .../portenta-mid-carrier/tutorials/user-manual/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index c1dcde6a02..f8bf084d74 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2595,7 +2595,7 @@ nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.auto #### EMEA EC200A-EU Module -The **EMEA (EC200A-EU)** module is not compatible with **QMI** and operates using raw AT commands over a USB serial interface. It is also **not officially supported by ModemManager**, so it requires a different configuration approach compared to the **EG25 module**. When properly mounted and recognized by the Portenta X8, the module presents as a USB Ethernet device named `ec200aeu`, managed by existing `udev` rules. For more details, plese check [this section](#emea-ec200a-eu-module) +The **EMEA (EC200A-EU)** module is not compatible with **QMI** and operates using raw AT commands over a USB serial interface. It is also **not officially supported by ModemManager**, so it requires a different configuration approach compared to the **EG25 module**. When properly mounted and recognized by the Portenta X8, the module presents as a USB Ethernet device named `ec200aeu`, managed by existing `udev` rules. For more details, please check [this section](#emea-ec200a-eu-module) To establish a network connection, use **mmcli** with the following command: From ada43a8edda1042070491941dbf9971c2d5e25d5 Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Fri, 25 Oct 2024 12:13:19 -0600 Subject: [PATCH 18/19] Documentation content post review update --- .../tutorials/mpcie-4g-modem/content.md | 8 ++++++-- .../tutorials/user-manual/content.md | 18 +++++++++++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md index 58715e0168..4b93db56c1 100644 --- a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md +++ b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md @@ -330,7 +330,7 @@ Once the overlays are set, please reboot the Portenta X8 to ensure the configura #### GNSS Global EG25 Module -The **GNSS Global (EG25) Module** supports the QMI interface, making it compatible with **NetworkManager**. You can configure the modem using **nmcli** (NetworkManager’s command-line tool): +The **GNSS Global (EG25) Module** supports the *Qualcomm MSM Interface (QMI)*, which is compatible with **NetworkManager**. You can configure the modem using **nmcli**, the command-line tool for **NetworkManager**: ```bash nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.autoconnect yes @@ -391,7 +391,7 @@ sudo systemctl stop ModemManager sudo systemctl disable ModemManager ``` -This allows **qmicli** to communicate directly with the QMI interface for modem operations. +Once **ModemManager** has been disabled, you can use **qmicli** to communicate reliably with the QMI interface for modem operations. ***The **EC200A-EU** modem is not compatible with __QMI__. It requires raw AT commands over a USB serial interface. For more information, refer to the [Quectel EC200A-EU documentation](https://python.quectel.com/en/products/ec200a-eu).*** @@ -470,6 +470,10 @@ In a Docker environment, it is often useful to disable **ModemManager** to avoid sudo systemctl stop ModemManager ``` +```bash +sudo systemctl disable ModemManager +``` + For modem power management, the connection between the **PCIE Enable (GPIO5)** pin and **VCC (3V3)** pin is required for a proper power setup. This bridge ensures proper hardware functionality when controlling the modem power. Moreover, you should manage power through software to allow the modem to be rebooted in case it becomes unresponsive. Ensure that the Docker container has access to the GPIO device files by passing them into the container: diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index f8bf084d74..89a091db52 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2168,7 +2168,7 @@ This step ensures the modem functions properly in QMI mode. The **ModemManager** service manages the power for the Pro 4G Module via a script. **Global (EG25)** and **EU (EC200A-EU)** modems are different and require different configurations: -- **Global EG25 Module**: This modem is supported directly by **NetworkManager**, which works alongside **ModemManager**. +- **Global EG25 Module**: This modem supports the *Qualcomm MSM Interface (QMI)*, making it compatible with **NetworkManager**, which uses **nmcli** as its command-line tool. It also works with **ModemManager** to manage modem connectivity. - **EU EC200A-EU Module**: This modem is **not officially supported** by **ModemManager**. It is **not QMI-compatible** and requires raw AT commands over a USB serial interface. It connects as a USB device, creating an `ec200aeu` network interface managed by existing `udev` rules. Power management is handled by **ModemManager** using the following script setup. Before starting **ModemManager**, the system runs a script to power on the modem, and another script is run after the service stops to power off the modem: @@ -2270,6 +2270,10 @@ In a Docker environment, it is often useful to disable **ModemManager** to avoid sudo systemctl stop ModemManager ``` +```bash +sudo systemctl disable ModemManager +``` + However, when **ModemManager** is active, it handles modem power automatically using customized scripts, such as: - `/usr/sbin/modem_on.sh` @@ -2547,12 +2551,16 @@ The output will list the detected modems, including the Pro 4G Module. Note the ![Arduino Pro 4G Module - AT Commands](assets/portentaMIDcarrier_mpcie_4gmodem_at1.png) -Before sending AT commands, ModemManager must be in debug mode. First, stop the ModemManager service using: +Before sending AT commands, ModemManager must be in debug mode. First, stop and disable the ModemManager service using: ```bash sudo systemctl stop ModemManager ``` +```bash +sudo systemctl disable ModemManager +``` + Then start it in the background with debugging enabled by running: ```bash @@ -2624,12 +2632,16 @@ This ensures the modem powers up correctly and becomes available for network ope #### Docker Container Considerations -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: +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: ```bash sudo systemctl stop ModemManager ``` +```bash +sudo systemctl disable ModemManager +``` + Inside the container, you will need to manage the modem’s power as explained in this [**EC200A-EU**](#emea-ec200a-eu-module-1) section. To send AT commands, use `qmicli` within the Docker container. For example, you might use following command to interact with the modem: From a16858e9ce32684140055f9946c195b0749a257f Mon Sep 17 00:00:00 2001 From: TaddyHC Date: Mon, 28 Oct 2024 18:02:53 -0600 Subject: [PATCH 19/19] Documentation content post review update --- .../tutorials/mpcie-4g-modem/content.md | 8 ++++++-- .../tutorials/user-manual/content.md | 18 +++++++++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md index 4b93db56c1..de495eb8ce 100644 --- a/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md +++ b/content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md @@ -336,6 +336,8 @@ The **GNSS Global (EG25) Module** supports the *Qualcomm MSM Interface (QMI)*, w nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.autoconnect yes ``` +***For information on managing interface configuration rules for the EG25 module, please see [this section](https://docs.arduino.cc/tutorials/portenta-mid-carrier/user-manual/#global-eg25-module).*** + If your SIM card requires a PIN, update the command as follows: ```bash @@ -350,13 +352,15 @@ nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn mobile.vodafone.it gsm.p #### EMEA EC200A-EU Module -The **EMEA (EC200A-EU) Module** can be used with **ModemManager** for network connectivity. To connect the module to the network, use the following command: +The **EMEA (EC200A-EU) Module** mainly uses raw AT commands over a USB serial interface and is not compatible with QMI. While it is not *natively supported* by **ModemManager**, basic connectivity can still be established using **mmcli**: ```bash mmcli -m 0 --simple-connect='apn=iot.1nce.net,ip-type=ipv4v6' ``` -The latest images include the necessary `udev` rules for managing the EC200A-EU module. To verify the `udev` rule, you can check the `75-ec200aeu.rules` file using the following command: +***The **EC200A-EU** modem is not compatible with __QMI__. It requires raw AT commands over a USB serial interface. For more information, refer to the [Quectel EC200A-EU documentation](https://python.quectel.com/en/products/ec200a-eu).*** + +The latest images include the necessary `udev` rules to automatically manage the `ec200aeu` interface. You can verify this by checking the `75-ec200aeu.rules` file using the following command: ```bash cat /etc/udev/rules.d/75-ec200aeu.rules diff --git a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md index 89a091db52..0d849052ef 100644 --- a/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md +++ b/content/hardware/04.pro/carriers/portenta-mid-carrier/tutorials/user-manual/content.md @@ -2197,21 +2197,21 @@ After stopping **ModemManager**, there will be a delay before the modem can be p #### Global EG25 Module -The **Global EG25 Module** supports the QMI interface, making it compatible with **NetworkManager**. You can configure it using **nmcli**, the command-line tool for **NetworkManager**. To set up a connection, use the following command: +The **Global EG25 Module** supports the *Qualcomm MSM Interface (QMI)*, making it compatible with **NetworkManager**. You can configure it using **nmcli**, the command-line tool for **NetworkManager**. To set up a connection, use the following command: ```bash nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.autoconnect yes ``` -This command establishes a GSM connection on the `cdc-wdm0` interface and automatically connects to the `hologram` APN. +In this command, the `cdc-wdm0` interface is used to establish the GSM connection because **nmcli** needs to interact with the control interface to set up the modem for data connectivity. **nmcli** uses `cdc-wdm0` to send QMI commands configuring the modem, defining the APN, and handling initial network connection setup. This step is important for activating the data interface (`wwan0` or `eth0`) and preparing it for use. -#### Configuring Interface Ignore Rules for GNSS Global EG25 +However, while this command uses `cdc-wdm0` for connection setup, it does not mean that `cdc-wdm0` will handle actual data traffic. The `cdc-wdm0` interface is designed specifically for QMI based control messages and modem management, which means it only controls the modem’s behavior and establishes the network session. Once the session is active, the modem will use a separate network interface, such as `wwan0` or `eth0`, to manage data transmission. -For the **GNSS Global (EG25) Module**, it is important to consider the system to **ignore unnecessary interfaces** to prevent network conflicts during application development. One such interface, `cdc-wdm0`, is automatically created as a **control interface** used for modem management and is not intended for direct network connections. +Depending on the network configuration, the proper data transmission interfaces to use on the **EG25 Module** are `wwan0` or `eth0`. These interfaces are specifically intended for network traffic and should be used for all networking tasks. -If the system attempts to use `cdc-wdm0` for networking, it can lead to conflicts, misconfigurations, or performance issues because this interface is designed for control commands and is not optimized for handling data traffic. For example, for checking the modem status or sending AT commands. The appropriate data interfaces, such as `wwan0` or `eth0`, should be used for actual network connections. +#### Configuring Interface Ignore Rules for GNSS Global EG25 -To avoid these issues, you can configure the system to ignore the `cdc-wdm0` interface using a `udev` rule. This ensures that the modem's correct network interface is used without interference from unnecessary control interfaces. To implement this, the following example instructions can help you do so. +To prevent potential conflicts and ensure the system uses the correct network interface, you can configure it to **ignore the `cdc-wdm0` interface** for regular networking tasks. You can configure this for the system using a `udev` rule. This ensures that the modem's correct network interface is used without interference from unnecessary control interfaces. To implement this, the following example instructions can help you do so. Create a new `udev` rule in `/etc/udev/rules.d/` to ignore the `cdc-wdm0` interface: @@ -2237,17 +2237,17 @@ The rule can be immediately applied by triggering with following command: sudo udevadm trigger ``` -This configuration will prevent the **GNSS Global (EG25) Module** from using the control interface `cdc-wdm0` for networking, ensuring the proper network interface is used for establishing connections. This improves overall system reliability, reduces the risk of network conflicts and optimizes performance. +This configuration ensures that the **GNSS Global (EG25) Module** does not use the `cdc-wdm0` control interface for networking. It improves system reliability by preventing conflicts, optimizing performance, and ensuring that the appropriate data interface, like `wwan0` or `eth0`, is used for network connections. #### EMEA EC200A-EU Module -The **EMEA (EC200A-EU) Module** can be used with **ModemManager** for network connectivity. To connect the module to the network, use the following command: +The **EMEA (EC200A-EU) Module** mainly uses raw AT commands over a USB serial interface and is not compatible with **QMI**. While it is not *natively supported* by **ModemManager**, basic connectivity can still be established using **mmcli**: ```bash mmcli -m 0 --simple-connect='apn=iot.1nce.net,ip-type=ipv4v6' ``` -The latest images include the necessary `udev` rules for managing the EC200A-EU module. To verify the `udev` rule, you can check the `75-ec200aeu.rules` file using the following command: +The latest images include the necessary `udev` rules to automatically manage the `ec200aeu` interface. You can verify this by checking the `75-ec200aeu.rules` file using the following command: ```bash cat /etc/udev/rules.d/75-ec200aeu.rules