Commit Graph

1367 Commits

Author SHA1 Message Date
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