The first case, with no error, needs to check that there was no original error.
Currently, if an error occurs and the resulting NwError is parsed correctly, the
case split treats it as a no-error case.
Commit 55e40ea b1ae81a in libmbim ("libmbim-glib: add additional GMM
cause codes to MbimNwError") added one more GMM cause code to
MbimNwError. This patch maps that to MMMobileEquipmentError.
This patch requires libmbim >= 1.9.0
When trying to disconnect bearer, if the modem responds with
MBIM_STATUS_ERROR_CONTEXT_NOT_ACTIVATED, take it to mean that the bearer has
already been disconnected.
Subclasses may need to know which IP families were used for the setup
so they can return the correct IP configuration. We can't just use
the MMBearer default_ip_family becuase that isn't the family that
was actually used during the connection.
Commit b1ae81a in libmim ("libmbim-glib: add additional GMM cause codes
to MbimNwError") added additional GMM cause codes to MbimNwError. This
patch maps some of those MbimNwError to MMMobileEquipmentError.
This patch requires libmbim >= 1.9.0
Update PCO handling code such that it conforms to the latest VZW network
behavior. This includes updating the way we mark a SIM as provisioned.
In the old network, only provisioned SIMs can attach to the network.
Now, unprovisioned SIMs can attach and connect to the network.
Change-Id: Ie454f6fb6d8764161f167e93a4235bb93fbde59a
If a task is marked as defer-until-suggested (e.g. a wwan port) and there was
already a 'best' plugin set in the parent device, use it to complete the
deferred task.
This may happen in e.g. MBIM devices if the WWAN port arrives later than the
already probed /dev/cdc-wdm character device.
A device like this shows up briefly while the Sierra EM7345 is booting:
P: Vendor=8087 ProdID=0716 Rev= 0.00
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
We do have a driver identifying this as an "Infineon Flashloader"
device. It is not a modem in any case, and should be ignored.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
If the initialization of the Modem3gpp / ModemCdma interface fails, the
modem transitions to the FAILED state. But since the Modem interface is
already initialized and exported over DBus, it is possible to invoke the
Enable method on the Modem interface. This patch changes
MMBroadbandModem to report an error if one tries to enable the modem in
the FAILED state instead of raising an assertion.
This patch refines the access technology updates on a MBIM modem by
observing the MBIM_CID_PACKET_SERVICE notifications in addition to the
MBIM_CID_REGISTER_STATE notifications. If a MBIM_CID_PACKET_SERVICE
notification indicates the highest available data class, the current
access technology is updated to reflect that. Otherwise, the access
technology is updated according to the available data classes indicated
by a MBIM_CID_REGISTER_STATE notification.
If the APN was empty (implying that the modem/network should choose
the default APN) this caused an assertion in libqmi. Just don't
set an APN if we aren't given one.
The 3s wait before opening a MBIM port is not necessary for handling a
delayed response to the MBIM OPEN messages. mbim_device_open() already
retries the MBIM OPEN message when the MBIM device does not respond.
We make many USB virtual COM port devices, none of which are modems.
ModemManager's automatic attempts to access those devices can cause
problems.
That might change in the future, so we have left two potential
future product IDs off of the blacklist.
This patch modifies MMBearerMbim to update the MTU value in the bearer
IPv4 and IPv6 config property when such information is available in the
MBIM_CID_IP_CONFIGURATION response.
This patch removes an extra invocation of g_simple_async_result_complete
on the result associated with each command context in the command queue
when mm_port_serial_close clears the queue. It also changes the code to
complete the results in idle, which avoids a nested invocation of
mm_port_serial_close. That could happen if the completion of the result
calls mm_port_serial_close again (e.g. via at_command_context_free,
at_sequence_context_free in mm-base-modem-at.c). The nested invocation
of mm_port_serial_close could create undesirable effects (e.g. the
assertion on open_count > 0 fails in case of a forced close).
Subscriber information like MSISDNs / MDNs may not be readily available
when MMIfaceModem queries for it during modem initialization.
This patch modifies MMBroadbandModemMbim to subscribe to the
MBIM_CID_SUBSCRIBER_READY_STATUS notification and update the
'OwnNumbers' property of the Modem interface when the information
becomes available.
libmbim renames 'MBIM_CID_DEVICE_SERVICE_SUBSCRIBER_LIST' to
'MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST' to be consistent with the MBIM
specification. This patch updates MMBroadbandModemMbim accordingly.
hdr_subsys_state_info_ready() did not implement the GAsyncReadyCallback
function signature, which led to a crash. This patch fixes
hdr_subsys_state_info_ready() to properly extract the QCDM response from
the GAsyncResult object.
A MBIM device typically delays its response to an 'Open' command when it
has not completed the initialization process. This patch increases the
timeout of the MBIM device open operation from 10s to 30s to handle
situations where the device takes much longer to initialize.
By setting the 'RemainingAttempts' field of a MBIM_CID_PIN response to
0xffffffff, a MBIM modem indicates that it does not support the
information on the number of remaining attempts for pin-related
operations. This patch modifies MMBroadbandModemMbim to handle this case
properly, instead of reporting a very large unlock retries count.
The Cinterion PHS8 reports a single AT port to be used as data port, and no
other port as primary. In this case, recover the tty as primary AT port, instead
of failing with an error.
The power off command will transition the device to the OFFLINE state. After
this, the modem will not be able to go online again unless it is power-cycled,
either externally (cut power and re-establish power) or through another
transition to QMI_DMES_OPERATING_MODE_RESET (which ModemManager will not
implement for this case).
There are systems in which the modem power source can be controlled externally,
e.g. to switch it on or off. In these cases, it is sometimes advisable to be
able to tell the modem to cleanly shut off completely before the power is cut.
So, allow transitioning to the OFF power state if the modem supports it, even if
afterwards the modem could be completely unreachable.
Observing registration updates via the MBIM_CID_REGISTER_STATE
notification alone is not always sufficient to detect if the modem is
disconnected from the network. In case of a network-initiated
disconnect, it is possible that the modem is disconnected from the
network but remains registered.
This patch modifies MMBroadbandModemMbim to subscribe to the
MBIM_CID_CONNECT notification. Upon receiving a notification of a
deactivated session ID, the corresponding bearer is reported as
disconnected.