Commit Graph
1658 Commits
Author SHA1 Message Date
Ben Chan 456e1e0d0c huawei: handle optional 0x prefix on hex numbers in ^DHCP response
On Huawei ME936, the hex numbers in the response to AT^DHCP contain the 0x prefix, e.g.

  AT^DHCP?

  ^DHCP: 0xda7d0e0a,0xff000000,0xdb7d0e0a,0xdb7d0e0a,0x01261aac,0x00000000,100000000,50000000

This patch updates mm_huawei_parse_dhcp_response() to handle the
optional 0x prefix.
2018-01-27 12:13:18 -06:00
Ville Skyttä 90b89bb9f4 *: Spelling fixes 2018-01-25 09:52:12 +01:00
Aleksander Morgado d8c7251687 telit: use parent logic to load unlock retries
The generic broadband modem provides a common method to load unlock
retries based on CSIM queries. We modify the Telit plugin to use the
generic method but keeping the CSIM locking/unlocking logic in place.
2018-01-06 18:51:53 +01:00
Aleksander Morgado 30ea91e353 ublox: wait for READY URCs during port probing
The AT control TTYs in the u-blox modems may take some time to be
usable. In order to handle this issue, we configured some longer
timeouts during AT probing, but that may not be always enough.

The u-blox TTYs will report readiness via a "+AT: READY" URC, which
we can use during custom initialization to decide right away that the
port is AT. We use up to 20s as that is close to the worst case seen
during experimentation, happening after the module undergoes a full
NVM reset. If the timeout is reached without receiving the URC, we
still run standard AT probing afterwards. This new logic just tries
to make it sure we don't do any probing before the module is ready to
accept it.

If the module hasn't been hotplugged (i.e. it was already there when
ModemManager started) we do a quick first AT probing and if that fails
we run the "+AT: READY" URC wait as if it was hotplugged.
2018-01-04 10:09:24 +01:00
Colin Helliwell 8f26848ef0 helpers: move generic load_unlock_retries from Telit plugin
As a precursor to a generic load_unlock_retries method, move the
CSIM Response parser from the Telit plugin into the core code.
2018-01-01 18:37:10 +01:00
Eric Caruso c44b928206 mm-iface-modem: add check_for_sim_swap method and enable steps
When in low-power mode, some modems will not dispatch unsolicited
notifications, such as for SIM hot swapping. There is code in
MMBroadbandModemTelit to handle this by checking the SIM identifier
during modem power up against the identifier cached in the SIM
D-Bus object. If they're different, the SIM has likely been
swapped while we were powered down.

We can move this code out to MMBroadbandModem because it doesn't
actually rely on any Telit-specific details, and invoke it from
MMIfaceModem via a new method.
2017-12-18 10:16:18 +01:00
Aleksander Morgado 33583ca4de kerneldevice: allow getting interface class/subclass/protocol 2017-12-05 10:58:29 +01:00
Aleksander Morgado a4271d8433 mbm: port dial_3gpp() and disconnect_3gpp() to GTask
The two connection and disconnection methods are ported to GTask, and
are also updated so that the reception of the unsolicited message
reporting either connect/disconnection is able to right away complete
the pending connection/disconnection attempts, as done in other
plugins like the Icera or HSO ones.
2017-12-05 10:55:41 +01:00
Aleksander Morgado 4c8a3d0015 icera: port dial_3gpp() to GTask 2017-12-05 10:55:41 +01:00
Aleksander Morgado 09d563fd34 hso: make report_connection_status() a separate logical block
This block is a subclassed method from MMBaseBearer, which we just
happen to also use as part of the 3GPP dial logic in the connection
attempt.

So make it a separate logical block, and call the processing of the
connection attempt if one is found.

This change makes it similar to the same logic in the Icera plugin.
2017-12-05 10:55:41 +01:00
Aleksander Morgado b6e3cb463d hso: use a 60s timeout to wait for connection unsolicited messages
Same amount of time as in the Icera plugin.
2017-12-05 10:55:41 +01:00
Aleksander Morgado 90116bf1be hso: port dial_3gpp() to GTask 2017-12-05 10:55:41 +01:00
Aleksander Morgado d5684ff391 quectel: new plugin
For now just creating generic QMI/AT capable modems.
2017-12-05 10:55:24 +01:00
Aleksander Morgado 291300cfcb sierra: enable QMI connection status polling in Netgear AC341U
The Netgear AC341U seems to delay reporting packet service status
indications or actually not even send them. This leaves us with modems
in connected state in ModemManager but actually disconnected. We can
detect this situation by actively polling ourselves the connection
status.

See e.g. this case where the indication is received 2.5 mins after the
first OutOfCall error detected when loading statistics.

    Aug 30 22:52:50 ModemManager[574]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> connected)
    Aug 30 22:52:50 ModemManager[574]: <info>  Simple connect state (8/8): All done
    Aug 30 22:52:50 ModemManager[574]: <warn>  Reloading stats failed: Couldn't get packet statistics: QMI protocol error (15): 'OutOfCall'
    Aug 30 22:53:20 ModemManager[574]: <warn>  Reloading stats failed: Couldn't get packet statistics: QMI protocol error (15): 'OutOfCall'
    Aug 30 22:53:50 ModemManager[574]: <warn>  Reloading stats failed: Couldn't get packet statistics: QMI protocol error (15): 'OutOfCall'
    Aug 30 22:54:20 ModemManager[574]: <warn>  Reloading stats failed: Couldn't get packet statistics: QMI protocol error (15): 'OutOfCall'
    Aug 30 22:56:21 ModemManager[574]: <info>  bearer call end reason (2): 'generic-client-end'
    Aug 30 22:56:21 ModemManager[574]: <info>  bearer verbose call end reason (3,2000): [cm] client-end
    Aug 30 22:56:21 ModemManager[574]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connected -> registered)
2017-11-23 14:20:39 +01:00
Aleksander Morgado 17b8fcfd77 build: minor build rules reordering for the udev rules tester
Move it after all plugin build rules.
2017-11-11 13:39:16 +01:00
Ben Chan 965ff93041 novatel: port load_supported_modes to use GTask 2017-10-22 08:13:42 +02:00
Ben Chan a20686c24c via: port modem_cdma_{setup,cleanup}_unsolicited_events to use GTask 2017-10-20 09:44:56 +02:00
Ben Chan 47cdad55a8 anydata: port get_detailed_registration_state to use GTask 2017-10-20 09:44:56 +02:00
Aleksander Morgado 882f6b04d6 cinterion: port modem_create_bearer to GTask 2017-10-07 14:10:12 +02:00
Aleksander Morgado e9f56ddf15 cinterion: port after_sim_unlock to GTask 2017-10-07 13:58:55 +02:00
Aleksander Morgado b1948f83a5 cinterion: port load_unlock_retries_context to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado e1b2b88e68 cinterion: port setup_flow_control to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado 926e0176fb cinterion: port set_current_bands to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado ea58d35947 cinterion: port load_current_bands to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado c1e17b9cad cinterion: port load_supported_bands to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado 7f2520a83d cinterion: port register_in_network to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado f9e2ebf3a0 cinterion: port modem_power_off to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado 00aa9cd09b cinterion: port modem_power_down to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado 73f748f7ac cinterion: port messaging_check_support to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado d09f9adafe cinterion: port messaging_enable_unsolicited_events to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado 7e478e408d cinterion: port plugin custom_init to GTask 2017-10-07 13:40:30 +02:00
Ben Chan 6e68f4052b nokia: port load_access_technologies to use GTask 2017-10-07 10:56:33 +02:00
Ben Chan d4abf79e99 nokia: port enabling_modem_init to use GTask 2017-10-07 10:56:33 +02:00
Aleksander Morgado 74d8a69b4e iridium: simplify a bit the saved_error logic in connect
Note that saved_error will be freed along with the context, unless
it's set to NULL.
2017-10-07 10:55:16 +02:00
Ben Chan 3c2b974bbd iridium: port connect to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan d0bbc43fa7 iridium: port load_operator_{code,name} to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan 2768df24b4 iridium: port setup_flow_control to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan aee8bcc748 iridium: port load_supported_modes to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan 164ce73847 iridium: port create_bearer to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan 7dc46481c5 pantech: port modem_after_sim_unlock to use GTask 2017-10-07 10:39:47 +02:00
Ben Chan bee3f063b4 anydata: remove unused 'port' field in DetailedRegistrationStateContext
The 'port' field in DetailedRegistrationStateContext is initialized to
NULL but never updated or used.

When detailed_registration_state_context_complete_and_free() calls
g_object_unref() on the NULL 'port' field, an assertion is raised.
2017-10-07 10:02:35 +02:00
Ben Chan 1e47692573 simtech: fix memory leak 2017-10-07 10:01:44 +02:00
Ben Chan 25f37fd613 wavecom: fix memory leak 2017-10-07 10:01:29 +02:00
Ben Chan 6967cbfd55 linktop: port set_current_modes to use GTask 2017-10-06 11:06:49 +02:00
Ben Chan 1e75e7e3d9 linktop: port load_supported_modes to use GTask 2017-10-06 11:06:49 +02:00
Ben Chan fd2bfb7e85 novatel-lte: implement load_unlock_retries
This patch implements load_unlock_retries() for the Novatel LTE modem by
using the AT$NWPINR? command to query the number of retries left for
entering PIN1 or PIN2.

Ported from the original patch by Arman Uguray <armansito@chromium.org>:
https://chromium-review.googlesource.com/c/58118
2017-10-06 10:05:28 +02:00
Aleksander Morgado 01ba79b70b simtech: port 3gpp_{setup|cleanup}_unsolicited_messages to GTask 2017-10-06 10:02:13 +02:00
Aleksander Morgado c04160817a simtech: port 3gpp_enable_unsolicited_events to GTask 2017-10-06 10:02:13 +02:00
Aleksander Morgado e7fbf6fc56 simtech: port 3gpp_disable_unsolicited_events to GTask 2017-10-06 10:02:13 +02:00
Aleksander Morgado df4abdec15 simtech: port load_access_technologies to GTask 2017-10-06 10:02:13 +02:00