Files
ModemManager/plugins
Alexander Yashin f95fb11b93 ublox: add support to SIM hot swap
Main thing that's required to get modem hot-swapping to work is the
UDCONF=50,1 command(see u-blox AT-command manual). But there are a lot
of u-blox modules which do not support this command. So in this patch,
it's supposed that this thing is configured beforehand(Like the UUSBCONF
functioning mode) for modules, where SIM hot-swaping feature is
possible. For the modems where it's not, the patch will not have any effects.

----

For ublox modems, CIEV: 12(X) messages allow to know if
SIM is (un)plugged. The values are encoded as:
    - 0: no SIM detected
    - 1: SIM detected

It's required from a modem to generate these events about the SIM
detection state.

To set up these `CIEV: 12,(X)` URC events the `+CMER=1,0,0,1,0` command
is used. That command is supported by almost all u-blox modems except
SARA-G300/SARA-G310/LEON-G1(For these models the hot-swap feature will
not work).

As this 12 that is used in CIEV may be completely different in other
modules, the test command parsing is quite important to get that index
number. So, this logic is also added in cind_simind_format_check_ready
function.

----

It seems that it's necessary to issue this `+CMER` set up there despite
that the `+CMER` configuration will take place later in the 3GPP
interface enabling sequence. Because without it simind indications
will not be enabled at all.
CMER configuration may be later overwritten by 3GPP interface enabling
sequence, but in the worst-case scenario only hot-swap feature will not
work.
2021-12-13 13:20:39 +03:00
..
2021-12-13 13:20:39 +03:00
2020-09-28 08:22:35 +00:00
2021-09-07 10:55:43 +00:00

The following list shows the relationship among the different plugins provided
by default by ModemManager. For each of the plugin types, the list of modem
objects created by the plugin is given.

 * Altair:
   ** MMBroadbandModemAltairLte

 * Anydata:
   ** MMBroadbandModemQmi               (generic)
   ** MMBroadbandModemAnydata

 * Cinterion:
   ** MMBroadbandModemQmiCinterion
   ** MMBroadbandModemCinterion

 * Dell:
   ** MMBroadbandModemQmi               (generic)
   ** MMBroadbandModemFoxconnT77w968    (from the Foxconn utils)
   ** MMBroadbandModemMbimXmm           (from the XMM utils)
   ** MMBroadbandModemMbim              (generic)
   ** MMBroadbandModemNovatel           (from the Novatel utils)
   ** MMBroadbandModemSierra            (from the Sierra Legacy utils)
   ** MMBroadbandModemTelit             (from the Telit utils)
   ** MMBroadbandModemXmm               (from the XMM utils)
   ** MMBroadbandModem                  (generic)

 * D-Link:
   ** MMBroadbandModemQmi               (generic)
   ** MMBroadbandModem                  (generic)

 * Fibocom:
   ** MMBroadbandModemMbimXmm           (from the XMM utils)
   ** MMBroadbandModemMbim              (generic)
   ** MMBroadbandModemXmm               (from the XMM utils)
   ** MMBroadbandModem                  (generic)

 * Foxconn:
   ** MMBroadbandModemQmi               (generic)
   ** MMBroadbandModemFoxconnT77w968
   ** MMBroadbandModemMbim              (generic)
   ** MMBroadbandModem                  (generic)

 * Generic:
   ** MMBroadbandModemQmi               (generic)
   ** MMBroadbandModemMbim              (generic)
   ** MMBroadbandModem                  (generic)

 * Gosuncn:
   ** MMBroadbandModemQmi               (generic)
   ** MMBroadbandModemMbim              (generic)
   ** MMBroadbandModem                  (generic)

 * Haier:
   ** MMBroadbandModem                  (generic)

 * Huawei:
   ** MMBroadbandModemQmi               (generic)
   ** MMBroadbandModemMbim              (generic)
   ** MMBroadbandModemHuawei

 * Icera (no explicit plugin):
   ** MMBroadbandModemIcera

 * Iridium:
   ** MMBroadbandModemIridium

 * Linktop:
   ** MMBroadbandModemLinktop

 * Longcheer:
   ** MMBroadbandModemLongcheer

 * MBM:
   ** MMBroadbandModemMbim              (generic)
   ** MMBroadbandModemMbm

 * Motorola:
   ** MMBroadbandModemMotorola

 * Mtk:
   ** MMBroadbandModemMtk

 * Nokia:
   ** MMBroadbandModemNokia

 * Nokia Icera:
   ** MMBroadbandModemIcera             (from the Icera utils)

 * Novatel:
   ** MMBroadbandModemQmi               (generic)
   ** MMBroadbandModemNovatel

 * Novatel LTE:
   ** MMBroadbandModemNovatelLte

 * Option:
   ** MMBroadbandModemOption

 * Option HSO:
   ** MMBroadbandModemHso

 * Pantech:
   ** MMBroadbandModemQmi               (generic)
   ** MMBroadbandModemPantech

 * Quectel:
   ** MMBroadbandModemQmiQuectel
   ** MMBroadbandModemQuectel

 * Samsung:
   ** MMBroadbandModemSamsung           (subclassed from the Icera utils)

 * Sierra Legacy:
   ** MMBroadbandModemSierraIcera       (subclassed from the Icera utils)
   ** MMBroadbandModemSierra

 * Sierra:
   ** MMBroadbandModemQmi               (generic)
   ** MMBroadbandModemMbim              (generic)
   ** MMBroadbandModem                  (generic)

 * Simtech:
   ** MMBroadbandModemQmiSimtech
   ** MMBroadbandModemSimtech

 * Telit:
   ** MMBroadbandModemQmi               (generic)
   ** MMBroadbandModemMbimTelit
   ** MMBroadbandModemTelit

 * Thuraya
   ** MMBroadbandModemThuraya

 * TP-Link:
   ** MMBroadbandModemQmi               (generic)
   ** MMBroadbandModem                  (generic)

 * u-blox:
   ** MMBroadbandModemUblox

 * via:
   ** MMBroadbandModemVia

 * wavecom:
   ** MMBroadbandModemWavecom

 * x22x:
   ** MMBroadbandModemQmi               (generic)
   ** MMBroadbandModemX22x

 * XMM (no explicit plugin):
   ** MMBroadbandModemMbimXmm
   ** MMBroadbandModemXmm

 * ZTE
   ** MMBroadbandModemQmi               (generic)
   ** MMBroadbandModemMbim              (generic)
   ** MMBroadbandModemZteIcera          (subclassed from the Icera utils)
   ** MMBroadbandModemZte