Quectel EC25 & AT&T connection Catch-22

Filip Kubicz filip.kubicz at tier.app
Tue Apr 23 16:07:56 UTC 2024


Hi Bruce,

You can use ModemManager's API to set APN. ModemManager will do it using
QMI protocol and there should be no need to send additional AT
command unless you're doing something more custom not handled by
ModemManager.

I've been using Quectel (EG/EC) modems over USB with ModemManager and as
Enrico said there is no need to use Quectel's patched driver qmi_wwan_q.
With newer Linux versions can use mainline qmi_wwan, as explained here:
https://www.mail-archive.com/modemmanager-devel@lists.freedesktop.org/msg06298.html
You can just confirm that your modem PID/VID is included in the version of
kernel that you use and this is going to work.

I'm sharing sample kernel output for reference, hope it helps. I think you
need cdc-wdm0 device.

Jan  1 00:00:33 kernel: [   33.548300] usb 1-1: new high-speed USB device
number 2 using ci_hdrc
Jan  1 00:00:33 kernel: [   33.781440] usb 1-1: New USB device found,
idVendor=2c7c, idProduct=0121, bcdDevice= 3.18
Jan  1 00:00:33 kernel: [   33.790457] usb 1-1: New USB device strings:
Mfr=1, Product=2, SerialNumber=3
Jan  1 00:00:33 kernel: [   33.797992] usb 1-1: Product: EC21-EUX
Jan  1 00:00:33 kernel: [   33.801795] usb 1-1: Manufacturer: Quectel
Jan  1 00:00:33 kernel: [   33.805937] usb 1-1: SerialNumber:
0123456789ABCDEF
Jan  1 00:00:33 kernel: [   33.870897] option 1-1:1.0: GSM modem (1-port)
converter detected
Jan  1 00:00:33 kernel: [   33.903985] usb 1-1: GSM modem (1-port)
converter now attached to ttyUSB0
Jan  1 00:00:33 kernel: [   33.956276] option 1-1:1.1: GSM modem (1-port)
converter detected
Jan  1 00:00:33 kernel: [   33.980366] usb 1-1: GSM modem (1-port)
converter now attached to ttyUSB1
Jan  1 00:00:33 kernel: [   33.998549] option 1-1:1.2: GSM modem (1-port)
converter detected
Jan  1 00:00:34 kernel: [   34.021000] usb 1-1: GSM modem (1-port)
converter now attached to ttyUSB2
Jan  1 00:00:34 kernel: [   34.052445] option 1-1:1.3: GSM modem (1-port)
converter detected
Jan  1 00:00:34 kernel: [   34.076217] usb 1-1: GSM modem (1-port)
converter now attached to ttyUSB3
Jan  1 00:00:34 kernel: [   34.144283] qmi_wwan 1-1:1.4: cdc-wdm0: USB WDM
device
Jan  1 00:00:34 kernel: [   34.177899] qmi_wwan 1-1:1.4 wwan0: register
'qmi_wwan' at usb-ci_hdrc.1-1, WWAN/QMI device, xx:xx:e9:ae:aa:11

And part of the mmcli -m 0 output:
  System   |                 device:
/sys/devices/platform/soc/2100000.bus/2184200.usb/ci_hdrc.1/usb1/1-1
           |                drivers: qmi_wwan, option
           |                 plugin: quectel
           |           primary port: cdc-wdm0
           |                  ports: cdc-wdm0 (qmi), ttyUSB0 (qcdm),
ttyUSB1 (ignored),
           |                         ttyUSB2 (at), ttyUSB3 (ignored), wwan0
(net)

And then you will be able to set APN using ModemManager API:
https://www.freedesktop.org/software/ModemManager/doc/latest/ModemManager/gdbus-org.freedesktop.ModemManager1.Modem.Simple.html
You can pass the APN to Connect() function.
Or for testing you can use

mmcli -m 0 --simple-connect="apn=your_apn"

mmcli - more info here
https://www.freedesktop.org/software/ModemManager/man/1.0.0/mmcli.8.html

Kind regards,
Filip


On Mon, Apr 22, 2024 at 11:12 AM Enrico Mioso <mrkiko.rs at gmail.com> wrote:

> On Fri, Apr 19, 2024 at 04:39:46PM +0000, Bruce Johnson wrote:
> > I have a question about using both QMI and the serial interface with
> ModemManager.
> >
> > I had little difficulty getting ModemManager's SimpleModem to connect to
> T-Mobile (USA) using a Quectel EG25-G, but we found that modem wasn't
> compatible with AT&T and/or a private APN used by one of our customers. We
> were advised to use the Quectel EC25, and after engaging both Quectel and
> AT&T, we were told that we need to insert the APN into the modem using an
> AT command, AT+CGDCONT=1,"IPV4V6","mcm.com.attz". I had to tweak the kernel
> config and the ModemManager build.
> >
> > Mods:
> >
> >   *   I built ModemManager 1.18.4 with --with-at-command-via-dbus.
> >   *   In the kernel config, I added USB Serial Converter support -> USB
> driver for GSM and CDMA modems.
> >
> > After I did this, the /dev/ttyUSB[1-4] files showed up, and I was able
> to issue AT commands using ModemManager, but while the modem would sort-of
> connect with SimpleModem's connect method -- I am getting a Bearer, and
> mmcli shows "connected" -- I receive no IP address information from the
> carrier. Port wwan0 is showing up as "ignored". (mmcli output below)
> >
> > The Quectel docs also said to patch the kernel a certain way to allow
> use of serial and the QMI_WWAN driver, but wwan0 is still ignored.
> >
> > Does anyone have any suggestions?
> >
> > Thanks!
> >
> > --
> > Bruce Johnson
> > Chantilly, Virginia
> > USA
>
> I will stand corrected in case - but...
> I don't think you need AT commands via d-bus to do this, but giving the
> APN via QMI somehow, depending on the object or method you use to connect.
> That said, you probably won't need qmi_wwan_q or whatever - the stock
> qmi_wwan driver from kernel, and "option" for serial should suffice.
>
> For some reason you have wwan0 (gnored) in your output which doesn't sound
> right. I would try to look at it/fix it first.
>
> Enrico
>
>
>
> >
> >
> >   --------------------------------
> >   General  |                 path: /org/freedesktop/ModemManager1/Modem/0
> >            |            device id:
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> >   --------------------------------
> >   Hardware |         manufacturer: Quectel
> >            |                model: EC25
> >            |    firmware revision: EC25AFFAR07A14M4G
> >            |            supported: gsm-umts, lte
> >            |              current: gsm-umts, lte
> >            |         equipment id: 359401089771197
> >   --------------------------------
> >   System   |               device:
> /sys/devices/pci0000:00/0000:00:15.0/usb1/1-4
> >            |              drivers: option, qmi_wwan
> >            |               plugin: quectel
> >            |         primary port: ttyUSB3
> >            |                ports: ttyUSB2 (gps), ttyUSB3 (at), ttyUSB4
> (at), wwan0 (ignored)
> >   --------------------------------
> >   Status   |       unlock retries: sim-pin (3), sim-puk (10), sim-pin2
> (3), sim-puk2 (10)
> >            |                state: connected
> >            |          power state: on
> >            |          access tech: lte
> >            |       signal quality: 60% (recent)
> >   --------------------------------
> >   Modes    |            supported: allowed: 2g, 3g, 4g; preferred: none
> >            |              current: allowed: 2g, 3g, 4g; preferred: none
> >   --------------------------------
> >   IP       |            supported: ipv4, ipv6, ipv4v6
> >   --------------------------------
> >   3GPP     |                 imei: 3594010XXXXXXXX
> >            |          operator id: 310410
> >            |        operator name: AT&T
> >            |         registration: home
> >   --------------------------------
> >   3GPP EPS | ue mode of operation: csps-2
> >   --------------------------------
> >   SIM      |     primary sim path: /org/freedesktop/ModemManager1/SIM/0
> >   --------------------------------
> >   Bearer   |                paths:
> /org/freedesktop/ModemManager1/Bearer/0
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20240423/c828788d/attachment.htm>


More information about the ModemManager-devel mailing list