Age | Commit message (Collapse) | Author |
|
|
|
We will now use a step-based state machine to handle the connection and
disconnection sequences. All the previous behaviour is kept, except for these
new things:
* Instead of just subclassing the 'dialling' step in the 3GPP connection
sequence, completely subclass the whole 3GPP connection sequence. We do this
because we don't need to preconfigure PDP contexts with AT+CGDCONT before
issuing ^NDISDUP.
* Don't allow IP types other than IPv4. These modems work only with IPv4
bearers.
* Remove cancellation signal handler; not needed as we can check the status of
the cancellation in every 1s timeout.
* Removed the event source id handling for timeouts; timeouts are never
cancelled here.
|
|
Don't assume that all modems exporting a 'net' port will support ^NDISDUP.
|
|
Modems with ECM (e.g. usb0) ports should use AT^NDISDUP in the control port to
request the connection and afterwards just fire up the DHCP client in the net
port.
This patch is originally developed by:
Franko Fang <fangxiaozhi@huawei.com>
And afterwareds reviewed and updated by:
Aleksander Morgado <aleksander@gnu.org>
|
|
Setting access technologies from registration state as part of the
registration checking in the CDMA Interface code fights with
custom implementations in each modem subclass, which causes the
access technologies to ping-pong between more specific (custom
implementation) and less specific (generated from registration state
during registration checking). If the modem class has more
specific access technology knowledge, we should use that and not
override it on the next registration state poll.
So instead, implement the generic access technology update from
registration state in the broadband modem base class'
load_access_technologies() hook. Thus, modem classes with more
specific checking (which override MMBroadbandModem's implementation)
will never fight with generic checking, while modems that don't
(and thus actually need the generic checking) still get some basic
access technology handling.
|
|
For modems that don't implement vendor-specific access technology
checks, try to get the access technology via QCDM if the modem has
a QCDM port.
|
|
We want the SID/NID even when AT Serving System checks are disabled,
otherwise the SID/NID don't get filled at all. QCDM doesn't need the
SID/NID to determine registration, so the values are informational
only and don't affect registration state. But we still want to
export them via the API.
|
|
|
|
|
|
Use AT!STATUS to grab current access technology.
|
|
We'll use it for access technology reporting too.
|
|
We have !STATUS for that, which is much more detailed. Use it.
|
|
Some devices (usually CDMA modems like the Sierra MC5725 and others)
don't prefix their +CSQ replies with +CSQ. So don't require that.
The scanf() should ensure the reply is valid even without the +CSQ.
|
|
Sierra CDMA devices don't always have QCDM ports, or if they do,
they aren't always usable. Try Sierra-proprietary commands for
loading the modem's MDN and fall back to QCDM if that fails.
|
|
mm_get_int_from_str() does not allow anything in the string after the
number, eg "-91 asdfasdf" returns an error. So we have to chop off
anything after the number we're interested in.
|
|
Not many CDMA/EVDO-only modems support CNUM since it's not a
standard IS707/856 AT command, so for those that don't
support it and have a QCDM port, try grabbing the number from
NV memory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We no longer power down the modem during initialization, so remove that
implementation.
|
|
When both load_power_state() and modem_power_down() are not implemented, the
logic will launch the power-up command during (only the first) enabling of the
modem.
In this kind of modems, CFUN is directly related to allowed/preferred modes, so
during the initial power-up we'll just assume we want ANY mode.
|
|
No need to initially power-up the modem.
|
|
No need to initially power-up the modem.
|
|
No need to initially power-up the modem.
|
|
This logic is now implemented by the parent broadband modem object.
Also, implement a custom initial power state loading, so that CDMA-only modems
get marked as 'offline', in order to launch !pcstate=1 to power them up during
the first enabling. The custom initial power state loading will run the parent's
implementation in non-CDMA-only modems.
|
|
This logic is now implemented by the parent broadband modem object.
|
|
|
|
|
|
|
|
Going into/outof low-power state is now a user-requested action.
|
|
|
|
No modems from the Swiss Federal Institute of Technology.
https://bugzilla.gnome.org/show_bug.cgi?id=691384
|
|
Upper layers expect Mobile Equipment errors, so try to translate known QMI
protocol errors.
|
|
The logic to handle the lock information (current lock and unlock retry count)
wasn't handling all possible cases properly, e.g.:
* When PIN is incorrectly entered too many times, a SIM-PUK error may happen.
In this case we need to directly assume SIM-PUK is the current lock (some
modems, like Option HSO ones, would incorrectly reply SIM-PIN if CPIN? asked
just after the SIM-PUK error).
* After every operation acting in SIM locks, we need to update the current
unlock retry count.
This change tries to cover those cases, by:
* The logic to check current lock is extended to also load the unlock retry
count when needed.
* Whenever a SIM-PUK error happens in the SIM operations, we directly assume
that SIM-PUK is required, without re-asking CPIN?.
* The overall logic of lock checking is now handled by a state machine, which
is much easier to understand.
|
|
Even when there is a fatal error during initialization (e.g. missing PIN in a
3GPP modem), we should allow operations on the Firmware interface.
|
|
|
|
RegistrationCheckContext
This patch fixes a crash in periodic_registration_checks_ready() due to
access of an already deallocated RegistrationCheckContext.
Thread 0 *CRASHED* ( SIGSEGV @ 0x00000000 )
0x7fc344d355cd [ModemManager] - mm-iface-modem-cdma.c:1112 periodic_registration_checks_ready
0x7fc3449ea266 [libgio-2.0.so.0.3200.4] - gsimpleasyncresult.c:767 g_simple_async_result_complete
0x7fc3449ea368 [libgio-2.0.so.0.3200.4] - gsimpleasyncresult.c:779 complete_in_idle_cb
0x7fc344851dc4 [libglib-2.0.so.0.3200.4] - gmain.c:2539 g_main_context_dispatch
0x7fc344852147 [libglib-2.0.so.0.3200.4] - gmain.c:3146 g_main_context_iterate
0x7fc3448525a1 [libglib-2.0.so.0.3200.4] - gmain.c:3340 g_main_loop_run
0x7fc344d0f154 [ModemManager] - main.c:158 main
0x7fc34426a474 [libc-2.15.so] - libc-start.c:234 __libc_start_main
0x7fc344d0eb68 [ModemManager] + 0x0001bb68
|
|
|
|
Specially the first time that CFUN=1,0 is issued after the initial power up, we
really need to wait more than 3s for the AT command reply. Otherwise, the modem
won't like it and it will reset itself :-/
|
|
Not only +PACSP0, but also +PACSP1.
|
|
There was a missing step++ when falling down to the next step in the switch(),
which was preventing a proper connection.
|
|
|
|
|
|
|
|
The generic plugin should be a fallback, so when starting to probe the port,
never start with the Generic plugin first.
|
|
Update the default timeout from 3s to 10s.
|