Commit Graph
100 Commits
Author SHA1 Message Date
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
Dan Williams 4e7fb72d2d decode: fix tab/space confusion in analyze.py 2012-01-19 11:55:12 -06:00
Dan Williams 285cd37f11 wmc: STATUS is appears to be NETWORK_INFO
So rename it in various places.
2012-01-19 10:08:09 -06:00
Dan Williams c9a42d98c2 qcdm: add some mode prefs 2012-01-19 09:52:06 -06:00
Dan Williams f9a32a47ed gsm: fix return value of SMS send method
The introspection data specified the Send() method to return
an array of unsigned integers, presumably the indexes of the
messages just sent.  But the code wasn't doing that, leading
to a crash when dbus-glib tried to interpret garbage on the
return.

The problem is that sms_send_auth_cb() gave async_call_done()
as the callback for sending the SMS, but that method just calls
dbus_g_method_return() with no return arguments.  dbus-glib
interprets the arguments of dbus_g_method_return() according
to the XML introspection data, and thus it was attempting to
read the non-existent argument as an 'au' and getting garbage.

Fix that by actually returning an array of message indexes from
the SMS send code, and propagate that back to the SMS dbus
code so it can return something sensible.
2012-01-18 18:08:20 -06:00
Dan Williams fc3fd7b983 test: print sent SMS message index on success 2012-01-18 18:07:45 -06:00
Dan Williams 04e87e70ff qcdm: some devices do implement SW_VERSION
Like the MF627 for some reason.  Also, the format appears to be
more like the DM_CMD_VERSION_INFO response where at least the
comp_date and comp_time fields are the same size as
VERSION_INFO, just with some padding between.
2012-01-18 17:10:23 -06:00
Dan Williams e2306a0dd5 gsm: change SMS send validity from 5-minute units to minutes
Might as well keep it simple.
2012-01-18 16:30:15 -06:00
Dan Williams c437da20ff test: enhance SMS send util to accept validity and SMSC address 2012-01-18 15:43:22 -06:00
Dan Williams 5c561995aa gsm: fix CMGS PDU mode length calculation
The first byte of the PDU is the SMSC length, but it's not
the padded SMSC length.  So we need to subtract the actual
byte index of the start of the message from length of the
PDU, and since the PDU creation function knows all about
where the SMSC address stops and the message begins, just
have it return that length instead of making the callers
calculate it.
2012-01-18 15:26:12 -06:00
Dan Williams d51ff9ac07 gsm: use PDU modem when the modem doesn't support text mode
Eventually we should be using PDU mode whenever the modem supports
it instead of defaulting to text mode, but there are still some
bugs.
2012-01-18 13:45:03 -06:00
Dan Williams 43e6039cee qcdm: GSM MCC, MNC, LAC and CI don't seem to valid in WCDMA mode
So don't bother trying to parse them.
2012-01-18 13:44:20 -06:00
Dan Williams e08e46fb1a qcdm: let WCDMA/GSM devices pass CDMA-only tests
Obviously they don't implement the CDMA-only commands.
2012-01-18 13:25:00 -06:00
Dan Williams 1655b3d323 test: print out error if sending SMS fails 2012-01-18 13:24:35 -06:00
Dan Williams 6789a87a58 tests: better handling of encodings in SMS test tool
Python usually uses Unicode, but often the shell encoding
will be in UTF-8, so Python needs some help converting the
message to Unicode.  Use LANG to do that if we can.
2012-01-18 13:00:50 -06:00
Dan Williams 3f4056caab tests: add a test for 25-character SMS messages
Tests that the last septet (packed in an octet by itself)
doesn't get left off the message like the old code used to
do before "core: fix some bugs in GSM7 packing code".
2012-01-18 12:56:52 -06:00
Dan Williams 9bba24941b api: change SMS save/send validity units
Making clients pass the raw GSM PDU value isn't very useful
since it's not exactly trivial to create programmatically.
Instead, let's make validity be units of 5 minutes and MM
will automatically figure out how to map that to the PDU
value.
2012-01-18 12:52:28 -06:00
Dan Williams 27b981237e core: fix some bugs in GSM7 packing code
The existing gsm_pack() had a bug where if the last
septet should be in an octet by itself, that last
octet wouldn't be added.  Plus, kinda pointless to
use a GByteArray here when we already know what the
length will be through simple arithmetic.

We can also simplify the function too.

Furthermore, there weren't any testcases for starting
packing at an offset other than zero, so add one.
2012-01-18 12:28:50 -06:00
Dan Williams 178f30bdd3 qcdm: fill in some GSM and WCDMA stuff 2012-01-17 18:49:18 -06:00
Dan Williams 80a41ed11b gsm: add SMS PDU creation function
Only for basic SMS-SUBMIT PDUs at the moment, and doesn't
support large SMSs yet.
2012-01-17 13:13:09 -06:00
Dan Williams ad29e8dd88 trivial: update .gitgnore 2012-01-17 13:12:31 -06:00
Dan Williams dec9cc66eb core: register SMS errors with dbus-glib 2012-01-16 14:11:25 -06:00
Dan Williams bab6ae9552 serial: handle CMS errors correctly 2012-01-16 12:22:18 -06:00
Dan Williams 7dea934844 core: add CMS errors 2012-01-16 12:15:43 -06:00
Dan Williams b24561e99e decode: don't try interpreting non-WMC data as WMC 2012-01-13 14:56:04 -06:00
Dan Williams a6548ebe40 qcdm: start filling out log messages and items
Log messages are enabled by LOG_CONFIG and are then reported
as unsolicited responses with code DM_CMD_LOG.  Each log type
appears to have its own message format which are now being
added to log-items.h.
2012-01-12 13:00:52 -06:00
Dan Williams 474d9136ba qcdm: fix warning when no log codes are enabled 2012-01-11 17:55:10 -06:00
Dan Williams bf31764bab qcdm: enhance LOG_CONFIG testcase 2012-01-11 16:10:37 -06:00
Dan Williams b14044bc9a qcdm: only warn on unknown mode pref NV item values 2012-01-11 16:10:02 -06:00
Dan Williams 29a1385e6c qcdm: LOG_CONFIG fixups
Fix some buffer overruns.  Log codes are also 16-bit not 32.
2012-01-11 15:30:45 -06:00
Dan Williams f3208bf3a6 qcdm: add support for Log Config command
This appears to be a newer version of EXT_LOGMASK that also
works with GSM/UMTS and other subsystems.
2012-01-11 14:25:23 -06:00
Dan Williams b22b2d99db qcdm: add u16 arrays to results 2012-01-11 14:24:43 -06:00
Dan Williams 1804ae2fe5 qcdm: fix stringification of qcdm_xxx_if_fail() macros
Actually reading about preprocessor concatenation and stringification helps.
2012-01-11 12:53:06 -06:00
Dan Williams 2e2c8ad7ef qcdm: add some more commands
Found in CodeAurora diagchar_core.c driver.
2012-01-10 19:54:40 -06:00
Dan Williams e98f2ebf40 qcdm: clarify some subsystems 2012-01-10 19:01:40 -06:00
Dan Williams d085e6c467 qcdm: fix up testcases for more expected error codes
I'm bored and playing around with a Novatel E725...
2012-01-10 18:15:11 -06:00
Dan Williams ff838972cf qcdm: don't segfault getting number of log items
Not sure how this worked before at all.
2012-01-10 18:14:40 -06:00
Dan Williams 86e3ab1540 sms: punt handling of 8-bit encoded SMSs to clients
There's no encoding information about 8-bit SMS messages,
and they are often binary things like ringtones or voicemail
indicator commands.  Since there's no point to our parsing
them just let clients deal with it.
2012-01-09 17:23:48 -06:00
Dan Williams 96210d1c55 dbus: don't install introspection XML we don't really own
MM implements the DBus properties interface and of course that
requires some XML on our side for dbus-glib.  But we shouldn't
install that along with our ModemManager-specific XML.
2012-01-09 17:23:42 -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 11fbcc9010 qcdm: fill out some operating modes 2012-01-05 12:31:13 -06:00
Dan Williams 62d26479ff qcdm: better handle NV item read/write status codes 2012-01-05 12:29:03 -06:00
Dan Williams 6e961ddd83 qcdm: fix up live testcase for recent changes
And interpret all the recent mode preferences.
2012-01-05 11:05:32 -06:00
Dan Williams 30bb9e878f cdma: fixes for libqcdm changes 2012-01-03 00:30:59 -06:00
Dan Williams 7b14063f46 qcdm: remove usage of glib
People have asked for this at various times.
2012-01-03 00:21:05 -06:00
Dan Williams 1e1c8a5ae4 wmc: remove usage of glib
People have asked for leaner builds and	glib isn't strictly
required for the core library.
2012-01-03 00:12:36 -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 c9d0dea5b0 decode: add some python tools to decode SniffUSB dumps
decode.py will read SniffUSB logs of communication with
QMUX or WMC speaking devices.  It will dump the packets
in both hex and ASCII.  If you know something about the
device then you can tell it to decode the packets.  For
example, we know the Pantech UML290's WMC port speaks
WMC using Bulk Transfers, so we can:

decode.py --transfer=wmc <path to sniffusb logs>

or we know the UML290's "rmnet" port speaks raw IP in
the Bulk Transfers and QMUX in the Control Transfers, so:

decode.py --control=qmux <path to sniffusb logs>

qmiprotgen.py takes a path to an Entities.txt file and
dumps out the protocol entities and services in
Python code which is used by qmux.py.

xml2ascii.py and analyze.py dump out UsbSnoopy XML logs
but these are not as usable as the SniffUSB logs (they
do not provide good direction information).

http://www.wingmanteam.com/usbsnoopy/
http://www.pcausa.com/Utilities/UsbSnoop/
2011-12-30 20:42:51 -06:00
Dan Williams 9f14d83047 gsm: treat "no network" error as zero signal for Simple.GetStatus 2011-12-14 14:19:10 -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
Dan Williams 02aa10c72a gsm: check facility locks after unlocking PIN
Some modems don't allow most commands when they are PIN locked, so
the initial facility lock check errors out.  Check the locks again
after the SIM is unlocked.
2011-11-16 23:41:49 -06:00
Dan Williams 262f0f5e81 wmc: fix build after fixup of WMC field names 2011-11-14 17:38:02 -06:00
Dan Williams ef74d84b32 wmc: demystify some fields in the IP info reply 2011-11-14 12:33:59 -06:00
Dan Williams 61375a5fd6 wmc: demystify some more fields of the device info response 2011-11-14 12:24:56 -06:00
Dan Williams 1aa6d01d53 wmc: protocol and testcase update 2011-11-11 23:39:20 -06:00
Dan Williams ae3f1cd578 libwmc: add testcases that talk to the device 2011-11-11 12:21:41 -06:00
Dan Williams 889ae2fb4b gsm: fix parsing of unsolicited CREG/CGREG response with RAC 2011-10-27 16:38:11 -05:00
Dan Williams ccad4aaa9d gsm: add regex for unsolicited CREG/CGREG response with RAC 2011-10-27 15:13:30 -05:00
Dan Williams d40e043623 core: better handle NULL spew from serial ports during probing
Observed on a generic ZTE device.
2011-10-18 13:17:39 -05: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 c61423f2cf wmc: add initial command parsing and response handling 2011-10-04 11:16:39 -05:00
Dan Williams a7637ddf87 qcdm: add more mode prefs
It seems that various firmwares just pass values from eg AT^SYSCFG
straight through to the firmware so it's pretty easy to map them
to the actual response here.  Note that the NV mode pref item uses
a different mapping than CM state info response.  Yay.
2011-10-04 11:16:39 -05:00
Dan Williams 7a7014330c examples: add example of auto-enabling modems 2011-09-30 14:38:11 -05:00
Dan Williams 30a67862ec zte: update port hints for Onda MSA110 and others 2011-09-28 10:31:32 -05:00
Dan Williams 368b808869 libwmc: simpler logging and error handling 2011-09-27 15:33:53 -05:00
Dan Williams 18fc92ef73 libwmc: add more test code and start of com tests 2011-09-27 13:13:40 -05:00
Dan Williams 8250dee131 libwmc: add more tests including for UML290 quirks 2011-09-19 13:42:00 -05:00