Commit Graph

589 Commits

Author SHA1 Message Date
Dan Williams
ce1c72152b mbm: fix memory leak in connection state processing 2010-03-09 21:56:57 -08:00
Dan Williams
82abd5595e mbm: fix memory leak in unsolicited signal strength processing 2010-03-09 21:55:51 -08:00
Dan Williams
59605936d0 mbm: use unsolicited access technology updates 2010-03-09 21:55:19 -08:00
Dan Williams
38514db896 gsm: let generic class handle signal quality caching and updates 2010-03-09 21:31:57 -08:00
Dan Williams
07fc116d5a api: add USSD API proposal
Loosely based on oFono, from Pablo Marti.
2010-03-09 18:11:01 -08:00
Dan Williams
d01a3ae328 cdma: tell the modem we're using XON/XOFF too 2010-03-09 11:47:13 -08:00
Dan Williams
81dc2dde45 serial: default to XON/XOFF flow control
This seems to help with Huawei and ZTE devices which often
appeared to stop responding on either primary or secondary ports
at various times.  We had this problem a long time ago, but it was
fixed then by always picking the right serial port via the USB
interface number (Huawei) or udev rules files (ZTE).  Now that we're
using the second serial port more extensively the problem came
up again, so lets try to fix it for real.
2010-03-09 11:44:25 -08:00
Dan Williams
fbf3efc1e3 gsm: only use CREG responses for authoritative registration state
For now...
2010-03-09 11:43:30 -08:00
Dan Williams
076b5df1bc gsm: fix inifinite in ETSI tech -> MM tech conversion function 2010-03-09 11:29:04 -08:00
Dan Williams
2f925599c0 gsm: fix crash in Simple API's GetStatus handling
Can't schedule the info completion until we're sure all the
requests have completed.  They won't necessarily be completed
in the same order they were issued since some of the data the
requests pull from could be cached and thus we don't have to
wait in the queue to hit up the modem.
2010-03-09 10:20:32 -08:00
Dan Williams
783de3bc10 core: fix SIGTERM before mainloop has started 2010-03-09 09:55:04 -08:00
Dan Williams
8dde6bb8dd core: don't try to remove 0 characters after matching responses 2010-03-08 20:01:42 -08:00
Dan Williams
f3721a5674 Merge remote branch 'origin/master' into qcdm 2010-03-08 20:01:22 -08:00
Dan Williams
9e231c3d4b huawei: attach unsolicited message handlers to the primary port too 2010-03-08 18:06:10 -08:00
Dan Williams
29a67e9d89 huawei: unify GSM device probing
Using the USB product ID to direct certain modems to the generic
driver is wrong since even new modems like the E1550 are 0x1001
after the modeswitch.  Instead, lets assume that most current modes
use the Huawei-specific AT command set.
2010-03-08 18:04:14 -08:00
Dan Williams
cdf9279ee8 api+gsm: split out access technology
As with allowed modes, make things clearer and simpler by giving
access technology it's own values.
2010-03-08 18:02:14 -08:00
Dan Williams
c5a897d0ae api+gsm: clean up AllowedMode values
Instead of trying to stuff everything into the mode bitfield it
turns out it's just easier, clearer, and simpler to use different
values for each of the following:

1) the device's supported access technologies and allowed modes
2) the device's current access technology
3) the device's allowed mode preference

Since none of the AccessTechnology or AllowedMode stuff has hit a
release yet, let's make sure we're doing it the right way early on.
2010-03-08 17:27:56 -08:00
Dan Williams
aeac17a81e gsm: implement allowed mode 2010-03-08 15:13:14 -08:00
Dan Williams
d298885faa gsm: fix GObject property maximums for SupportedModes and SupportedBands
Since the values they carry are bitfields, using the highest value
as the maximum isn't the right thing to do.
2010-03-08 14:50:07 -08:00
Dan Williams
e2c487472e api: s/AllowedModes/AllowedMode in Gsm.Network
Only one mode is going to be stored here so it shouldn't be plural.
2010-03-08 14:34:30 -08:00
Dan Williams
5e2983484e api: make HSPA a standalone network mode again
It's just easier this way.  It makes little sense to allow
selecting mode combinations for anything other than
(HSDPA | HSUPA).  Most radios don't allow fine-grained control
of the different technologies within each 2G or 3G class anyway
thus combinations like (GPRS | UMTS) are pointless since the
device wouldn't be able to use GPRS but not use EDGE.
2010-03-08 14:15:25 -08:00
Dan Williams
343245fc21 gsm: add AccessTechnology property and associated infrastructure
AccessTechnology takes over half of what NetworkMode was supposed to
do, but we'll keep NetworkMode around for a while for compatibility
anyway.  Create async updaters that subclasses can use to update
the access tech when they get unsolicited messages.
2010-03-08 11:40:54 -08:00
Dan Williams
82d7c8342d gsm: fix crash getting initial registration state 2010-03-07 14:46:38 -08:00
Dan Williams
74ed9baefa gsm: add missing 27.007 access technologies 2010-03-07 11:01:08 -08:00
Dan Williams
45fd96132f api: add new AllowedModes and AccessTechnology API
This adds split properties and functions for the allowed modes and the
current access technology used by the device when connected to the
mobile network.
2010-03-07 09:58:30 -08:00
Dan Williams
8fcc5b7fe2 api: more clearly document modes and bands 2010-03-07 09:53:28 -08:00
Dan Williams
e7dd2926a3 api: revert parts of 2d194a5798
MM hadn't implemented it yet, but Wader already implemented an earlier
version that didn't use a bitfield but an enum.  Unfortunately the
network mode stuff doesn't allow for distinguishing between the device's
mode preference and the current access technology.  So deprecate the
current network mode stuff in the API in preparation for improved API.
2010-03-07 09:53:03 -08:00
Dan Williams
ba977cd529 api: readability fixes 2010-03-07 09:52:48 -08:00
Dan Williams
547a9eb9c0 introspection: add missing 27.007 access technologies 2010-03-07 07:35:11 -08:00
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
3232a3f7d6 api: better handling of Location API security issues
Since D-Bus signals cannot by nature be restricted to authenticated
clients (unless using private D-Bus connections) we can handle the
security a bit differently here.  Since the Enable() call can be
authenticated, we'll trust the client to say whether higher
security should be used by disallowing location update signals.  This
does mean the client will have to poll for location updates, but at
least then clients requesting location information can be
authenticated.
2010-03-05 18:17:51 -08:00
Dan Williams
2950f31068 api: clarify some Location API bits 2010-03-05 17:55:48 -08:00
Dan Williams
12a8a63fc1 api: first draft of Location information API
NOT FINAL; need to discuss with Pablo and others and actually implement
it before declaring it final.
2010-03-05 17:52:55 -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
e6e3784c02 hso: remove PIN checking code
This is handled by the generic class before the modem is even exported
over D-Bus.
2010-03-04 20:45:30 -08:00
Dan Williams
6c760464d4 zte: remove PIN checking code
This is handled by the generic class before the modem is even exported
over D-Bus.
2010-03-04 20:43:22 -08:00
Dan Williams
c02835722f novatel: remove PIN checking code
This is handled by the generic class before the modem is even exported
over D-Bus.
2010-03-04 20:37:36 -08:00
Dan Williams
a40d3dbead option: fix power-on delay
Since the modem states patch the delay for power-on wasn't honored
for Option devices.  Fix that using the new power-on-done handler
and also fix the bug where if the modem was removed, the plugin
would crash because it wasn't handling the timeout removal.

Also remove the explicit PIN check since that's now handled by the
generic GSM code before the modem is even exported over DBus.
2010-03-04 20:27:44 -08:00
Dan Williams
d94ca3d310 sierra: fix power-on delay
Since the modem states patch the delay for power-on wasn't honored
for Sierra devices.  Fix that using the new power-on-done handler
and also fix the bug where if the modem was removed, the plugin
would crash because it wasn't handling the timeout removal.

Also remove the explicit PIN check since that's now handled by the
generic GSM code before the modem is even exported over DBus.
2010-03-04 20:09:54 -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
3f7b173932 sierra: fix comment about CFUN=1 delay 2010-03-04 19:40:33 -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
Torgny Johansson
6dd751bf3f mbm: handle E2NAP disconnect notification during connection attempt
If E2NAP:0 is received during a connection attempt the connection
attempt has failed or will fail.  So stop polling for connection
success for another 50 seconds and abort the connection attempt
immediately.  Also moves the E2NAP request call a bit earlier to
ensure that no E2NAP unsolicited messages are lost.
2010-03-04 17:19:28 -08:00
Dan Williams
3b9b7920f5 core: register Modem UnlockRequired property for changed signals too 2010-03-04 10:29:42 -08:00