You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/04.pro/carriers/portenta-max-carrier/tutorials/mpcie-4g-modem/content.md
+104-2Lines changed: 104 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -312,16 +312,68 @@ fw_setenv is_on_carrier yes
312
312
fw_setenv carrier_name max
313
313
```
314
314
315
-
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:
315
+
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:
***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.***
322
+
321
323
Once the overlays are set, please reboot the Portenta X8 to ensure the configuration has been applied correctly.
322
324
323
325
### Connecting & Testing Network Connectivity
324
326
327
+
#### GNSS Global EG25 Module
328
+
329
+
For the **GNSS Global (EG25) Module**, you can configure the modem using **nmcli**:
330
+
331
+
```bash
332
+
nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn hologram connection.autoconnect yes
333
+
```
334
+
335
+
If your SIM card requires a PIN, update the command as follows:
336
+
337
+
```bash
338
+
nmcli c add type gsm ifname cdc-wdm0 con-name wwan0 apn mobile.vodafone.it gsm.pin <PIN>
339
+
```
340
+
341
+
#### EMEA EC200A-EU Module
342
+
343
+
For the **EMEA (EC200A-EU) Module**, which requires **mmcli**, use the following command to connect to the network after patching **ModemManager**:
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.
374
+
375
+
#### Setting up Raw IP Mode for QMI-based Modems
376
+
325
377
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:
326
378
327
379
```bash
@@ -336,6 +388,8 @@ echo Y > /sys/class/net/wwan0/qmi/raw_ip
336
388
ip link set dev wwan0 up
337
389
```
338
390
391
+
#### Inspecting and Configuring the QMI-based Modem
392
+
339
393
Following that, use `qmicli` commands to inspect the card's status and begin a network connection:
340
394
341
395
```bash
@@ -358,6 +412,54 @@ udhcpc -q -f -n -i wwan0
358
412
359
413

360
414
415
+
### Modem Power Management
416
+
417
+
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.
418
+
419
+
```bash
420
+
gpioset gpiochip5 5=1 #PCIE 3V3 BUCK EN (stm32h7 PE10)
421
+
```
422
+
423
+
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:
424
+
425
+
```bash
426
+
sleep 20
427
+
```
428
+
429
+
This ensures the modem powers up correctly and becomes available for network operations.
430
+
431
+
### Docker Container Considerations
432
+
433
+
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:
434
+
435
+
```bash
436
+
sudo systemctl stop ModemManager
437
+
```
438
+
439
+
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.
440
+
441
+
Ensure that the Docker container has access to the GPIO device files by passing them into the container:
442
+
443
+
```bash
444
+
docker run --device /dev/gpiochip5 <docker-image>
445
+
```
446
+
447
+
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:
448
+
449
+
```bash
450
+
gpioset gpiochip5 5=1
451
+
```
452
+
453
+
***It is required to have **PCIE Enable (GPIO5)** pin connected to the **VCC (3V3)** pin to secure the power supply line.***
454
+
455
+
This will enable the power to the modem and add a delay for proper modem initialization:
456
+
457
+
```bash
458
+
sleep 20
459
+
```
460
+
461
+
### Testing Network Connectivity and Speed
462
+
361
463
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:
0 commit comments