Commit Graph

3500 Commits

Author SHA1 Message Date
Dan Williams
46a5c77616 libwmc: rename some test functions 2011-09-19 11:24:43 -05:00
Dan Williams
3dd4cdaf2b libwmc: beginning of bits for WMC-based devices like UML290 2011-09-17 13:27:54 -05:00
Thomas Tuttle
953701a6f8 modem: add firmware interface 2011-09-08 17:20:00 -04:00
Aleksander Morgado
4c514bfd6d gsm/cdma: unsigned integers can't be < 0, so remove unnecessary conditions
It fixes compilation with the llvm/clang compiler as well.
2011-08-30 11:53:05 +02:00
Aleksander Morgado
2a9a6ad79b nokia: use E1 E0 when initializing the modem
Passing E1 and E0 afterwards seems to properly disable the echo in Nokia modems
(N900 and C7 at least)
2011-08-25 22:00:56 -05:00
Torgny Johansson
7348b4c0c8 mbm: add more Ericsson and Dell vid/pids
Add the vid/pid for Ericsson H5321gw/w, F5321gw/w, C5621gw/w, C3304w and Dell DW5560.
2011-08-25 21:51:38 -05:00
Eric Shienbrood
7605ffec59 gsm: pass GSM registration errors up to caller
Register was appearing to succeed even when it failed.
2011-08-21 09:04:08 -05:00
Nathan J. Williams
acc0928315 sms: check for the correct return value from sscanf() in sms_get_done()
Remove an unused variable so it's more obvious what the correct value is.
Fixes live (vs. list) SMS reception on ToT.

BUG=none
TEST=Send SMS to device, see that it shows up in Chrome.

Change-Id: I9c76fb15ef229fe83672e2eee8ae37d7e6ab7b9e
Reviewed-on: http://gerrit.chromium.org/gerrit/3216
Reviewed-by: Nathan J. Williams <njw chromium org>
Tested-by: Nathan J. Williams <njw chromium org>
2011-08-21 08:59:11 -05:00
Aleksander Morgado
531fa05192 api: remove unneeded code from header generator 2011-08-20 00:06:14 +02:00
Aleksander Morgado
ea23851326 api: use common ModemManager.h for API, core and plugins 2011-08-19 22:54:48 +02:00
Aleksander Morgado
c4a8291349 build: ensure common header is built first 2011-08-17 16:21:21 +02:00
Aleksander Morgado
2dee5b0ae0 api: rename common header to ModemManager.h 2011-08-17 16:21:21 +02:00
Aleksander Morgado
e48648e406 api: generate enums instead of defines in common header 2011-08-17 16:21:21 +02:00
Aleksander Morgado
15f77d131a api: add license and header include guards 2011-08-17 16:21:21 +02:00
Aleksander Morgado
6eb32c72da introspection: renamed MM_MODEM_STATE_CHANGED_REASON to MM_MODEM_STATE_REASON 2011-08-17 16:21:21 +02:00
Aleksander Morgado
36dabababd introspection: rename changed reason UNKNOWN to NONE 2011-08-17 16:15:06 +02:00
Aleksander Morgado
914ad628ab introspection: define MM_MODEM_TYPE_UNKNOWN 2011-08-17 16:15:06 +02:00
Aleksander Morgado
7e246f6018 introspection: use state type in StateChanged signal definition 2011-08-17 16:15:06 +02:00
Aleksander Morgado
713c07290f introspection: define type MM_MODEM_STATE 2011-08-17 16:02:57 +02:00
Dan Williams
8799f4da1f core: when probing mark ports as AT capable too
On a ZTE MF626, sometimes the aux port will respond only with
"ERROR" to probing commands (while the SIM is starting up) and
previously we'd lose the port because we were only looking for
valid probe responses.  But if the port returns ERROR or CME ERROR
etc we know it's an AT port and that we can use it once we've
gotten the type response (CDMA or GSM) from the main port.
2011-08-14 16:02:41 -05:00
Dan Williams
8ea17921e7 gsm: check both CS and PS registration state during poll
When connecting, and the modem isn't yet registered or denied, poll
both CS and PS registration state instead of just CS state, because
we're really more interested in PS state anyway.  If at least one
of the CS and PS state checks is successful then proceed with the
connection.
2011-08-14 15:37:38 -05:00
Dan Williams
f683391169 test: allow modem numbers in addition to object paths
If the command-line arg doesn't look like an object path,
treat it as the modem # and make the object path.
2011-08-09 16:49:29 +02:00
Dan Williams
33a97cdb13 core: log when serial port unexpectedly hangs up 2011-08-02 21:57:07 -05:00
Dan Williams
da57b9a0eb sierra: fix possible double-free
Need to reset password to NULL after freeing it.
2011-08-02 21:57:02 -05:00
Dan Williams
eb2d14ab4a core: fix possible double-free
If there was data waiting, the task freed it, but then the port
got closed, and the data callback might have freed the data again.
2011-08-02 21:56:56 -05:00
Dan Williams
804cd7f077 gsm: work around Motorola Android phone modem bugs (bgo #637327)
It seems the Motorola Flipout with Android 2.1 doesn't like to return
configured PDP contexts via AT+CGDCONT?; it returns an error.  It
seems to accept the rest of the dial sequence though, so just ignore
the error when reading existing PDP contexts.
2011-08-02 12:43:26 -05:00
Dan Williams
7985a27321 doc: update README (bgo #652910) 2011-08-02 12:26:23 -05:00
Dan Williams
b9c2180886 core: fix serial port flashing after d3c2228f7b (bgo #650740)
Fix one more possible memory leak (left un-fixed by d3c2228 but not
caused by it) and ensure that modems that do want flashing get it
by default by adding the missing G_PARAM_CONSTRUCT so FLASH_OK
defaults to TRUE.
2011-08-02 11:07:55 -05:00
Dan Williams
26debc1a97 mbm: don't flash serial ports on disconnect (bgo #650740)
The F5521gw resets various port properties like echo when the port
is flashed, which was happening on disconnect.  Since MM had already
turned of echo with ATE0, and the AT parser in-use expected no
echo, this confused MM when the port magically started echoing commands
back.  We don't need flashing on the Ericsson devices because there
will always be a free AT port even if PPP is used for a secondary
PDP context, so we can just skip flashing entirely for these
devices.
2011-08-02 10:47:25 -05:00
Dan Williams
d3c2228f7b core: allow ports to skip flash behavior (bgo #650740)
Flashing is a technique to break out of the data/PPP stream and
re-enter command stream (like +++) and MM uses it in the generic
paths in various cases.  But devices that don't need it (ie, ones
with at least one AT capable port that won't be used for data)
now sometimes appear to have side-effects.

The Ericsson F5521gw firmware R2A07 resets port attributes like
echo and &C and such when the port is flashed, leading to
confusion on the part of MM.  Since the Ericsson devices will
always have at least one free AT port they don't need flashing
anyway.
2011-08-02 10:43:54 -05:00
Dan Williams
18231c9f8d api: refine new API based on suggestions from Eric Shienbrood 2011-08-01 17:47:38 -05:00
Dan Williams
e0eb7038af gsm: allow SIM operations while connected
No point in requiring these to be done from the primary port.
2011-08-01 17:18:08 -05:00
Andrew Bird
2db79a8b54 api: add new LTE constant to the MM_ACCESS_TECHs
The 10.4 version of TS27.007 extends the range of values possible from AT+COPS?
The range of values are as follows:
3GPP TS 27.007 V10.4.0, +COPS
<AcT>: integer type; access technology selected
0       GSM
1       GSM Compact
2       UTRAN
3       GSM w/EGPRS
4       UTRAN w/HSDPA
5       UTRAN w/HSUPA
6       UTRAN w/HSDPA and HSUPA
7       E-UTRAN

All but the LTE (E-UTRAN) value can be represented in MM 0.5, this patch adds a
new constant to correct that, until the MM API is redesigned later for 0.6.

Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>
2011-07-29 16:56:10 -05:00
Dan Williams
b0a2c76907 api: update proposed new SMS API
Finish most of the stuff here.
2011-07-27 21:38:31 -05:00
Dan Williams
30f848e700 cdma: don't blow away generic EVDO reg state if no specific state is available
Generic code (like the QCDM CM/HDR checks) would determine the EVDO
registration state, which would then get blown away by the device-specific
registration state query method.  Modems that have a more specific check
were fine, but generic devices that don't have more specific reg
state checks can simply rely on the generic checks done earlier and
don't need to update the EVDO state from real_query_registration_state().
2011-07-25 13:53:34 -05:00
Dan Williams
f8934c21ce option/hso: check generic access tech first, then specific tech
During the explicit access technology check, the plugin would request
specific 2G (OCTI) and 3G (OWCTI) technologies explicitly.  Some devices
(like Nozomi) don't support the AT_OWCTI command, which leaves us with
only AT_OSSYS for determining whether the device is registered with
the 3G network or the 2G network.  So like the unsolicited mode change
handling code, when requesting access technology explicitly, ask for
generic 2G/3G tech first, and then get the specific tech.  If the
device doesn't support explicit 3G tech then at least we have the
generic 3G tech from OSSYS to use.
2011-07-25 12:58:05 -05:00
Dan Williams
1df8dd7361 option: plugin is supposed to support Nozomi devices too
The Nozomi cards were early CardBus devices that used a direct PCI
interface (instead of the more usual PCI<->USB controller) and the
'nozomi' kernel driver.  They use the same command set as most other
early Option NV modems.  Nozomi was always supposed to be driven
by the option plugin, but apparently that got broken when adding
some of the driver/vendor checks.
2011-07-25 12:57:59 -05:00
Dan Williams
b02dc7f50f core: allow getting the result from the MMCallbackInfo 2011-07-25 12:57:53 -05:00
Nathan Williams
061d410888 sms: calculate user-data bit padding correctly
Fourth and final in a series.

This fixes an off-by-one (septet) error in the calculation of the
amount of data to skip in the presence of a user data header, and adds
the test case from the wild that triggered it.
2011-07-25 01:18:35 -05:00
Nathan Williams
e20173dc47 sms: recognize more text encodings from GSM 03.38
Third in a series. This fixes the bug detected by the dcsf1 test in
the just-added unit tests, by more thoroughly parsing the TP-DCS
field.
2011-07-25 01:18:30 -05:00
Nathan Williams
c717dbd928 sms: add unit tests
Second in a series. Builds on the previous by actually unit-testing
the sms_parse_pdu() function. Note that the dcf1 test does not pass
as the code is currently written.
2011-07-25 01:18:22 -05:00
Nathan Williams
e5faa242e9 sms: split SMS parsing out into a separate file
In preparation for adding tests.

Change-Id: If1ebd0fdd6e7470c21538042ab1735357649155c
2011-07-25 01:18:16 -05:00
Dan Williams
0cc813312f gsm: don't clear operator name or number when at least one of PS or CS is registered
The operator name/number isn't really tied to CS or PS registration, since
we retrieve it using AT+COPS.  But when one of CS or PS became unregistered
the operator name and number would get cleared out.  We only want to clear
it out when *both* CS and PS are unregistered.  Fixes an issue with the
location API where location would not be reported when one of CS or PS
became unregistered, because the location bits want an operator name
before they return the location.
2011-07-25 00:12:13 -05:00
Dan Williams
4267a15b4b tests: fix access tech reporting in scan.py 2011-07-24 23:15:51 -05:00
Guido Günther
a57618b091 zte: skip hex encoding (bgo #652682) 2011-07-21 15:16:44 -05:00
Guido Günther
70715c1c12 huawei: implement ussd encoding/decoding
Huawei wants the USSD as packed GSM.
2011-07-21 15:16:44 -05:00
Guido Günther
b82cec8c7e ussd: Add mm_modem_gsm_ussd_{de,en}code to the MMModemGsmUssd interface
since some some modems need different quirks to encode/decode USSD
messages.
2011-07-21 15:16:44 -05:00
Guido Günther
94e717b854 test: improve ussd.py help message 2011-07-21 15:16:44 -05:00
Guido Günther
26e7b3f8ce trivial: update .gitignore 2011-07-21 15:16:44 -05:00
Dan Williams
ec76518ea3 api: add missing in-progress proposed SMS API 2011-07-21 15:16:44 -05:00