Commit Graph

1018 Commits

Author SHA1 Message Date
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
Dan Williams
3e2b6fb24c cdma: set Rm interface protocol if required (bgo #641661)
Some providers (CDMA Ukraine) apparently require a specific Rm interface
protocol, so add some Simple Connect dict settings for that and use them
when dialing.  Obviously requires the connection manager to also have
support for sending the right bits down to MM.
2011-07-19 15:36:39 -05:00
Dan Williams
85000adfe9 core: add another CnS string to the immediate ignore list
Newer Sierra devices have this (ie 306); it's the CnS port so ignore
it immediately.
2011-07-18 18:31:58 -05:00
Dan Williams
c70d6d565d Revert "cinterion: bail earlier if the plugin doesn't support the port"
This reverts commit 1e1bfbf1d8.

Aleksander says this might break RS232<->USB converter connected
Cinterion modems, so we'll need to handle this issue another way.
2011-07-07 10:28:41 -05:00
Dan Williams
1e1bfbf1d8 cinterion: bail earlier if the plugin doesn't support the port
Caused a crash with the Sierra plugin due to an assertion failure;
the Cinterion plugin shouldn't claim to possibly support ports
it knows it won't support.  In this case, it claimed to support
Sierra modems, so it would try to run probing after Sierra had
done so.  Ideally this should work, but for now just make sure
the Cinterion plugin doesn't claim to support these ports when
it knows it doesn't.
2011-07-06 15:50:08 -05:00
Dan Williams
0f6d1b2b42 nokia: N900 doesn't really need additional inter-character time
See 46d757faa7:

gsm: send init command twice to make the N900 happy (rh #583691) (lp:765516)

for what I think is the real workaround for this bug.
2011-07-06 15:49:46 -05:00
Dan Williams
46d757faa7 gsm: send init command twice to make the N900 happy (rh #583691) (lp:765516)
The N900 has some odd serial characteristics in that it appears to
send pieces of the commands back for whatever reason, until you've sent
a few commands down to it.  Almost like it's training on whatever
you send and needs a bit of input to figure out the characteristics.
Whatever.  Just send the init command twice instead of failing when
the N900 barfs the first time.
2011-07-06 15:49:34 -05:00
Dan Williams
2ca045f178 core: update some serial port settings
1) use cfsetispeed/cfsetospeed like the TTY manpage suggests
2) ignore parity/framing errors since we're not using parity anyway
3) double-check that all our TTY settings were successfully set
2011-07-06 15:49:02 -05:00
Aleksander Morgado
50e9d6fc54 cinterion, wavecom: update copyright info 2011-07-06 09:37:47 +02:00
Dan Williams
077a4004fd gobi: support access technology reporting
Obviously only works while disconnected since the Gobi devices only
provide one AT-compatible tty.
2011-07-05 12:46:44 -05:00
Thomas Grenman
3eaf753c7f gsm: set SMS storage location before enabling notifications
Fixes a firmware hang on Option GlobeTrotter Express (GE0201 with
firmware 1.12.1Hd (Date: Feb 22  2007, Time: 09:20:28)) and makes
sense in general too.
2011-06-30 15:51:53 -05:00
Aleksander Morgado
7762d401e8 Merge remote-tracking branch 'lanedo/power-up-check-needed' 2011-06-30 19:48:23 +02:00
Eric Shienbrood
881f928c40 samsung: add product ID for the Y3400 module.
The Y3400 is functionally nearly identical to the Y3300.
2011-06-30 12:30:43 -05:00
Nathan Williams
1b73fa1541 Add a DBus interface for setting the log level.
Lifted almost entirely from similar code in NetworkManager.

BUG=chromium-os:15197
TEST='dbus-send --print-reply --system --dest=org.freedesktop.ModemManager /org/freedesktop/ModemManager org.freedesktop.ModemManager.SetLogging string:DEBUG'
Also try valid log levels 'ERR', 'WARN', 'INFO', and an invalid log level, such as 'ABCDE'.

Change-Id: I2bddcd0319f4966dd293b119f68e7cc1697949b7
Reviewed-on: http://gerrit.chromium.org/gerrit/3134
Tested-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
2011-06-30 12:25:02 -05:00
Nathan Williams
b7820cf6e1 gsm: handle case of entirely empty SPN correctly
BUG=none
TEST=Insert a SIM with a present but empty (all 0xFF) SPN and check
the system log for a (lack of) assertion errors from mm_charset_gsm_unpacked_to_utf8().

Change-Id: I1250494b9757c9bfdce56402a4471c598f41223f
Reviewed-on: http://gerrit.chromium.org/gerrit/3139
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
2011-06-30 12:23:10 -05:00
Aleksander Morgado
7e69d2cf30 cinterion: always try to use RTS/CTS flow control
Otherwise, power-up after going to standby will not work properly
2011-06-22 16:00:58 +02:00
Aleksander Morgado
39abb023ed serial: new property to enable RTS/CTS flow control 2011-06-22 15:53:37 +02:00
Aleksander Morgado
eae5d6c41b cinterion: enable power-off command to go to sleep/standby mode
AT+CFUN=4 will be used when available to go to standby mode. If not supported,
(as in EGS5) AT+CFUN=7 will be used instead, which enables a CYCLIC SLEEP mode.

Flow control setup was updated to RCS/CTS so that waking up from sleep mode
works properly.
2011-06-22 13:11:39 +02:00
Aleksander Morgado
56db818901 sierra: do not send power-up command if not needed 2011-06-22 13:11:39 +02:00
Aleksander Morgado
34b5635f84 wavecom: enable power-off command to go to sleep/standby mode
AT+CFUN=4 will be used to go to standby mode.
2011-06-22 13:11:38 +02:00
Aleksander Morgado
ab485bd66a wavecom: try to power-up without rebooting
Using AT+CFUN=1,0 so that we request to avoid resetting (<rst>=0). Works
properly when powering up after having put the modem in standby mode with
AT+CFUN=4.

Note that the power-up command will only be sent if the check to see if power-up
is needed requests it.
2011-06-22 13:11:38 +02:00
Aleksander Morgado
255525a5a2 wavecom: do not send power-up command if not needed 2011-06-22 13:11:38 +02:00
Aleksander Morgado
6e9d980e8c gsm: allow plugins to check if they need to issue the power-up command
Some modems only like the power-up command if not already in full functionality
mode. If the power-up is sent while already in full functionality mode, they get
rebooted and reseted.

With this changes, plugins can check whether they need the power-up and ask
the generic gsm code base to skip the command or not.

By default, power-up command (if any given) is never skipped.
2011-06-22 13:08:53 +02:00
Dan Williams
895f0f2ea3 doc: add notes about Pantech UML290 and the WMC protocol
WMC is a proprietary protocol observed on various Verizon devices
and implemented by the UML290.
2011-06-17 16:25:45 -05:00
Dan Williams
51c409d1eb ussd: fix reception, network notifications, and network requests
Because the code was sending the USSD request with a "notify me via
unsolicited result code" tag, the response could come from any port,
and in was coming from other ports on various devices.  But the code
expected the response on the main port, thus it got lost.

So turn the USSD response processing into an unsolicited command handler
instead, which allows us to process the response no matter where it
comes from.  This patch also enables network-initiated USSD
notifications and requests since that's easy to add once the first thing
here is done.
2011-06-15 13:06:37 -05:00
Dan Williams
77fa848820 serial: warn when open/close take longer than 7 seconds
Due to kernel bugs and such.
2011-06-15 12:50:35 -05:00
Aleksander Morgado
884ba2bb09 build: place together samsung plugin compilation options 2011-06-14 12:58:36 +02:00
Aleksander Morgado
abcffd1753 cinterion: check probed caps from supports task 2011-06-14 12:40:36 +02:00
Eric Shienbrood
a35fc3a583 icera: report connected access technology when connected
The NWSTATE field reports both available access technology and the
actual access technology in-use when a PS connection is active, so
report the actual access tech when it's available.
2011-06-13 10:31:35 -05:00
Dan Williams
6657e45a1e core: trivial whitespace cleanup
Tabs -> spaces
2011-06-09 16:53:05 -05:00
Nathan Williams
9f8d42a994 core: handle udev 'change' events
That's what the udev replay gives us these days (as of udev-152).
2011-06-09 16:51:35 -05:00
Eric Shienbrood
509521d180 icera: request specific network error codes on connect errors
For connection failures, get additional error detail. Currently,
the only error codes that are mapped are the 3GPP TS 24.008 codes
for "Unknown or missing access point name" and "Requested service
option not subscribed" (which is sometimes returned for an invalid
APN).

(random fixes and cleanups by dcbw)
2011-06-09 16:45:08 -05:00
Eric Shienbrood
57a14da144 build: ensure Samsung plugin includes common Icera code
Otherwise make can't find build-time dependencies.
2011-06-09 16:41:09 -05:00