Commit Graph

3500 Commits

Author SHA1 Message Date
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
Aleksander Morgado
d52b451727 policy: fix typo
Reported at LP#913138
2012-01-07 15:54:58 +01: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
Aleksander Morgado
a2b578d755 modem-helpers: plug a leak when parsing CREG responses 2011-12-30 19:34:39 +01:00
Aleksander Morgado
d38787c460 modem-helpers: plug a leak when building device ID 2011-12-30 19:34:21 +01:00
Aleksander Morgado
9ee88e8286 serial-parsers: plug small leak 2011-12-30 18:43:03 +01:00