I have an embedded system comprising of a RaspberryPi compute module and a Quectel EG25-G LTE modem. I have installed RaspberryPi OS (bookworm) on it and have used ModemManager
/NetworkManager
to successfully configure the modem.
The modem presents itself to Linux as 4 USB serial ports, /dev/ttyUSB[[0-3]
, a cdc-wdm0
device and a wwan0
network device.
What I don't understand is why ModemManager opens exclusively all of the serial ports to the modem? The modem has 2 serial ports (ttyUSB2
& ttyUSB3
) that accept AT commands. I want to use one to change some settings in the modem related to GPS but in its default configuration ModemManager
is bound to all the ports and I cannot open any of them from a script.
I have been able to add a udev
rule to tell ModemManager
to ignore the ttyUSB3
port however I am unsure if this will break something else in ModemManager
.
For reference the udev rule I am using is:
# Disable modem manager AT_SECONDARY on port
ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{.MM_USBIFNUM}=="03", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" SYMLINK+="atsec%n