Commit Graph
239 Commits
Author SHA1 Message Date
Vanillan Wang d2f4ca8a5b plugin,rolling: Add udev rules for RW101R modules.
The Rolling needs to add the udev rules for supporting RW101R modules.

Signed-off-by: Vanillan Wang <vanillanwang@163.com>
2025-09-30 08:58:49 -05:00
Lubomir Rintel 76c055dcef fibocom: Add rules with hints for L850-GL (Intel)
The device would eventually be automatically probed. Add hints anyway,
as not to waste time with the generic probe.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
2025-09-19 09:46:52 -05:00
Lubomir Rintel f79cf7c78e fibocom: Add vendor ID for Intel
Seen on an OEM modem labeled as "Fibocom L850-GL":

  ID 8087:095a Intel Corp. MODEM + 2 CDC-ACM + 3 CDC-NCM + SS

XMM-based modem, detected fine by the plugin:

  [ttyACM2/at] <-- 'AT'
  [ttyACM2/at] <-- '<CR><CR><LF>OK<CR><LF>'
  [ttyACM2/probe] port is AT-capable
  [ttyACM2/probe] probe step: XMM
  [ttyACM0/at] <-- '<CR><LF>OK<CR><LF>'
  [ttyACM0/probe] port is AT-capable
  [ttyACM0/probe] probe step: XMM
  [ttyACM2/at] --> 'AT+XACT=?<CR>'
  [ttyACM0/at] --> 'AT+XACT=?<CR>'
  [ttyACM2/at] <-- 'AT+XACT=?'
  [ttyACM2/at] <-- '<CR><CR><LF>+XACT: (0-6),(0-2),0,1,2,4,5,8,101,102,103,104,105,107,108,112,113,117,118,119,120,126,128,129,130,141,166<CR><LF><CR><LF>OK<CR><LF>'
  [ttyACM2/probe] modem is XMM-based
  [ttyACM0/at] <-- '<CR><LF>+XACT: (0-6),(0-2),0,1,2,4,5,8,101,102,103,104,105,107,108,112,113,117,118,119,120,126,128,129,130,141,166<CR><LF><CR><LF>OK<CR><LF>'
  [ttyACM0/probe] modem is XMM-based
  [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3] creating modem with plugin 'fibocom' and '6' ports (8087:095a)
  [plugin/fibocom] (fibocom) XMM-based Fibocom modem found...

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
2025-09-19 09:46:52 -05:00
Florian Eckert 1a9602ab6a cinterion: ignore carrier revision
MV31 MBIM modem firmware revisions are not matched with carrier configs.
Different VoLTE profiles might be selected by the user causing
the carrier config revision to change.

Since fwupd uses this string for firmware updates, it gets confused and
thinks the user has an update available.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-07-30 12:41:22 -05:00
Florian Eckert 5d4b0d3516 cinterion: add hardware revision read via AT for MV31 and MV32
Reading the hardware revision via the mbim interface returns an incorrect
hardware revision string. The output is always set to
'h/w revision: Thales Snapdragon X55'

  Hardware |            manufacturer: Cinterion
...
           |            h/w revision: Thales Snapdragon X55

This is an incorrect value returned by the MBIM interface. The MV31 and MV32
does have a dedicated AT Command to get the correct hardware revision
via 'AT+SKUID'. If the hardware revision is read via the AT command, the
output looks as follows.

  Hardware |            manufacturer: Cinterion
...
           |            h/w revision: V065

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-07-30 12:41:22 -05:00
Florian Eckert a107de32a8 cinterion: add revision read via AT for the MV31 and MV32
Reading the revsion via the mbim interface returns an incorrect firmware
revsion string. This contains a '\n' character so that the revision looks
like this in 'mmcli'.

Hardware  |            manufacturer: Cinterion
          |            model: Cinterion PID 0x00F1 USB Mobile Broadband
          |            firmware revision: FDE.F0.3.0.1.1.DT.005
          |            062
          |            carrier config: DT

The correct string without '\n' is returned via the AT interface. To fix
the error, the 'mbim' revision interface is overwritten with an AT call
if a MV31 or a MV32 is detected. So we get the correct output via 'mmcli'.

Hardware  |            manufacturer: Cinterion
          |            model: Cinterion PID 0x00F1 USB Mobile Broadband
          |            firmware revision: FDE.F0.3.0.1.1.DT.005.062
          |            carrier config: DT

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-07-30 12:41:22 -05:00
Florian Eckert ebebce6111 cinterion: add MV31 to the rules file
Add the missing udev rules for the MV31 from 'Telit' which uses the
cinterion plugin.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-07-30 12:41:22 -05:00
Florian Eckert f4a1c0fcec cinterion: add MV32 to the rules file
Add the missing udev rules for the MV32 from 'Telit' which uses the
cinterion plugin.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-07-30 12:41:22 -05:00
Vanillan Wang 91adec212d plugin,mtk: remove the relevant log prints of the device model.
Rolling devices use mtk plugin, but there are some "FM350" log prints,
which is not appropriate.

Signed-off-by: Vanillan Wang <vanillanwang@163.com>
2025-07-04 12:15:29 -05:00
Kirill Buksha e8d781ae0b cinterion: allow missing LTE-TDD bands in SCFG response
Some modems (at least ELS62-E) doesn't support TDD LTE bands and their SCFG
responses doesn't contain LTE-TDD bands.

Signed-off-by: Kirill Buksha <kirbuk200@gmail.com>
2025-06-25 07:55:40 -05:00
Aleksander Morgado a24b60e52e fibocom: setup several +SIM URCs as hotplug event indications
Treat the following URCs as indications of possible SIM hot swap
events:
  +SIM: Inserted
  +SIM: Removed
  +SIM DROP

Any time any of these is received, a SIM hot swap event is reported,
and the logic can then determine what to do. These should lead to
doing nothing if they happen as part of a controlled SIM slot switch.

Signed-off-by: Aleksander Morgado <aleksandermj@google.com>
2025-06-18 22:10:54 +00:00
Maciej S. Szmigiero 0d29f6dfa5 intel: XMM7360: Allow re-trying the first RPC init command command once
It seems that the very first XMM7360 RPC init command often times out after
resuming the laptop from s2idle for unknown reasons.
This makes the modem unusable in such situation until the next sleep/resume
cycle.

Re-trying this RPC command allows the modem to initialize normally.

It's possible that this is a kernel iosm driver or modem firmware issue
but considering that the kernel driver seems orphaned by Intel and one
can't really expect much firmware support for this modem either let's do
the easiest thing and simply allow retrying (once) the very first RPC init
command if it fails or times out.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2025-06-14 16:02:23 -05:00
Maciej S. Szmigiero 4c319181e2 shared-xmm: Properly stop GPS if it was running on modem init
With the recent addition of serial port scheduler it often happens that
NMEA traces are mistaken for command responses at init time if GPS was left
enabled in the modem.

For this reason, the proper NMEA packet parser needs to be enabled early
at modem init before the code ensures that GPS is stopped (if it is not
supposed to be running of course).

Since this modem disables GPS asynchronously with processing of the
+XLSRSTOP AT command the full GPS stop machinery has be used to reliably
achieve that GPS engine stop.

It's also important to flush the existing serial port data after attaching
the NMEA packet parser but before issuing that stop AT command, otherwise
command processor for the stop command can also be confused by the existing
queued data.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2025-06-14 16:02:23 -05:00
Maciej S. Szmigiero 0787d04a39 intel: XMM7360: Better NMEA packets parsing
XMM7360 modem NMEA trace packets are wrapped to look like AT command
responses (with "<CR><LF><CR><LF>OK<CR><LF>" at the end).
This wrapping causes problems if a genuine AT command was just sent and
ModemManager is expecting a similarly formatted response to it.

In such case the NMEA trace packet is taken as the response to the AT
command, which usually causes the command to fail due to response parsing
failure.

Fix this by implementing a custom NMEA trace packets parser for these
modems.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2025-06-14 16:02:23 -05:00
Maciej S. Szmigiero 6c4b90de79 intel: XMM7360: Print raw serial port data when it is actually sent/dispatched
With serial port interlocking just queuing serial port data does not mean
it will be immediately sent - the other serial port could be still busy.

For debugging serial port issues it is often necessary to see the exact
moment the data was sent or received.

Implement debug_log method for MMPortSerialXmmrpcXmm7360 and log raw serial
port data there (just as MMPortSerialAt does) instead of doing this in the
command queuing function.
The debug_log method is called by MMPortSerial base when the data is about
to be actually sent to the serial port.

Additionally, log command response body where it is actually returned to
higher layers rather than in the unsolicited response handler.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2025-06-14 16:02:23 -05:00
Maciej S. Szmigiero 912e857831 shared-xmm: keep GPS port open if GPS is enabled
We need to keep GPS port open if would not be kept open otherwise (like
it is the case with a locked/non-enabled modem).

Otherwise:
* While GPS can be enabled in that modem state the traces don't reach MM
API consumers since nothing is servicing the serial port.

* Once modem actually gets enabled the queued GPS output in the modem
serial port floods the main port and often confuses the init sequence.

We also have to make sure that we don't stop GPS during the init sequence
if it is supposed to be running, otherwise there will be the same
issue as commit d3a2aebf16 ("mbm: don't stop GPS interface on
reinitialization if it should be running") fixed for mbm.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2025-06-14 16:02:23 -05:00
Maciej S. Szmigiero a83a9bf437 intel: XMM7360: Re-enable location interface
Seems to work just fine once the port interlocking is being done
and some other fixes are made in the next commit.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2025-06-14 16:02:23 -05:00
Maciej S. Szmigiero 5059b812fc intel: XMM7360: RPC and AT port interlocking
We have to avoid sending RPC and AT commands at the same time (even thought
they are sent via different serial ports) since apparently this modems does
not like it.

It also looks like this modem does not like to receive a RPC command soon
after an AT one, since such RPC commands sometimes fail to generate any
response.

Prevent this problem by delaying a RPC command if there was an AT command
completed recently.

The sufficient time gap was determined experimentally, but 300 ms seems to
be enough.

RPC commands are relatively rare so this should not be a performance issue.
Otherwise we often never get any response to RPC calls if AT command
happens to be sent at the same time.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2025-06-14 16:02:23 -05:00
Maciej S. Szmigiero df9f2d0de5 intel: XMM7360: Make compatible with recent binding changes
Commit ec5104c9a8 ("Move log parent and connection property binding
to helper") made it obligatory for MM_TYPE_BASE_BEARER and MM_TYPE_BASE_SIM
derived classes to specify MM_BIND_TO property, but recently merged XMM7360
support wasn't converted before being merged.

This caused XMM7360 to fail to set-up SIM D-Bus object and mmcli to throw
assertions when trying to access that non-existing SIM object.

Add the missing XMM7360 MM_BIND_TO properties.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2025-06-14 16:02:23 -05:00
Dan Williams ad23d5f22c simtech: report call audio properties if audio settings are supported
Suggested by David Timber.

Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/996

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-06-14 15:39:43 -05:00
Guido Günther 061bc1ff2d intel: Use correct format specifier
The arguments are `gsize` and otherwise emit warnings on e.g. i386

Fixes 4cae04064 ("intel: implement support for RPC-powered xmm7360")

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-06-14 15:27:08 -05:00
Slark Xiao 41f82a4d33 dell: update the foxconn mbim interface
Keep the mm_broadband_modem_mbim_foxconn_new() align with the
new changes in src/plugins/foxconn.

Signed-off-by: Slark Xiao <slark_xiao@163.com>
2025-06-14 15:23:33 -05:00
Slark Xiao bf5458acdd foxconn: add subsystem ID support for T99W696
T99W696 is the first Foxconn PCIE modem whick uses Qualcomm's VID/
PID. Driver ref: https://lore.kernel.org/mhi/20250528092232.16111-1-slark_xiao@163.com

This changes include 2 parts:
i:  Add device for foxconn plugin
ii: Show SSVID/SSPID for parameter "--firmware-status". This helps
    the fwupd get the right firmware upgrade method.

Signed-off-by: Slark Xiao <slark_xiao@163.com>
2025-06-14 15:23:33 -05:00
Dan Williams 5448a85a2b call: allow setting DTMF tone duration at call creation time
Instead of hard-coding a 500ms DTMF tone duration, let applications
use a specific duration at call setup time.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-30 07:59:58 -05:00
Dan Williams 8392f30388 base-call: split AT-specific call code into MMCallAt
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-30 07:57:50 -05:00
Dan Williams 5c1fcbfe4a mtk-legacy: read IMSI if CPIN response is an error
Some older MTK-based phones (Tecno T528 NEW) reply to +CPIN with
an error but are (obviously) unlocked, otherwise they wouldn't
be able to boot up to the point of talking to a computer. Since
they are actually unlocked they will happily give out the IMSI
even if +CPIN errors.

To work around the +CPIN issue treat the device as unlocked if we
can successfully read the IMSI.

Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/980

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-23 08:31:04 -05:00
Dan Williams 757df26b29 broadband-modem,modem-helpers: move +CPIN response parsing to modem helpers
Unit test it better, plus remove code duplication in various plugins.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-23 08:31:04 -05:00
Dan Williams 24f9309d6e serial-parsers,port-serial-at: move echo removal into serial parser
Mainly because we need somewhere to stash the call end regex, and
it's silly to have a 3rd instance of that in MMPortSerialAt when
we already have one in the serial parsers that MMPortSerialAt
relies on pretty heavily.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-22 08:05:58 -05:00
Daniele Palmas 6a4fdbba42 telit: add ECM bearer for LE910Q1/ELS63-I
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
2025-05-19 08:59:00 -05:00
Daniele Palmas e3acdd8743 broadband-modem-telit: use +COPS to get AcT for LE910Q1/ELS63-I
Use +COPS to retrieve AcT for LE910Q1/ELS63-I since they do not
support #PSNT and +SERVICE.

Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
2025-05-19 08:59:00 -05:00
Daniele Palmas e74a563f87 telit: add port hints for LE910Q1/ELS63-I
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
2025-05-19 08:59:00 -05:00
Thomas Vogt 4cae040645 intel: implement support for RPC-powered xmm7360
Signed-off-by: Thomas Vogt <acc-github@tovotu.de>
2025-05-09 07:31:31 +02:00
Dan Williams ec5104c9a8 Move log parent and connection property binding to helper
Continues removing usage of MMBaseModem in a bunch of files
by splitting out bits of its usage to separate interfaces.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:08:06 -05:00
Dan Williams 0bfb11c62c quectel: decrease low-power/power-on/reset wait times to 15 seconds
AT docs for many (most?) device state a max timeout of 15 seconds.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 19:54:54 -05:00
Dan Williams e05af7442c quectel: ensure power down operation waits for POWERED DOWN URC
AT docs for many (most?) Quectel devices state that QPOWD=1 receives
the OK response very quickly but the caller must wait for the
POWERED DOWN URC to avoid data loss. Do that.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 19:54:54 -05:00
Lukas Voegl 39a74ae6fb fibocom: allow QCDM
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2025-04-25 09:37:17 +02:00
Lukas Voegl 436081648b api,modem: new 'IgnoredPorts' property
Expose a new list of 'IgnoredPorts' via D-Bus and therefore remove the use of `MM_MODEM_PORT_TYPE_IGNORED`

Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2025-04-25 09:37:16 +02:00
Dan Williams 6b6997362b modem-helpers-cinterion: allow spaces in ^SXRAT test response
^SXRAT: (0-6), (0,2,3), (0,2,3)

Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/974

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-13 19:58:30 -05:00
Dan Williams 046b79a676 shared-fibocom: don't assume parent implements the firmware interface
MMBroadbandModemMbimMtkFibocom doesn't, so don't assert it.

Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/975

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-13 13:47:57 +00:00
Dan Williams cc93b11db7 telit: use generic early AT port probe logic
Use the new early port probe logic to do AT probes before the custom
init hook actually starts.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-03-27 18:40:38 -05:00
Dan Williams 7d75a897a8 port-probe: allow per-port ID_MM_TTY_AT_PROBE_TRIES tag for custom number of AT probes
For modems that need more time to respond to AT port probes (like some Telit devices,
and Cinterion-based Telit MV31/MV32) allow a custom number of AT probe tries on a
per-port basis for generic probing, or plugins that opt into this functionality.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-03-27 18:40:38 -05:00
Guido Günther 68933455df treewide: Fix typos
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-11 23:15:57 +01:00
Michał Sułek 3966e1c019 Fixed code formatting 2025-02-24 17:35:47 +01:00
Michał Sułek 602808c0eb Setup variable declared after function call, fixed. 2025-02-24 16:18:55 +00:00
Michał Sułek 60bc733004 Was not compiling due to setup being undefined in call_audio_channel_set 2025-02-24 16:18:55 +00:00
Michał Sułek 9477469db4 Dan Williams changed g_usleep to g_timeout_add 2025-02-24 16:18:55 +00:00
Michał Sułek 31e486d672 Fixed the bug regarding SIM7600 modem family that made USB audio to not turn on.
Added the support for 16kHz sample rate for simtech modems and set it as default if available.
2025-02-24 16:18:55 +00:00
Aleksander Morgado 93da5e0b93 fibocom: add Sahara/Firehose support for NL668-EAU
Signed-off-by: default avatarLukas Voegl <lvoegl@tdt.de>
2025-02-21 14:08:50 +00:00
Lukas Voegl 155893ea38 broadband-modem: generic Firehose and Sahara support
Allows setting the renamed `ID_MM_QUALCOMM_FIREHOSE` and
`ID_MM_QUALCOMM_SAHARA` environment variables for all devices.

Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2025-02-21 14:08:50 +00:00
Sushrut Shree Trivedi 092439369b base-modem: add subsystem device ID property
Subsystem device ID can be used for identifying PCI modems,
so expose the property.

Signed-off-by: Sushrut Shree Trivedi <quic_sushruts@quicinc.com>
2025-02-21 10:39:29 +05:30