Commit Graph
100 Commits
Author SHA1 Message Date
Dan Williams 90e67404d6 bearer-qmi: get and log current IP settings when connecting the bearer
All addresses are given as machine byte order, and thus must be converted
to network byte order (BE) before passing to inet_ntop().
2012-10-23 18:20:24 +02:00
Dan Williams 7f105dc386 simple: don't try to enable the "unknown" band
If the band isn't actually given, don't try to enable it.
2012-10-19 19:32:28 -05:00
Dan Williams 7ae18eecdd vl600: add supported AT commands for V8 firmware 2012-10-06 12:17:38 -05:00
Dan Williams 0b059ea9c9 uml290mode: fix log message 2012-09-27 11:13:26 -05:00
Dan Williams f5c5a455c1 uml290mode: offline and reset modem after making changes 2012-09-27 10:55:48 -05:00
Dan Williams fb65cba607 qcdm: add qcdm_cmd_control_new() to set operating mode 2012-09-27 10:55:20 -05:00
Dan Williams 210af3241c core: fix a leak in "core: better handling of non-UCS2 conversions that should be UCS2 (bgo #683817)" 2012-09-12 23:03:59 -05:00
Dan Williams c524734d9f core: better handling of non-UCS2 conversions that should be UCS2 (bgo #683817)
Some modems return the +COPS operator name in hex-encoded current
character set (as set with +CSCS).  Others return the operator name
in ASCII when set to UCS2, while yet others return the  ASCII name
with trash at the end (*cough* Huawei *cough*).  Handle that better
by not crashing.
2012-09-12 23:03:58 -05:00
Dan Williams 8213a09a34 broadband-modem-qmi: set network port to 802.3/no-QoS mode
The kernel drivers expect this mode, so make sure we set it.
2012-09-08 10:41:01 +02:00
Dan Williams 6f2c440b7b broadband-modem-qmi: fix handling of current and overall modem capabilities
Current capabilities is the set of *active* radios that can be used
right now.  Modem capabilities are the set of all radios the modem
could use, if some action were performed to enable them if they are
not enabled already (firmware reload, changing allowed mode, etc).

For QMI devices, the DMS Get Capabilities command represents all
radios, and thus "modem capabilities".

But to read *current* capabilities, ie active radios, we need to
query the NAS System Selection Preference and grab the "mode
preference" TLV.  Unfortunately that is only available with NAS
>= 1.1, which means older Gobi devices (1K and 2K) don't support
it.  So for older devices, we try to get the Technology Preference
(which takes into account user-requested limitations) and then
mask that with the DMS Get Capabilities result for a best-effort
current capabilities.

For example, the Pantech UML290VW reports DMS Get Capabilities
of "cdma, evdo, gsm, umts, lte", but a more limited SSP mode
preference according to what modes are actually enabled.  Gobi
1K devices don't support SSP, and the DMS Get Capabilities
reports cdma/evdo or gsm/umts depending on the currently loaded
firmware.  Previous to this patch, ModemManager reported all
modes as available on the UML290, ignoring what modes were
actually enabled.
2012-08-31 12:30:13 -05:00
Dan Williams 61d41978c1 icera: fix parsing of IP config options
Some of the IP address items will be 0.0.0.0 depending on what the
other items are, like when the duplicate gateway is set on newer
devices, the first gateway address may be 0.0.0.0.  Since that's
not a valid IP address, just don't set that member of the config.

Second, the intent with the duplicate gateway is only to use that
when the first gateway was not given (ie, was 0.0.0.0) so fix the
check for that.
2012-08-31 10:41:57 -05:00
Dan Williams 63ef0990b6 sierra: allow users to help debug APP1 PPP capability
Most Sierra PPP-based devices are supposed to allow PPP on the
APP1 port, which has a dumb AT parser, leaving the main port
(with the intelligent AT parser) free for status and signal strength.
But out of all the devices I've tested it with (8775, 8781, AC881,
and C885), only the C885 actually works.  The rest (including three
different firmware versions for the 8775) either crash or disconnect
shortly after PPP starts.

To help figure out which devices actually support this, when
running MM in debug mode, users can set the MM_SIERRA_APP1_PPP_OK
environment variable and assume the APP1 port allows PPP.  This
is only for debugging purposes.
2012-08-31 15:11:30 +02:00
Dan Williams 9d2a046754 mbm: add Ericsson H5321gw (often found in Thinkpad X230) 2012-08-31 10:11:05 +02:00
Dan Williams 31d98a43c8 test: add utility to force a modem disconnect 2012-08-31 09:24:01 +02:00
Dan Williams 946dcca4fc qcdm: add some EVDO log item numbers 2012-08-15 12:18:59 -05:00
Dan Williams 1e286f80ea qcdm: interpret MCC value from StatusSnapshot command 2012-08-08 16:23:02 -05:00
Dan Williams e0c17f936f icera: implement dynamic band support checking
Turns out we can check supported bands by asking the modem what
the enabled state is for the bands it says it supports, and then
setting the enabled state to what it currently is.  For bands the
modem actually doesn't support, it'll return an error.  Use that
to build up the modem's actual supported band list.
2012-08-06 20:07:27 +02:00
Dan Williams ea024f2e52 samsung: use generic Icera band handling functions 2012-08-06 20:07:27 +02:00
Dan Williams a532c081d1 icera: add generic band handling functions 2012-08-06 20:07:27 +02:00
Dan Williams b1c2e0ba5f samsung: use generic Icera unlock retries checking functions 2012-08-06 20:07:27 +02:00
Dan Williams abfce5493c icera: add generic unlock retries checking 2012-08-06 20:07:27 +02:00
Dan Williams 3a28f660c5 icera: fix timezone request AT command
Actual command uses a *, not a %.  Must have been a typo when
porting to the new MM since 0.6 uses a * too.
2012-08-06 20:07:26 +02:00
Dan Williams 8740f0b72f trivial: comment spelling fix 2012-08-06 20:07:26 +02:00
Dan Williams 6f3a83534c longcheer: implement unlock retries checking 2012-08-06 20:07:26 +02:00
Dan Williams 4e92b849af hso: fix small error in unlock retries checking
_OERCN only reports PIN and PUK, so we only check for two values.
2012-08-06 20:07:26 +02:00
Dan Williams 32bc031ae6 hso: implement unlock retries checking 2012-08-06 20:07:26 +02:00
Dan Williams e7715af875 serial: fix AT port carriage return handling
Off-by-one, fix it.
2012-07-18 10:51:44 -05:00
Dan Williams f08c76f00c decode: handle another UsbSnoop URB function 2012-07-17 16:04:31 -05:00
Dan Williams 061b4d202c decode: handle FUNCTION_CLASS_INTERFACE requests like CONTROL_TRANSFER
The Novatel USB551L uses these to send data to the device, but the data
is QMUX.
2012-06-25 12:48:47 -05:00
Dan Williams d20f33b5c9 trivial: fix format string 2012-06-22 13:56:02 -05:00
Dan Williams 16d85f7b33 decode: update with latest QMI enums
Since QC stopped distributing the database files, we can't easily
decode the TLV names unless we start parsing the C headers.
2012-06-22 12:18:38 -05:00
Dan Williams ab5e9a49cf zte: try to handle Icera devices that use PPP
Not all devices present a network interface, and on these devices
we need to fall back to PPP using the standard setup commands.  But
they appear to support the Icera custom commands for access technology
and such, so still use those.

Hopefully fixes ZTE MF665C.
2012-06-06 11:47:28 -05:00
Dan Williams 4ac45ba091 uml290: allow setting more global modes 2012-06-04 13:53:38 -05:00
Dan Williams 5337b2277a qcdm: fix 1x/HDR mode pref and add GSM/UMTS mode prefs 2012-06-04 13:53:34 -05:00
Dan Williams 99b877ee68 test: ignore ESN errors in info.py 2012-05-30 12:11:25 -05:00
Dan Williams fcc4903a83 trivial: whitespace fixes 2012-05-30 11:52:36 -05:00
Dan Williams e7b1c48daf uml290: add mode switching tool
Switches UML290 mode between 4G/LTE, 3G/EVDO/1X, and auto.
2012-05-30 11:48:42 -05:00
Dan Williams 96166e4b75 wmc: namespace stuff properly 2012-05-30 11:48:42 -05:00
Dan Williams 9fb8158279 qcdm: namespace stuff properly 2012-05-30 11:48:42 -05:00
Dan Williams e5f787d364 wmc: add command for setting global mode 2012-05-29 13:49:26 -05:00
Dan Williams 9bee743a9d vl600: add some reverse engineering docs and an AT com utility 2012-05-16 12:13:48 -05:00
Dan Williams 90f4a034b2 modem-helpers: recognize 3GPP2 access tech strings too
Various Gobi-based devices (USB551L, probably Gobis too) can report
EVDO and 1X as the current RAT from CNTI so parse that here too.
2012-05-04 17:38:36 -05:00
Dan Williams 1e024c711a broadband-modem: add another Novatel +GCAP LTE response
This time from the 551L.  I wonder when they'll make up their minds
about what to return.
2012-05-04 17:19:20 -05:00
Dan Williams 0f324de94f decode: recognize another UsbSnoop packet type 2012-04-24 13:34:16 -05:00
Dan Williams d41d62f577 serial: fix crash when sending some commands to a closed port (lp:963102)
If the command we're sending doesn't have a callback, don't try
to call NULL.  Triggered if the port got closed (because the modem
crashed, or refcounting errors or whatever) with some code like this:

    mm_at_serial_port_queue_command (MM_AT_SERIAL_PORT (port), "+CREG=0", 3, NULL, NULL);
2012-03-23 10:58:59 -05:00
Dan Williams 713937f1f0 manager: make sure modems get exported when all their ports are finished
My LG Rumor2 phone (ttyACM0 - AT, ttyUSB0 - QCDM) was never getting
exported after the QCDM port finished probing.  Not entirely sure
why, but we should check whether we need to export a modem or not
any time a port gets grabbed.
2012-03-15 14:14:48 +01:00
Dan Williams ded020efeb gobi: ensure QCDM ports are correctly grabbed
Need to suggest that it's QCDM since the MMPortProbe stuff
doesn't get passed through to mm_base_modem_grab_port() so
we can't detect QCDM ports automatically there.
2012-03-15 14:14:48 +01:00
Dan Williams c697027cee broadband-modem: fix check for QCDM capability
has_qcdm_port was never set to TRUE anywhere...
2012-03-15 14:14:48 +01:00
Dan Williams 0ccfcbd986 gobi: port to 06-api 2012-03-15 14:14:48 +01:00
Dan Williams 98755bd508 broadband-modem: ignore early AT error responses for modem info
Where we have multiple commands that are all supposed to return
the same thing (ie, GMM/CGMM, CSQ/CSQ?) but some modems
support one and not the other, don't exit the sequence early if
the modem doesn't support one of them.

Gobi modems with CDMA firmware don't support the Cxxx variants
so the returned ERROR (CME error 100) made the generic parser
break out of the AT sequence without trying the additional
commands that are supported.
2012-03-15 14:14:48 +01:00
Dan Williams cb2d6d6105 base-modem-at: indicate sequence status to response parsers
Let parsers know if this command is the last in a sequence since
they may want to handle errors differently if that's the case.
2012-03-15 14:14:48 +01:00
Dan Williams 8f5cd49361 release: bump version to 0.7.0 (devel for 0.8.x stable) 2012-03-14 11:11:26 -05:00
Dan Williams 5f6c65e7c1 gsm: retry sending SMS in PDU mode if text fails and PDU is supported
In the future we'll just default to PDU mode.
2012-03-01 17:23:46 -06: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
Dan Williams 2e99aa2557 qcdm: decode some more log items 2012-02-17 13:06:11 -06:00
Dan Williams 7b4d6cf605 test: fix SMS testcase errors due to uninitialized GError 2012-02-07 14:12:15 -06:00
Dan Williams 2104cd725a gsm: ensure text mode SMS list doesn't pick up too much text
This likely has no effect, but just make sure the regex stops
grabbing message content when it hits the CF/LF that terminates
the message content in text mode.
2012-02-07 13:59:32 -06:00
Dan Williams c7f54a635a gsm: fix text mode SMS list regex for single messages
We don't get a \r\n at the end for single messages.
2012-02-07 13:48:47 -06:00
Dan Williams 4706ea488e sms: handle text mode SMS listing
Undoubtedly we'll need to adjust the regex but this works for now.
2012-02-02 21:12:44 -06:00
Dan Williams 76c9b29415 test: (sms-get.py) don't fail if we don't get an SMSC 2012-02-02 21:12:17 -06: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
Dan Williams 14a59c4384 gsm: fix listing SMS messages in text mode
Even though we don't parse them correctly yet, at least
send the right command for listing them.
2012-02-01 11:21:20 -06:00
Dan Williams d84214184c gsm: fix setting PDU mode for SMS messages
Stupid signed/unsigned mistake.
2012-02-01 10:45:47 -06:00
Dan Williams 70978d58a0 test: pretty-print SMS messages in sms-get.py 2012-02-01 10:45:28 -06:00
Dan Williams 20a1c412fd core: fix warning about MMModemTime interface initialization
The MMModemTime interface was getting initialized more than once.
2012-02-01 01:43:28 -06:00
Dan Williams 4fd6264848 build: more libwmc and libqcdm standalone fixes
Make it pass distcheck.
2012-01-27 15:14:30 -06:00
Dan Williams 346060efe8 test: add SMS get example/test 2012-01-26 12:35:30 -06:00
Dan Williams b9037d1150 test: add missing examples to Makefile.am 2012-01-26 09:08:18 -06:00
Dan Williams 13d2eee6f1 test: rename SMS send example 2012-01-26 09:07:48 -06:00
Dan Williams 38498e3c5d qcdm: fix some build errors when building standalone 2012-01-24 11:32:20 -06:00
Dan Williams 79cb265379 wmc: allow building libwmc standalone 2012-01-24 11:28:46 -06:00
Dan Williams 7d6d3fd47e decode: update WMC for DEVICE_INFO changes 2012-01-23 18:54:28 -06:00
Dan Williams dd1ed06c14 wmc: harmonize buffer dumper with decode.py
Makes it easier to compare the output.
2012-01-23 18:54:28 -06:00
Dan Williams c386efee9c wmc: decode more of DEVICE_INFO
CDMA MIN, home SID, PRL & ERI version
2012-01-23 18:54:28 -06:00
Dan Williams 704489d660 decode: fix WMC decoder for PC5740 dumps 2012-01-23 18:54:28 -06:00
Dan Williams ccfdda523a wmc: add FIELD_TEST command
UML290 and UML190 both respond to the command but return all
zeros, while the PC5740 returns valid data.
2012-01-23 18:54:28 -06:00
Dan Williams 1e6da54b45 decode: add another USB function 2012-01-23 18:53:34 -06:00
Dan Williams 8915f7964a core: fix copy & paste error 2012-01-23 15:52:47 -06:00
Dan Williams f1410bb8d7 wmc: fix compile error 2012-01-23 15:50:24 -06:00
Dan Williams 72e3f0457b wmc: add LTE only global mode define 2012-01-23 11:11:03 -06:00
Dan Williams f90fe19068 wmc: fix init command
Actually read what struct tm contains and use it correctly,
and fix the init command struct size.
2012-01-23 10:48:28 -06:00
Dan Williams 66b7ef018e wmc: fix segfault in testcase 2012-01-23 10:48:28 -06:00
Dan Williams 4d4d6072a1 wmc: fix up for recent INIT and DEVICE_INFO changes
Send current time to modem during init, and don't try to
grab MCC/MNC where its not supported.
2012-01-21 15:43:15 -06:00
Dan Williams 4c5ef98525 decode: fix some formatting 2012-01-21 15:12:34 -06:00
Dan Williams 365666da01 decode: update for WMC timestamps 2012-01-21 15:10:59 -06:00
Dan Williams fac80b7002 wmc: update INIT and NETWORK_INFO commands with timestamp 2012-01-21 15:09:40 -06:00
Dan Williams 2838456e7a decode: parse URB timestamps too 2012-01-21 13:26:08 -06:00
Dan Williams c37fdf5f94 decode: updates all around
Rewrite packet handling so packets can span multiple USB URBs
(which sometimes happens with WMC) and also add a bunch more
WMC decoding stuff.
2012-01-21 12:55:16 -06:00
Dan Williams a9d6b5a8b6 wmc: more protocol updates 2012-01-21 12:50:12 -06:00
Dan Williams 0737a24f43 qcdm: clarify IMxI conversions a bit; fix up WCDMA L1 states 2012-01-21 11:23:17 -06:00
Dan Williams d068cde819 decode: decode more WMC commands and fix some command names 2012-01-20 17:20:37 -06:00
Dan Williams 110897c65d wmc: add some more global mode defines 2012-01-20 16:56:20 -06:00
Dan Williams 21052004dd decode: add another ignored packet type 2012-01-20 16:54:59 -06:00
Dan Williams a75157859c wmc: prettier printing of serial stream and WMC packets 2012-01-20 14:54:16 -06:00
Dan Williams 85a7575717 wmc: global mode command is 3 bytes not 2 2012-01-20 14:54:02 -06:00
Dan Williams 1ae2381e5a wmc: add some more commands and fix up network info
Add operator commands, and fix up the network info response
handling for GSM/WCDMA capable devices like the UML190 when
it's in GSM/WCDMA mode.
2012-01-19 19:09:52 -06:00
Dan Williams 47fd967d61 wmc: make warn macros more useful 2012-01-19 18:51:55 -06:00
Dan Williams d519f3e364 wmc: fix stringification of wmc_xxx_if_fail() macros
Actually reading about preprocessor concatenation and stringification helps.
2012-01-19 18:48:26 -06:00
Dan Williams 337f4b2372 wmc: add Access Technology/Service definitions and Global Mode stuff
Comparing dumps from UML190 in different modes, UML290, and PC5740
revealed what the 'service' bit was, which matches up nicely with
the SERVICE_* strings in the Windows connection manager DLLs if
you interpret them in reverse numerical order.

For the global mode stuff, looking at USB wire captures shows that
C8 03 and C8 04 get used right before the NETWORK_INFO (C8 0B)
shows access technology changes, which means they are probably the
commands that switch global mode around.
2012-01-19 12:50:40 -06:00