Skip to content

Commit 9606e5b

Browse files
committed
User manual content update & changes
1 parent 474536f commit 9606e5b

File tree

1 file changed

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

1 file changed

+1
-91
lines changed

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

Lines changed: 1 addition & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,9 +2352,6 @@ Ensure that the Pro 4G Module is properly mounted on the Portenta Mid Carrier an
23522352

23532353
```bash
23542354
lsusb
2355-
2356-
# Or
2357-
dmesg
23582355
```
23592356

23602357
***Please set up the Pro 4G Module referring to [this section](#using-linux-4). Otherwise, the __ModemManager__ service may not work as intended or be recognized.***
@@ -2411,94 +2408,7 @@ You can now start sending AT commands. Here are a few basic AT commands to test
24112408

24122409
***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).***
24132410

2414-
You can use Docker to manage the dependencies and tools needed to send AT commands and ensure a consistent environment. The idea would be that you will have the environment running in a separate instance for testing purposes.
2415-
2416-
```
2417-
# Use the official Debian image
2418-
FROM debian:latest
2419-
2420-
# Install necessary packages
2421-
RUN apt-get update && \
2422-
apt-get install -y modemmanager dbus usbutils udhcpc libqmi-utils && \
2423-
apt-get clean && \
2424-
rm -rf /var/lib/apt/lists/*
2425-
2426-
# Set the working directory
2427-
WORKDIR /app
2428-
2429-
# Set the default command to bash
2430-
CMD ["bash"]
2431-
```
2432-
2433-
Create a file named *Dockerfile* with the content above. This *Dockerfile* sets up a Debian-based image with *ModemManager* and *mmcli* installed.
2434-
2435-
Open a terminal in the directory containing the Dockerfile and build the Docker image:
2436-
2437-
```bash
2438-
docker build . -t atcommands
2439-
```
2440-
2441-
Run the container with the Pro 4G Module attached. This command will start the container and open a bash shell:
2442-
2443-
```bash
2444-
docker run --rm -it --device=/dev/cdc-wdm0 --volume /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket --privileged atcommands
2445-
```
2446-
2447-
Inside the Docker container, identify the modem and send AT commands:
2448-
2449-
```bash
2450-
ModemManager --debug > /var/log/modemmanager.log 2>&1 &
2451-
```
2452-
2453-
```bash
2454-
# List modems
2455-
mmcli -L
2456-
```
2457-
2458-
```bash
2459-
# Replace `/org/freedesktop/ModemManager1/Modem/0` with your actual modem's device ID if required after verification
2460-
sudo mmcli -m /org/freedesktop/ModemManager1/Modem/0 --command="ATI"
2461-
```
2462-
2463-
You can create a script to automate the process of starting *ModemManager* in debug mode and sending an AT command:
2464-
2465-
```python
2466-
#!/bin/bash
2467-
2468-
# Stop ModemManager
2469-
sudo systemctl stop ModemManager
2470-
2471-
# Start ModemManager in debug mode quietly
2472-
sudo ModemManager --debug > /var/log/modemmanager.log 2>&1 &
2473-
2474-
# Wait a few seconds to ensure ModemManager is fully started
2475-
sleep 5
2476-
2477-
# Send AT command
2478-
mmcli -m /org/freedesktop/ModemManager1/Modem/0 --command="ATI"
2479-
```
2480-
2481-
Save this script as run_mm_debug.sh, make it executable, and run it:
2482-
2483-
```bash
2484-
chmod +x run_mm_debug.sh
2485-
```
2486-
2487-
```bash
2488-
./run_mm_debug.sh
2489-
```
2490-
2491-
To stop the ModemManager process running in debug mode, find its process ID (PID) and kill it:
2492-
2493-
```bash
2494-
ps aux | grep ModemManager
2495-
```
2496-
2497-
```bash
2498-
sudo kill <PID>
2499-
```
2500-
2501-
Using **`nmcli`**, you can easily send AT commands to your Cat.4 modem to perform various tasks like checking the modem status, signal quality, and network registration. This method provides a straightforward way to interact with your modem from a Linux environment, whether you are performing a simple check or managing more advanced functions.
2411+
Using **`mmcli`**, you can easily send AT commands to your Cat.4 modem to perform various tasks like checking the modem status, signal quality, and network registration. This method provides a straightforward way to interact with your modem from a Linux environment, whether you are performing a simple check or managing more advanced functions.
25022412

25032413
Following these steps, you can effectively manage and troubleshoot your modem using AT commands in the Linux environment.
25042414

0 commit comments

Comments
 (0)