Commit Graph
240 Commits
Author SHA1 Message Date
Dan Williams 7701478703 gsm: simplify registration state polling code 2010-03-07 07:13:43 -08:00
Dan Williams 201295b65e gsm: use secondary serial port while connected
For registration updates and signal strength.
2010-03-06 10:43:54 -08:00
Dan Williams 54c1d069eb gsm: rework registration handling
First, generically handle registration polling if the device does
not support unsolicited registration.  Second, using the new
creg/cgreg parsing functions from mm-modem-helpers.c, handle
CREG=2 unsolicited registration replies to capture the GSM LAC/CI
for the location information API.

Because of these changes we can simplify the registration polling
during connection as well by using the common registration parsing
code and the cached registration state.
2010-03-06 10:28:11 -08:00
Dan Williams 31fb97919c gsm: fix simple state machine network registration after 407abc65c6
Got the logic wrong in that commit.  Fix it.  Network registration
should always be run since it handles polling for registration
state if needed before continuing.
2010-03-06 00:26:54 -08:00
Dan Williams ad7bbb2f16 gsm: indicate CREG vs. CGREG 2010-03-05 14:08:40 -08:00
Dan Williams e4350152c8 gsm: common CREG/CGREG parsing function and testcases 2010-03-05 11:47:23 -08:00
Dan Williams c915de5512 gsm: add ability for subclasses to handle power-on response
This lets subclasses handle errors when they know the device supports
the power-up command.  Also will let us simplify a number of plugins.
2010-03-04 20:06:17 -08:00
Dan Williams 407abc65c6 gsm: handle PINs better during modem enable and simple state machine
First, short-circuit the Enable process if the device requires a PIN
or PUK since for many devices the enable is going to fail anyway
until the PIN is sent.

Second, send the PIN first during the simple state machine for the
same reason; we need the device unlocked before we want to try
to enable it.  This also reworks the simple state machine to be a
bit clearer and make each state step correspond to the action it's
actually doing instead of being off-by-one visually (but not logically).
2010-03-04 19:30:54 -08:00
Dan Williams 021ca1244e gsm: postpone PIN/PUK success reply until we know updated unlock status
Don't return until we know what the updated lock status is.  Fixes an
issue where callers that send the PIN before the modem is enabled
(remember, some modems can't be enabled until the PIN is entered, so
sometimes we have to send the PIN before it's enabled) would get
the reply too early and get failures from other operations.
2010-03-04 19:01:13 -08:00
Dan Williams 3457adefef gsm: clarify generic GSM subclass API a bit 2010-03-04 17:28:36 -08:00
Dan Williams 3b9b7920f5 core: register Modem UnlockRequired property for changed signals too 2010-03-04 10:29:42 -08:00
Dan Williams a9ef8cb175 policy: split Device into Info and Control
It's useful to let distros and admins set policy differently for device
information (for support, inventory, etc) than for actually controlling
the device like PIN/PUK unlocks.
2010-03-01 09:15:01 -08:00
Dan Williams 9d7cb0ddcf gsm: fix direct registration info requests 2010-02-28 22:11:47 -08:00
Dan Williams 27ede83bd3 trivial: rearrange some code 2010-02-28 21:15:22 -08:00
Dan Williams 28d065c1f1 core: implement optional PolicyKit-based authentication 2010-02-27 12:51:13 -08:00
Dan Williams aed5f3765d core: add missing MMAuthRequest class 2010-02-27 12:51:03 -08:00
Dan Williams 3b6a58145f core: simply authentication request objects 2010-02-27 10:29:34 -08:00
Dan Williams 27ffa6b272 core: authenticate SMS operations 2010-02-27 07:19:37 -08:00
Dan Williams 438a047935 core: add authorization providers and optional PolicyKit support
When the support is complete, use --with-polkit to enable
PolicyKit support.  It's not there yet, but this commit adds an
authorization provider framework which will be extended to allow
hooking into PolicyKit.
2010-02-26 18:01:55 -08:00
Dan Williams d8ea5ea003 gsm: fix initial PIN checking for devices that echo by default
If the modem echoed commands by	default (since we may not have
initialized the modem yet), the echoed command would confuse
the PIN check reply parser.
2010-02-09 23:44:23 -08:00
Dan Williams 95dd4b5be1 gsm: try initial PIN check a few times in case SIM is busy 2010-02-09 22:58:44 -08:00
Dan Williams 7fdacfc89b test: add SE K600i COPS response testcase 2010-02-08 11:45:50 -08:00
Martin Pitt a9918d5942 core: ignore VTs
Even just walking sysfs for driver and parent devices takes
time for ports we know we'll never use, so take a short-cut
and save some startup time.  This reduces the startup
overhead to some 15%.
2010-02-02 10:02:53 -08:00
Dan Williams 469e54c364 gsm: update UnlockRequired status on PIN/PUK entry result 2010-01-31 22:33:38 -08:00
Dan Williams c85e617530 serial: handle string CME error codes too
Some devices won't get to the initialization stage where we send
CMEE=1 (for numeric error codes) before they return some errors,
so handle the string representation of CME error codes too.
2010-01-31 22:32:33 -08:00
Dan Williams 27d1c8f936 errors: rework error conversion
Use the same error structure for parsing numeric and string-based errors.
2010-01-31 21:52:29 -08:00
Dan Williams ba9634ae4f serial: add mm_serial_port_is_open() 2010-01-31 12:04:53 -08:00
Dan Williams 7659208037 core: log when unlock state changes 2010-01-31 12:00:26 -08:00
Dan Williams 42a20ab187 core: whitespace fixup 2010-01-31 11:57:05 -08:00
Norbert Frese 1561436788 core: check modem PIN state before exporting it (bgo #604551)
And set UnlockRequired accordingly.  Large cleanups and rework by
dcbw.
2010-01-31 11:43:52 -08:00
Norbert Frese 3d0f2ecf12 core: add an UnlockRequired property that provides lock status (bgo #604551)
Clients can check the property to determine lock/unlock status and thus
unlock the modem before trying to connect if required.

Bits of the patch by dcbw (see the bug).
2010-01-31 11:06:55 -08:00
Dan Williams ed885b7595 Merge commit 'origin/anydata' 2010-01-19 15:07:03 -08:00
Dan Williams 564d054e8e cdma: increase data call initiation timeout
Some cards (Novatel S720 for example) can take a long time to start
a data call if the device isn't activated on the network or the
signal strength is low.
2010-01-19 14:35:48 -08:00
Dan Williams c6694a06b5 core: fix mm_modem_check_removed() to return errors correctly
Make sure all errors actually get returned, not just removal errors.
2010-01-19 14:23:05 -08:00
Dan Williams f6a09050af cdma: allow plugins to override AT+CSS? during registration checking (rh #547294)
Some modems key the AT+CSS? response off their 1X state, so if the
modem has EVDO service but no 1X service, AT+CSS? will provide incorrect
registration state information and the registration checking will
end too early.  Allow modems that can handle more specific registration
checking to skip the AT+CSS? part.
2010-01-19 13:46:07 -08:00
Dan Williams 28eca600f7 Merge commit 'origin/probe-cpin' 2010-01-19 00:21:10 -08:00
Dan Williams 50ad39b28e core: protect against modem removal in critical callbacks (rh #553953)
There are more places to handle, but these are the most critical.  If
the modem is removed while a command is in-progress, the mm-callback-info
code will set info->modem to NULL.  Make sure we check for that in
callbacks and return a reasonable error.  Previous code would just
blindly forge ahead and die on a null dereference.
2010-01-19 03:18:10 -08:00
Dan Williams 73e10c77d3 cdma: prefer primary port unless it's connected 2010-01-18 23:59:54 -08:00
Dan Williams b1992f903b probe: add note about Onda MT503HS (rh #551376) 2010-01-18 23:22:02 -08:00
Dan Williams 0cc9c1731c probe: add CPIN request during the probing process (bgo #604369)
Some devices (ZTE MF628) respond to everything except CPIN? with
ERROR unless the PIN has been sent.  Since no known CDMA devices
support AT+CPIN, assume that devices that return a CPIN response
are GSM devices.
2010-01-17 17:37:41 -08:00
Dan Williams eeb7807044 test: add Gobi COPS response testcase 2010-01-05 23:24:59 -06:00
Dan Williams d3b5688d43 test: add Nokia 2720 COPS response testcase 2010-01-05 21:54:05 -06:00
Dan Williams 008c7e322d test: add Novatel XU870 and Option GT Ultra Express COPS response testcases 2010-01-05 21:47:40 -06:00
Dan Williams f444533a74 test: add +COPS response testcases for E1550, MF622, and E226 2010-01-05 18:07:29 -06:00
Dan Williams c30f23e02c gsm: add testcase for invalid +COPS response 2010-01-05 15:03:06 -06:00
Dan Williams 3988f53d2e gsm: correctly parse Nokia N80 +COPS response 2010-01-05 14:57:30 -06:00
Dan Williams 216e49f8d8 gsm: split out +COPS response parsing and add testcases 2010-01-05 14:29:19 -06:00
Dan Williams a06b3f20ca serial: prevent "hangs" by limiting EAGAIN retries on serial writes
MM would appear to hang sometimes when writing to serial devices but
in reality was just retrying the write too many times.  Make the
retry limit time-based so MM doesn't hang but times the attempt out
instead.
2010-01-01 20:52:15 -06:00
Dan Williams 5eed83cd75 gsm: ensure registration state is reset when disabling the modem 2009-12-23 02:19:26 -08:00
Dan Williams b94627572f core: implement a PropertiesChanged signal for the MMModem class
At the moment only the Enabled property is exported.
2009-12-22 16:58:23 -08:00