Commit Graph

548 Commits

Author SHA1 Message Date
Aleksander Morgado
c345f5fe63 cinterion: re-enabled Cinterion plugin
Just dummy plugin for now.
2012-03-15 14:14:31 +01:00
Aleksander Morgado
c58db4e015 core: start using our newly defined errors 2012-03-15 14:14:25 +01:00
Aleksander Morgado
86aa9df849 core: start using MMBroadbandModem objects
We chain up the Generic plugin created MMBroadbandModem objects within the
GDBusObjectManagerServer in MMManager, so that they get properly exported in
DBus.
2012-03-15 14:14:24 +01:00
Aleksander Morgado
2588c17ad3 generic: rewrite the plugin to use the new port probing 2012-03-15 14:14:21 +01:00
Aleksander Morgado
7b687b4aae build: temporarily disable compilation of plugins 2012-03-15 14:14:21 +01:00
Aleksander Morgado
6b69605633 build: chain up new 0.6 API and link against libmm-common
Also removed the MMSerialError implementation from `src/mm-errors.[h|c]', as it
is now included in the new `include/ModemManager-errors.h' header file. All the
other enums and errors without clashing names will be ported afterwards to the
new base code.
2012-03-15 14:14:19 +01:00
Aleksander Morgado
da99e8ddad build: use common CPPFLAGS and LDFLAGS for all plugins
Also include $(top_srcdir)/generated and $(top_builddir)/generated in the
common preprocessor flags.
2012-03-15 14:14:18 +01:00
Aleksander Morgado
8e83a10c1e hso: disable echo removal
Built-in echo removal conflicts with _OWANCALL unsolicited messages, which are
not coming prefixed with <CR><LF>.

Fixes LP#953294
2012-03-13 20:14:58 +01:00
Aleksander Morgado
7c9ba7faf2 samsung: remove unused variables 2012-03-05 16:59:52 +01:00
Dan Williams
30e7063094 iridium: convert to new port grabbing scheme 2012-02-28 10:06:04 -06:00
Dan Williams
4dad94d500 core: rework port grabbing and organization
Make port roles more flexible.  We have modems that do PPP
on interfaces other than the primary interface, and that
wasn't possible with the old code.  So clean up all that
logic and move the port organization code into the core
so we can reduce code in the plugins.

In the new world order, the plugins say whether the port
is a QCDM port, an AT port, or ignored.  If it's an AT
port the plugins get to tag it as primary, secondary, or
PPP, or any combination of the 3.  This allows for modems
where PPP should really be done on the secondary port
(Huawei E220, Sierra devices) so that the primary port
stays open for command and status.

Modem subclasses no longer get asked to handle port grabbing
themselves.  Instead, that's now done by the generic classes
(MMGenericCdma and MMGenericGsm) and the plugins are notified
when a port is grabbed so they can add unsolicited response
handlers for it.  After all ports are grabbed by the generic
classes, they get "organized", which assigns various ports
to the roles of PRIMARY, SECONDARY, DATA, and QCDM based
on specific rules and hints that the plugin provided (which
are expressed as MMAtPortFlags).  The plugins then have
a chance to perform fixups on the primary port if they choose.

The plugin code is responsible for determining the port
hints (ie MMAtPortFlags) at probe time, instead of having
a combination of the plugin and the modem class do the
job.  This simplifies things greatly for the plugins at
the expense of more complicated logic in the core.
2012-02-28 10:06:04 -06:00
Aleksander Morgado
f2af208f05 iridium: don't try to update signal quality if not registered
Seems that launching AT+CSQF when not registered ends up timing out. AT+CSQF
is meant to be the fast version to get the signal quality, and is expected to
return instantly with the last cached signal quality value. But if we never
got registered, there is no such cached value, so it probably waits to get the
first one.
2012-02-17 13:25:03 +01:00
Aleksander Morgado
5371cce11d iridium: ensure cached capabilities get checked 2012-02-17 13:25:03 +01:00
Aleksander Morgado
fc88c53fad iridium: handle Motorola-branded Iridium modems 2012-02-17 13:25:03 +01:00
Aleksander Morgado
8b1016f4e1 iridium: close and open the port during disconnection
The Iridium modem doesn't seem to like only the port flashing during the
disconnection, so we fully close and open again the port.
2012-02-17 13:25:03 +01:00
Aleksander Morgado
d52b38b1f2 iridium: set bearer service type to 9600bps V.110 2012-02-17 13:25:03 +01:00
Aleksander Morgado
707647da45 iridium: override generic initialization
We must send ATZ alone and once reply received, wait some time before sending
the next initialization commands. Otherwise, the next commands will receive
garbage as reply. The only way to handle this is to override the whole generic
initialization phase.

We will also avoid sending any power-up command, as not needed.
2012-02-17 13:25:03 +01:00
Aleksander Morgado
c0f390470e iridium: allow up to 200s to configure IP 2012-02-17 13:25:03 +01:00
Aleksander Morgado
e6d085246f iridium: ensure 9600 baudrate is used 2012-02-17 13:25:03 +01:00
Aleksander Morgado
4b0cd28baf iridium: fix operator name and code to be reported 2012-02-17 13:25:02 +01:00
Aleksander Morgado
4ed3391859 iridium: PS network is not supported 2012-02-17 13:25:02 +01:00
Aleksander Morgado
0c6eb6dcaa iridium: handle access technology 2012-02-17 13:25:02 +01:00
Aleksander Morgado
156a05afe0 iridium: handle allowed mode 2012-02-17 13:25:02 +01:00
Aleksander Morgado
85de9bbcc9 iridium: override signal quality retrieval command 2012-02-17 13:25:02 +01:00
Aleksander Morgado
b7b37c4738 iridium: override SMS indications setup commands 2012-02-17 13:25:02 +01:00
Aleksander Morgado
1c6e17857f iridium: skip ICCID/IMSI query 2012-02-17 13:25:02 +01:00
Aleksander Morgado
b714441272 iridium: disable power up command and modify flow control setup 2012-02-17 13:25:02 +01:00
Aleksander Morgado
670f560b3d iridium: add initial dummy plugin 2012-02-17 13:25:02 +01:00
Dan Williams
681a24c8d8 novatel: override message storage and notification
It seems that even though the firmware says it supports
specific CNMI notification values, it really doesn't.  Also
set storage to the SIM until we support automatically
determining the right storage in MM.  XU870 does not
support ME storage according to +CPMS=?.
2012-02-02 21:09:48 -06:00
Thomas Tuttle
5fc4e866c2 time: implement in icera
Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
2012-01-27 15:14:27 -06:00
Dan Williams
2f1d8f7fb3 nokia: fix PPP port for CSxx Internet Sticks
USB interface 0 isn't a serial interface; it's probably a custom
Nokia PhoNet port or a custom Icera pseudo-ethernet port.  But
it's not a CDC-ACM serial port, at least on the CS17.

Reported by Uwe Geuder.
2012-01-09 14:53:39 -06:00
Dan Williams
30bb9e878f cdma: fixes for libqcdm changes 2012-01-03 00:30:59 -06:00
Dan Williams
267b83ae27 sierra: add support for Icera based devices (USB305, AT&T Lightning) 2011-12-31 11:43:42 -06:00
Dan Williams
2af1a612e9 core: don't crash on error if response is NULL
Various bits of the code didn't check if response was valid
or not during error conditions, and when an error occurs
sometimes it'll be NULL (since not all errors are translated
errors from the modem, some are serial or general ones).  We
have to make sure we don't try to use response->str when
response doesn't exist.

Found in the generic CDMA code likely as a result of
d5d9eec2b5 but was a bug long
before that commit happened anyway.
2011-12-07 17:07:46 -06:00
Dan Williams
fc5eed79ee mbm: add USB IDs for HP hs2340 2011-12-01 17:35:09 -06:00
Dan Williams
44194ac04d nokia: add port tags for CS-xx Internet Sticks
They appear to always want PPP to happen on interface 0, according
to the Windows .INF files.
2011-11-17 12:48:36 -06:00
Eric Shienbrood
e7b6b2dc1c core: keep track of all PIN retry counts
Added a PinRetryCounts property on org.freedesktop.ModemManager.Modem.
This is dictionary that records the number of PIN tries remaining
for each of the possible PIN code types for which the modem is
capable of reporting the count. Also, these counts are kept up
to date across ChangePin and EnablePin operations, not just when
an unlock is attempted.
2011-11-16 17:42:50 -06:00
Graham Inggs
71598a6289 huawei: remove padding from USSD responses
Probably needed in generic USSD code.
2011-11-15 11:29:04 -06:00
Graham Inggs
add6131edf huawei: pad USSD requests if necessary
ModemManager currently encodes the USSD command *141*0# (for MTN South
Africa) as "AA182DA6828D00".
While this works on some modems, for example the E1820, other modems,
for example the E160, require USSD commands that are a multiple of 7
characters long to be padded with 0x0d.
Huawei Mobile Partner dashboard software for Windows encodes *141*0#
as "AA182DA6828D1A" which works on both the E1820 and the E160.

The attached patch pads the USSD command with 0x0d before encoding if
it is a multiple of 7 characters long.
2011-11-14 17:36:23 -06:00
Dan Williams
6e0e46e51e huawei: Gobi devices should be driven by gobi not huawei (bgo #660998) 2011-10-12 18:47:23 -05:00
Dan Williams
30a67862ec zte: update port hints for Onda MSA110 and others 2011-09-28 10:31:32 -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
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
Aleksander Morgado
ea23851326 api: use common ModemManager.h for API, core and plugins 2011-08-19 22:54:48 +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
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
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
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