Commit Graph

31 Commits

Author SHA1 Message Date
Ting-Yuan Huang
969189d42c plugin-manager: protect mm_plugin_{major,minor}_version
This patch makes declarations bind to definitions within the same module
to prevent the potential ambiguity if referenced directly.

AddressSanitizer think they violated one definition rule, although
those symbols are accessed by address through their modules and do
not depend on the order of the libararies loaded.
2016-05-28 13:59:54 +02:00
Aleksander Morgado
ffde429843 core: use G_SOURCE_REMOVE and G_SOURCE_CONTINUE in GSourceFuncs 2015-12-02 17:07:39 +01:00
Roshan Pius
470b02e8c8 port-probe: Increase AT probe command timeout to 7 seconds for altair.
This patch increases the response timeout for the probe AT commands for
altair modems.

We've been noticing some altair modems taking upto 6 seconds to respond to the
initial probe command after a reset which results in modem-manager
timing out and sending a second probe command. The modem sends a response
after about 6 seconds for the initial probe command which modem-manager
treats as response to second probe command and this results in the
modem-manager and modem going out of sync because the modem's second
probe response is treated as response to the next initialization AT command
sent by modem-manager and so on.

Change-Id: Iad8b0786327b153fd95c8ee4516f352325a42cf7
2015-01-09 21:26:01 +01:00
Aleksander Morgado
3ca267b01f bearer: rename 'MMBearer' to 'MMBaseBearer'
Just so that we don't have same header names in src/ and /libmm-glib.
2014-07-06 16:55:29 +02:00
Thieu Le
0b975f2266 altair-lte: update PCO to handle latest VZW deployment
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
2014-06-09 16:55:12 +02:00
Thieu Le
a038ff172b altair-lte: handle optional quotes around sim refresh
Some firmware version sends quotes around SIMREFRESH, this patch adds support
for those versions.
2014-06-03 10:52:13 +02:00
Thieu Le
cdb334649d altair-lte: fix memory leak in PCO parsing code
This patch fixes memory leaks in PCO parsing code detected by LeakSanitizer.
2014-05-31 18:55:13 +02:00
Ben Chan
c8f62fb4de altair-lte: ignore invalid bands in %BANDCAP / %GETCFG="BAND" responses
Due to a firmware issue, the modem may reply an invalid band value, such
as 0, for the %BANDCAP or %GETCFG="BAND" command. This patch moves
parse_bands_response() to mm-modem-helpers-altair-lte.c, modifies the
function to ignore any invalid band outside the range of E-UTRAN
operating bands, and add unit tests for the function.
2014-05-29 10:06:37 +02:00
Thieu Le
08d8524b17 altair-lte: prevent connect while processing sim refresh
This patch modifies the Altair LTE plugin to fail connect requests while the
modem has detached from the network when processing sim refresh.
2014-05-28 16:01:56 -05:00
Aleksander Morgado
6f235b9948 ports: rename 'MMAtSerialPort' to 'MMPortSerialAt' 2014-02-13 13:40:01 +01:00
Aleksander Morgado
9cde02111b ports: rename 'MMSerialPort' to 'MMPortSerial' 2014-02-13 13:39:51 +01:00
Aleksander Morgado
19b0a7e28f altair-lte: add 'mm' prefix in the exported helper methods 2014-01-18 14:16:59 +01:00
Thieu Le
87f0f808bf altair-lte: set subscription state using PCO
This patch sets the subscription state using Verizon's PCO values.
2014-01-18 14:08:31 +01:00
Ben Chan
6c1c0d5e2b altair-lte: explicitly use primary port for connection/disconnection sequence
The Altair LTE modem only uses its primary AT port for AT commands.
Instead of referencing any existing secondary port, this patch changes
MMBroadbandBearerAltairLte to explicitly use the primary port during the
connection and disconnection sequence.
2014-01-07 08:53:10 +01:00
Ben Chan
496f298832 altair-lte: remove unnecessary MM_BASE_MODEM() casts 2014-01-03 12:30:02 +01:00
Ben Chan
dac652321b altair-lte: refactor code for handling 'data' in DetailedConnectContext 2014-01-03 12:30:00 +01:00
Thieu Le
c21709b32e altair-lte: add SIMREFRESH support
Register for SIMREFRESH event and reload own numbers and reregister
modem with network when this happens.
2013-11-21 10:48:53 +01:00
Prathmesh Prabhu
3d4c143b40 altair-lte: early fail connect/disconnect attempts when out of coverage
A firmware bug in Altair ALT3100 bricks the modem when
 - The modem is out of coverage (Registration state is unknown (CEREG: 4))
 - A disconnect attempt is made using the AT%DPDNACT command.

This patch prevents this situation by failing the connect/disconnect attempts in
the altair plugin when registration state is unknown, without attempting to
connect/disconnect the modem.
2013-11-08 08:48:58 +01:00
Prathmesh Prabhu
09ea458f78 altair-lte: obtain subscription state of SIM from registration failure code
This patch uses the extended error code after a registration failure to
determine if the SIM in the relevant modem is associated with a non-provisioned
account. It uses the standard AT+CEER command, but the implementation is
restricted to the altair plugin.
2013-10-10 08:29:56 +02:00
Aleksander Morgado
d818d9fe06 bearer: consolidate unsolicited connection status reports
Originally developed by:
  Ben Chan <benchan@chromium.org>

This patch replaces mm_bearer_report_disconnection() with a more generic
mm_bearer_report_connection_status(), which allows reporting any
connection status of a bearer. This further allows getting rid of those
custom report_connection_status functions in plugic specific bearer
subclasses.

Note that while plugin-specific implementations can receive multiple
'MMBearerConnectionStatus' values, the generic implementation is only allowed
to receive DISCONNECTED. Plugins need to make sure that they process all the
other status values, and only report DISCONNECTED to the parent when required.

MBM:
  The MBM bearer implementation of report_connection_status() expects either
  CONNECTED or DISCONNECTED. If any of these is received and there is an ongoing
  connection attempt, the corresponding operation will be completed. If there is
  no connection attempt, we will just handle the DISCONNECTED state, calling the
  parent method to notify that the modem got network-disconnected.

Icera:
  The Icera bearer implementation of report_connection_status() expects either
  CONNECTED, CONNECT FAILED or DISCONNECTED. If any of these is received and
  there is an ongoing connection or disconnection attempt, the corresponding
  operation will be completed. If there is no connection or disconnection
  attempt, we will just handle the CONNECT FAILED and DISCONNECTED states,
  calling the parent method (always with DISCONNECTED) to notify that the modem
  got network-disconnected.

Option/HSO:
  The Option/HSO bearer implementation of report_connection_status() expects
  either CONNECTED, CONNECTION FAILED or DISCONNECTED. If any of these is
  received and there is an ongoing connection or disconnection attempt, the
  corresponding operation will be completed. If there is no connection or
  disconnection attempt, we will just handle the CONNECTION FAILED and
  DISCONNECTED states, calling the parent method (always with DISCONNECTED) to
  notify that the modem got network-disconnected.

Huawei:
  The Huawei bearer implementation of report_connection_status() expects either
  CONNECTED or DISCONNECTED. These messages are not used to process pending
  connection or disconnection attempts; so if they are received while one of
  these is on-going, it will just be ignored. CONNECTED reports are also
  ignored, so we will just handle the DISCONNECTED state, calling the parent
  method to notify that the modem got network-disconnected.

Altair-LTE:
  The Altair-LTE bearers will only report DISCONNECTED on network-disconnected
  cases. There is no custom report_connection_status().

Novatel-LTE:
  The Novatel-LTE bearers will only report DISCONNECTED on network-disconnected
  cases. There is no custom report_connection_status().
2013-09-23 08:29:15 +02:00
Ben Chan
1eee8824fd altair-lte: use mm_base_modem_at_command_full{,_finish} correctly
This patch fixes own_enable_unsolicited_events_ready() to use
mm_base_modem_at_command_full_finish(), instead of
mm_base_modem_at_sequence_full_finish(), as the %STATCM=1 command is
issued via mm_base_modem_at_command_full().
2013-09-17 08:57:32 +02:00
Ben Chan
f2fb2fe9fc altair-lte: increase timeout for %APNN, %DPDNACT, and %STATCM 2013-08-26 15:56:39 +02:00
Ben Chan
b83ef8b5e2 altair-lte: increase timeout for +CFUN=4 2013-08-15 13:26:13 -05:00
Ben Chan
48d35ee610 altair-lte: set serial port send delay to 0
With a non-zero send delay, the communication over the ttyACM port of
the modem is not very stable when USB auto-suspend is enabled for the
modem. The send delay is not necessary and thus removed by this patch.

Ori Inbar <ori.inbar@altair-semi.com> reported the issue and suggested
this fix.
2013-07-14 21:03:37 -05:00
Ben Chan
f0490b4fff altair-lte: support load_power_state in MMIfaceModem
Being able to determine the current power state of the modem is
necessary to ensure reliable modem operations.
2013-07-04 07:27:27 +02:00
Ben Chan
989210bfd8 altair-lte: propagate error when load_{supported,current}_bands fails
This patch fixes a potential crash when
MMIfaceModem::load_current_bands_ready() dereferences a NULL GError
pointer, which happens when the altair-lte plugin fails to load the
current bands but does not propagate the error. It also fixes a similar
issue with the plugin fails to load the supported bands, even though
MMIfaceModem::load_supported_bands_ready() checks for a NULL GError
pointer.
2013-06-28 07:35:59 +02:00
Ben Chan
6f3d9e5dac altair-lte: avoid sending ATZ when enabling the modem
This patch prevents an ATZ command, which causes the modem to reboot,
from being sent to the modem when the modem is being enabled.
2013-06-27 09:12:56 +02:00
Aleksander Morgado
b017064a58 altair-lte: minor coding style fixes 2013-04-24 23:06:41 +02:00
ori inbar
ba83bc61d0 altair-lte: Add SIM unlock retries query to the Altair plugin. 2013-04-24 23:05:35 +02:00
Aleksander Morgado
0d20a7c85a altair-lte: minor style changes 2013-04-04 09:48:54 +02:00
ori inbar
84e68cd4cd altair-lte: initial altair lte plugin 2013-04-04 09:39:37 +02:00