Commit Graph
48 Commits
Author SHA1 Message Date
Aleksander Morgado 4e06e0e67d bearer-cdma: implement bearer connection and disconnection 2012-03-15 14:14:48 +01:00
Aleksander Morgado d1cfdd974c bearer-cdma: when specific RM protocol given to be used, ensure it is supported
If the requested RM protocol is not supported, the CDMA Bearer creation will
fail.
2012-03-15 14:14:48 +01:00
Aleksander Morgado 48d5ac6682 core: use g_list_free_full() when possible 2012-03-15 14:14:46 +01:00
Aleksander Morgado 9efabb8fcb modem-helpers: new CDMA helper parsers 2012-03-15 14:14:45 +01:00
Aleksander Morgado d5e6776a52 modem-helpers: new common regex for CIEV unsolicited messages 2012-03-15 14:14:40 +01:00
Aleksander Morgado 6cce67a451 modem-helpers: MMModemAccessTechnology is flags, not enum 2012-03-15 14:14:36 +01:00
Aleksander Morgado 516b097331 api,enums: renamed MMModemAccessTech' to MMModemAccessTechnology'
This one was the last enum without full name.
2012-03-15 14:14:35 +01:00
Aleksander Morgado b6a3ccd578 modem-helpers: renamed 3GPP registration related helpers with `mm_3gpp' prefix 2012-03-15 14:14:35 +01:00
Aleksander Morgado cadc27ca0e core,libmm-glib: include ony `libmm-common.h'
Don't include one by one all the headers from libmm-common, just include the
global `libmm-common.h' which includes all the others.
2012-03-15 14:14:34 +01:00
Aleksander Morgado 5f4655c574 helpers: implement CGDCONT reply parsing
New method to parse the PDP query reply, and build a list of structs with the
found info.
2012-03-15 14:14:33 +01:00
Aleksander Morgado 3dcdc3c920 modem-helpers: new helper to count number of bits set in a bitmask 2012-03-15 14:14:32 +01:00
Aleksander Morgado a92e9c59c1 modem-helpers: provide list of scanned networks in a list of structs
We provide the result of the +COPS=? parsing in a GList of MM3gppNetworkInfo
structures. We avoid the previous hash table, or using a dictionary, as a
list of structs with a predefined set of elements, which should be easier for
plugins wanting to make their own version
2012-03-15 14:14:30 +01:00
Aleksander Morgado 0c7281b2d9 broadband-modem: implement Operator Code and Name loading 2012-03-15 14:14:30 +01:00
Aleksander Morgado 5805a931e6 modem-helpers: use MMModemAccessTech when parsing C(G)REG responses 2012-03-15 14:14:29 +01:00
Aleksander Morgado 430878c452 modem-helpers: use MMModem3gppRegistrationState when parsing C(G)REG responses 2012-03-15 14:14:29 +01:00
Aleksander Morgado c58db4e015 core: start using our newly defined errors 2012-03-15 14:14:25 +01:00
Aleksander Morgado bc118aa160 modem-helpers: plug memleak
g_match_info_fetch() returns always a heap-allocated string which should be
freed by the caller.
2012-02-29 16:51:50 +01:00
Aleksander Morgado 26d69ca0f2 gsm: allow leading zeroes in numbers in CREG/CGREG responses 2012-02-17 13:25:02 +01:00
Aleksander Morgado a2b578d755 modem-helpers: plug a leak when parsing CREG responses 2011-12-30 19:34:39 +01:00
Aleksander Morgado d38787c460 modem-helpers: plug a leak when building device ID 2011-12-30 19:34:21 +01:00
Nathan Williams c1e64f1a33 gsm: improve scan response regex construction error handling
Change the error handling to be a bit more like what appears to have
been intended: if constructing the regex fails, report an error and
return. The existing code looked like it was set up to do this, but
wasn't quite wired together, and had process-terminating calls
(g_error()) followed by other code.

Change-Id: I4a7cee8fe01291976edc2e343fcbeb73e882f20b
2011-12-02 13:06:44 -06:00
Eric Shienbrood eede5bb621 gsm: add new property to track which facility locks are enabled
The property EnabledFacilityLocks on the .Modem.Gsm.Card interface
is a bit mask that indicates which of the various personalization
codes from 3GPP TS 22.022, plus the SIM PIN lock and SIM PIN2 lock,
are enabled. The set of facility locks supported by the modem is
determined at the time the modem is initialized, and the state of
each supported lock (enabled or disabled) is determined. When the
state of a lock changes, a property-change signal is sent out. Note
that ModemManager only supports enabling and disabling SIM-PIN, via
the EnablePin method on Modem.Gsm.Card.
2011-11-16 23:41:49 -06:00
Dan Williams 889ae2fb4b gsm: fix parsing of unsolicited CREG/CGREG response with RAC 2011-10-27 16:38:11 -05:00
Dan Williams ccad4aaa9d gsm: add regex for unsolicited CREG/CGREG response with RAC 2011-10-27 15:13:30 -05:00
Nathan Williams 8710820156 core: ensure that GMatchInfo and GRegex objects are freed properly
In particular, g_regex_match() and g_regex_match_full() allocate a
match_info structure on both success and failure, so calling
g_match_info_free() only in the success case is insufficient.

BUG=None
TEST=Inspection

Change-Id: Iea76b5b5dc3ec48120e15601a5e2dd45322133d8
2011-09-27 13:40:39 -05:00
Dan Williams 0c4b94458a gsm: fix for parsing malformed Gobi CREG response
From an HP un2400;

GMR: D1020-SUUAASFA-4352  1  [Apr 14 2008 18:00:00]
GMM: 88
2011-03-11 21:36:55 -06:00
Dan Williams 16039244bb core: rework logging
Make it more flexible, add logging to a file, and absolute and
relative timestamps.
2011-01-23 20:51:48 -06:00
Michał Sroczyński f4d4569cdd gsm: correctly parse Samsung S8500 Wave CREG response
(testcases by dcbw)
2011-01-11 13:42:54 -06:00
Dan Williams a502fd2b19 gsm: add access technology support for HSPA+ 2011-01-01 11:55:41 -06:00
Dan Williams ea0797cbec gsm: prefer AT+CIND signal quality for modems that support it (lp:682282) (bgo #636040)
Some devices always reply with 99 for AT+CSQ when in UMTS mode (Linktop LW273)
so if the modem supports it, use CIND/CIEV instead.
2010-11-30 10:04:46 -06:00
Dan Williams 6d37c9b471 core: +CIND indexes start at 1 2010-11-28 21:46:27 -06:00
Dan Williams 2dd59c3ddd core: add index to CIND helper 2010-11-28 21:34:00 -06:00
Dan Williams 9479c04aec core: add +CIND parsing helpers 2010-11-28 19:45:53 -06:00
Dan Williams 7ae8ffe21b core: use hardware IDs as part of DeviceIdentifier
Pass the device's hardware IDs through modem creation and use them
when calculating the device's identifier.  Add a bunch of testcases
for real hardware to ensure we don't break the device ID in the
future unless we really want to.
2010-10-22 11:06:48 -05:00
Dan Williams 328d2369a9 core: add DeviceIdentifier property
This is computed before any PIN is entered, and thus before we can
usually get IMEI or MEID/ESN out of the device in many cases. It's
therefore not the same as EquipmentIdentifier.

This is intended to be used by UI programs for matching devices with
PIN numbers for automatic unlocking.  While the PIN number is actually
*SIM* specific, no modems allow access to the IMSI before the PIN is
entered, and thus we cannot actually match the PIN with the SIM.  The
device ID is the next best thing we can use and should allow auto
unlocking in most cases.
2010-10-21 16:57:37 -05:00
Dan Williams 9cbd68e96c cdma: return numeric ERI too 2010-05-18 13:04:43 -07:00
Dan Williams 533ffaddc4 cdma: make ERI parsing generic 2010-05-18 12:24:42 -07:00
Dan Williams 5769929668 helpers: add generic helper for string -> access technology 2010-05-01 22:41:33 -07:00
Dan Williams 0d381e2f11 gsm: fix CSCS=? parsing and add testcases
Some devices (at least one Blackberry we know about) don't include
the () around the response.  Handle that and add testcases for it.
2010-04-09 13:50:45 -07:00
Dan Williams 7fbe4d8383 cdma: check SPSERVICE and SPERI when getting registration state 2010-03-22 00:28:21 -07:00
Dan Williams 3b32e2a679 cdma: check for +SPSERVICE and $SPERI
Which are Sprint-specific commands which appear to be implemented by
various phones for getting access technology and roaming status.
2010-03-21 17:50:45 -07:00
Dan Williams 4558df894b helpers: add generic response stripping function 2010-03-19 10:57:01 -07:00
Dan Williams 46ec3bdb47 gsm: fix CREG/CGREG parsing with multiple responses
When a modem sends both CREG and CGREG in the same response packet,
the parser was failing to correctly distinguish which response
was being parsed, since the string passed to g_regex_match() is
the whole response including both CREG + CGREG.
2010-03-09 23:34:19 -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 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