Commit Graph

508 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Eric Shienbrood
92159d9b0d icera: add more access technology strings 2011-06-09 16:40:11 -05:00
Eric Shienbrood
85aae2d8f1 samsung: disable should use CFUN=4
CFUN=4 disables the radios but still allows useful operations
like getting PIN lock status.  So use that instead.
2011-06-09 16:37:20 -05:00
Aleksander Morgado
f9f6d1dfdb plugins: propagate cached probing result to supports task
We need to ensure that the supports task always has the results of the probing,
no matter if the probing was just launched by the plugin grabbing the port, or
by a previous plugin. We do this during supports_port(), by propagating to the
supports task any possible previously cached probing results.
2011-06-06 17:21:47 +02:00
Aleksander Morgado
3921559901 cinterion: set modem disabled if 3 consecutive AT commands get timed out 2011-06-06 17:20:17 +02:00
Aleksander Morgado
a2ba5c5e99 cinterion: enable reprobing on ports without cached capabilities 2011-06-06 17:20:17 +02:00
Aleksander Morgado
4cb039e34a cinterion: always sort last the plugin
This is because the cinterion plugin can handle RS232 modes, and checking
support for them needs to have the vendor ID probed with AT commands, so
probing is almost always issued in this plugin. By sorting last, we let
other plugins check support first.
2011-06-06 17:20:17 +02:00
Aleksander Morgado
a9c93ec3ad cinterion: handle RS232 modems 2011-06-06 17:20:17 +02:00
Aleksander Morgado
9578e1b9ca cinterion: override CMER enabling command 2011-06-06 17:20:17 +02:00
Aleksander Morgado
de5eb41a70 cinterion: override SMS indications setup commands 2011-06-06 17:20:17 +02:00
Aleksander Morgado
0b8f86534a cinterion: if modem removed don't process response 2011-06-06 17:20:17 +02:00
Aleksander Morgado
998b622611 cinterion: set and get bands 2011-06-06 17:20:16 +02:00
Aleksander Morgado
ade9fe8d30 cinterion: set and get allowed mode
The 2G-preferred and 3G-preferred modes are not supported on dual
2G/3G cinterion modems.
2011-06-06 17:20:16 +02:00
Aleksander Morgado
8d8888bc63 cinterion: query supported networks to detect if 2G or 3G device 2011-06-06 17:20:16 +02:00
Aleksander Morgado
795de12050 cinterion: query network technology capabilities
We try to look for 'psinfo' indication in AT^SIND? output (available in 3G
devices from Cinterion), and if that is not available, we try to use the
AT^SMONG GPRS monitor (available in 2G devices from Cinterion).
2011-06-06 17:20:16 +02:00
Aleksander Morgado
c6060e8c0f cinterion: add initial dummy plugin 2011-06-06 17:20:16 +02:00
Dan Williams
c45df27ca0 x22x: add support for the Alcatel X200
Same USB IDs as the X060s which is driven by Longcheer, but uses the
X22X command set so we have to do a little dance and make sure we
don't claim the X060s here.
2011-06-05 20:58:23 -05:00
Dan Williams
1936979f11 longcheer: ensure the Alcatel X200 is not claimed
The X200 shares the same USB VID and PID as the X060s but the X200
does not use the same AT command set; it uses the X22X plugin
instead.  Since both modems also report the same +GMM and +GMI
responses, we have to fall back to using +GMR even though that's
a pretty sketchy way to tell them apart if the firmware ever changes.
2011-06-05 20:58:18 -05:00
Dan Williams
b122938ab5 core: allow plugins to stop probing and not support a modem
Previously plugins could only stop probing, *or* stop probing and
indicate support for a device.  For the Alcatel X200/X060s debacle
we need to stop probing and indicate that the plugin does not
support the device at all.
2011-06-05 20:58:13 -05:00
Dan Williams
d81fa43c1d x22x: support access technology reporting 2011-06-05 18:29:00 -05:00
Aleksander Morgado
da55d11e72 plugins: use MMCallbackInfo instead of custom DisableInfo
Implemented using a custom invoke method which doesn't call the callback, and
instead calls parent disable passing the callback as argument.

This fix ensures that if a modem gets removed, no invalid modem reference is
passed to the parent disable, as info->modem would be set to NULL and we can
detect it in the custom invoke method.
2011-06-05 17:51:05 +02:00