aboutsummaryrefslogtreecommitdiff
path: root/src/tests/test-modem-helpers.c
AgeCommit message (Collapse)Author
2013-09-10core: add helper for parsing and validating the ICCIDDan Williams
2013-08-06modem-helpers: fix parsing of CREG/CGREG/CEREG responsesBen Chan
The format of CREG/CGREG/CEREG responses is not very precisely defined in or strictly enforced by the 3GPP specifications. That leads to the fact that some modems put leading zeros in integer type fields (e.g. <n>, <stat>, <AcT>), and not all modems put double quotes around string type fields (e.g. <lac>, <ci>) in those C*REG responses. For example, 0001 can be a valid value for both <stat> and <lac>. The original C*REG parsing code in ModemManager could potentially interpret '+CREG: <stat>,<lac>,<ci>,<AcT>' as '+CREG: <n>,<stat>,<lac>,<ci>'. This patch addresses this issue by refining the regular expressions returned by mm_3gpp_creg_regex_get() with the following assumptions: 1. If a modem puts leading zeros in integer type fields, it puts double quotes around string type fields. 2. If a modem omits double quotes around string type fields, it does not put leading zeros in integer type fields.
2013-06-18tests: avoid printing in stdout by defaultAleksander Morgado
Tests had either their own g_print()s or they would enable a _mm_log() method to get all g_debug()s from the libraries printed. In order to cleanup the result of the tests run, avoid this stdout dumps by default, and only enable them if explicitly enabled in CFLAGS, e.g.: $> ./configure CFLAGS="-DENABLE_TEST_MESSAGE_TRACES"
2013-06-05api,introspection: rename 'ModemCapabilities' to 'SupportedCapabilities'Aleksander Morgado
And also make it a list of masks, specifying which are the specific combinations supported, not just one mask with all. E.g.: ------------------------- Hardware | manufacturer: 'Sierra Wireless, Incorporated' | model: 'MC7710' | revision: 'SWI9200X_03.05.19.04ap r5475 carmd-en-10527 2012/09/17 17:57:14' | supported: 'gsm-umts | gsm-umts, lte' | current: 'gsm-umts, lte' | equipment id: '358178040668164'
2013-06-05api,introspection: 'SupportedModes' is now a list of possible combinationsAleksander Morgado
Instead of just a mask of MMModemMode values, we now provide a list of the allowed and preferred mode combinations supported by the modem. E.g.: $> sudo mmcli -m 0 ------------------------- Modes | supported: 'allowed: 2g; preferred: none | allowed: 3g; preferred: none | allowed: 2g, 3g; preferred: none | allowed: 2g, 3g; preferred: 2g | allowed: 2g, 3g; preferred: 3g | allowed: 4g; preferred: none | allowed: 2g, 3g, 4g; preferred: none'
2013-06-05modem-helpers: new CGDCONT=? test response parserAleksander Morgado
2013-06-05modem-helpers: rename CGDCONT? testsAleksander Morgado
Adding the 'read' suffix, as they are for CGDCONT? read responses.
2013-05-31modem-helpers: handle commas within +COPS response items (bgo #701329)Dan Williams
Modems can probably put whatever they want between the quotes for the operator name, including commas. Handle that. https://bugzilla.gnome.org/show_bug.cgi?id=701329
2013-04-02broadband-modem: update CMGL parsing logicAleksander Morgado
Pantech UMW190 modem uses a custom +CMGL response which includes only three fields before the actual PDU, e.g: +CMGL: <index>,<status>,<something>\r\n<PDU> instead of what we had before: +CMGL: <index>,<status>,<alpha>,<length>\r\n<PDU> The CMGL parsing logic is now updated to use a regex to match the reply, and also considering the UMW190 specific case. Actually, we end up reading only the two first fields (index and status) which are the ones we really need, so we skip the <length> and the <alpha> if given. Added also unit tests to cover all these known cases. Partially fixes https://bugzilla.gnome.org/show_bug.cgi?id=696723 (missing the actual PDU parsing fixes).
2013-03-27broadband-modem: parse +GSN response for IMEI, MEID, and ESN (bgo #696596)Dan Williams
+GSN response differs widely between modems. Some prefix the MEID and/or ESN with 0x, some have leading zeros, some return the MEID and the ESN, and some append the serial number to the end of the IMEI. Handle that and make the ESN, MEID, IMEI, and EquipmentIdentifier parsing consistent.
2013-02-15modem: use +CEREG to determine EPS network registration statusBen Chan
This patch adds the support for solicited/unsolicited EPS network registration status via AT+CEREG, which is configurable via the 'iface-modem-3gpp-eps-network-supported' property of the MMIfaceModem3gpp interface and is disabled by default.
2012-10-25tests: add PDP context reply parser test for Samsung/Icera repliesAleksander Morgado
2012-09-14test: new tester for +CDS unsolicited messagesAleksander Morgado
2012-08-29modem-helpers: new method to validate and/or parse MCC/MNC operator ID stringAleksander Morgado
2012-08-22api,dbus: 'ip-type' property now given as a MMBearerIpFamily (u)Aleksander Morgado
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-03-16modem-helpers: refactor and reorganize sourcesAleksander Morgado
2012-03-16modem-helpers: new +CNUM response parser and testsAleksander Morgado
2012-03-16tests,modem-helpers: cleanup testsAleksander Morgado
Properly order the tests in blocks, and ensure that the common data for registration tests is not passed to other non-registration related tests.
2012-03-16test,modem-helpers: remove conditional compilationAleksander Morgado
We require already GLib 2.30
2012-03-16tests: fix CGDCONT reply test, NULL expected instead of empty stringAleksander Morgado
2012-03-16build: fix header dependenciesAleksander Morgado
We shouldn't depend on any header file from the previous implementation.
2012-03-15modem-helpers: allow leading zeroes in CREG/CGREG responsesAleksander Morgado
2012-03-15test: new tester for CPMS=? resultsAleksander Morgado
2012-03-15api,enums: renamed `MMModemAccessTech' to `MMModemAccessTechnology'Aleksander Morgado
This one was the last enum without full name.
2012-03-15modem-helpers: renamed 3GPP registration related helpers with `mm_3gpp' prefixAleksander Morgado
2012-03-15helpers: implement CGDCONT reply parsingAleksander Morgado
New method to parse the PDP query reply, and build a list of structs with the found info.
2012-03-15modem-helpers: provide list of scanned networks in a list of structsAleksander Morgado
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-15test-modem-helpers: fix C(G)REG parsing testsAleksander Morgado
2012-03-15modem-helpers: use MMModemAccessTech when parsing C(G)REG responsesAleksander Morgado
2012-02-17gsm: allow leading zeroes in numbers in CREG/CGREG responsesAleksander Morgado
2011-10-27gsm: fix parsing of unsolicited CREG/CGREG response with RACDan Williams
2011-10-27gsm: add regex for unsolicited CREG/CGREG response with RACDan Williams
2011-03-11gsm: fix for parsing malformed Gobi CREG responseDan Williams
From an HP un2400; GMR: D1020-SUUAASFA-4352 1 [Apr 14 2008 18:00:00] GMM: 88
2011-01-23core: rework loggingDan Williams
Make it more flexible, add logging to a file, and absolute and relative timestamps.
2011-01-11gsm: correctly parse Samsung S8500 Wave CREG responseMichał Sroczyński
(testcases by dcbw)
2010-12-21test: fix CIND test index checkingDan Williams
CIND indexes returned from helper are 1-based, not 0-based, because that makes it easier to match against the modem's unsolicited CIND message.
2010-11-30gsm: prefer AT+CIND signal quality for modems that support it (lp:682282) ↵Dan Williams
(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-28core: add index to CIND helperDan Williams
2010-11-28core: add +CIND parsing helpersDan Williams
2010-11-03trivial: avoid build warning by using g_message() correctlyDan Williams
2010-10-22trivial: fix formattingDan Williams
2010-10-22core: use hardware IDs as part of DeviceIdentifierDan Williams
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-09-27test: add CGREG repsonse test for X220DDan Williams
To test spaces between some members of the response.
2010-08-09build: fix build with glib >= 2.25.12 (bgo #626421)Vincent Untz
Work around an API break in glib.
2010-05-25test: add a few more CREG/CGREG responsesDan Williams
2010-04-09gsm: fix CSCS=? parsing and add testcasesDan Williams
Some devices (at least one Blackberry we know about) don't include the () around the response. Handle that and add testcases for it.
2010-03-09gsm: fix CREG/CGREG parsing with multiple responsesDan Williams
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-05gsm: indicate CREG vs. CGREGDan Williams
2010-03-05gsm: common CREG/CGREG parsing function and testcasesDan Williams
2010-02-08test: add SE K600i COPS response testcaseDan Williams