Commit Graph

67 Commits

Author SHA1 Message Date
Aleksander Morgado
5764d39689 modem-helpers: ERI parser is generic enough, not just for !SPERI 2012-08-23 18:56:22 +02:00
Aleksander Morgado
1ac18a06bb api,dbus: 'ip-type' property now given as a MMBearerIpFamily (u)
Instead of using a predefined set of string values for 'ip-type' in
Modem.CreateBearer() and Simple.Connect(), we'll use an enumeration. The
implementation will then need to convert the requested IP family type to e.g.
the correct PDP type in 3GPP modems.

This change also consolidates the use of enums in dictionary properties when
possible to do so, as with the Rm Protocol.
2012-08-22 09:38:21 +02:00
Dan Williams
90f4a034b2 modem-helpers: recognize 3GPP2 access tech strings too
Various Gobi-based devices (USB551L, probably Gobis too) can report
EVDO and 1X as the current RAT from CNTI so parse that here too.
2012-05-04 17:38:36 -05:00
Nathan Williams
01a17f5c6c helpers: adjust parsing of +CNUM response to permit spaces in the alphanumeric descriptor.
This permits matching a response such as '"Line 1","+19999999999",145',
which previously did not match.

Change-Id: I666af8774507c6c3b3e214b820449542065dd8b4
2012-04-13 23:35:13 +02:00
Aleksander Morgado
46d16d5c99 libmm-common: new common uint/int/str parsers 2012-03-18 17:28:14 +01:00
Aleksander Morgado
1f250585dd modem-helpers: refactor and reorganize sources 2012-03-16 14:53:21 +01:00
Aleksander Morgado
51c28d0f79 modem-helpers: new +CNUM response parser and tests 2012-03-16 14:53:21 +01:00
Aleksander Morgado
75a2b407bd modem-helpers: port facility lock related helpers to use `MMModemFacility' enums 2012-03-16 14:53:18 +01:00
Aleksander Morgado
8b78e037a2 modem-helpers: temporarily disable facility-related helpers 2012-03-16 14:53:17 +01:00
Aleksander Morgado
1359c0a928 modem-helpers: updated the string to access technology converter
We can now return a mask of flags specifying more than one access technology,
and therefore the order is not really important any more, unless for special
cases like looking for substrings of valid expected strings (e.g "HSPA" and
"HSPA+").

Also, add "LTE" in the list of expected strings.
2012-03-16 14:28:14 +01:00
Aleksander Morgado
2a12322a80 modem-helpers: allow leading zeroes in CREG/CGREG responses 2012-03-15 14:15:06 +01:00
Aleksander Morgado
09adad847e modem-helpers: new CPMS format result parser 2012-03-15 14:15:03 +01:00
Aleksander Morgado
61697b0054 modem-helpers: use new common charset converter when parsing operator name/code
This is the port of commit 4af8483ae4 into the
06-api branch.
2012-03-15 14:15:00 +01:00
Aleksander Morgado
3912bf062e modem-helpers: new common CMTI regex getter 2012-03-15 14:15:00 +01:00
Aleksander Morgado
aee2b32a35 modem-helpers: allow strings instead of indexes in CIEV unsolicited events
Some modems will report strings instead of indicator indexes, like:
 +CIEV: roam,1

So allow non-integer indicators.
2012-03-15 14:15:00 +01:00
Aleksander Morgado
18ca53b667 modem-helpers: update the regex for the AT+CIND=? response
Cinterion modems seem to include
   "signal",(0-7,99)

We just get rid of the ',99' part.
2012-03-15 14:15:00 +01:00
Aleksander Morgado
2bb43e0020 modem-helpers: new CMGF format query result parser 2012-03-15 14:14:58 +01:00
Aleksander Morgado
f37a1a2b62 modem-helpers: new method to get common CUSD regex 2012-03-15 14:14:56 +01:00
Aleksander Morgado
7e36f04b37 core: use new enums/flags string getters/builders 2012-03-15 14:14:52 +01:00
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