Commit Graph
1125 Commits
Author SHA1 Message Date
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
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
Nathan Williams c1e64f1a33 gsm: improve scan response regex construction error handling
Change the error handling to be a bit more like what appears to have
been intended: if constructing the regex fails, report an error and
return. The existing code looked like it was set up to do this, but
wasn't quite wired together, and had process-terminating calls
(g_error()) followed by other code.

Change-Id: I4a7cee8fe01291976edc2e343fcbeb73e882f20b
2011-12-02 13:06:44 -06:00
Nathan Williams 58b2a79f83 sms: fix two bugs with multipart SMS handling: signals and listing
First, arrange for received/complete signals to be sent by calling
cmti_received_has_sms() with the message properties even if the
message isn't complete yet.

Second, make the operation of the List command's multipart message
handling independent of message order by doing one pass to insert the
messages into the cache and second pass to retrieve the complete messages.

Change-Id: I3dcae940d71aec3ddb65c508675f710d1567b0e2
2011-12-02 12:57:36 -06:00
Dan Williams fc5eed79ee mbm: add USB IDs for HP hs2340 2011-12-01 17:35:09 -06:00
Vitaly Gimly ae92c74a77 trivial: remove unecessary semicolons 2011-11-30 10:56:50 -06:00
Jiří Klimeš 65340bdf6c cdma: free one more GError 2011-11-30 12:38:52 +01:00
Nathan Williams 8d64d0fdda gsm/cdma: free up a couple of dangling GErrors
Change-Id: I4f07e7e08bcbfc116114191c759cc0af4bb8ea23
2011-11-30 09:38:42 +01:00
Nathan Williams d5d9eec2b5 serial: report port-not-open in queueing commands via callback
Reporting errors instead of just returning permits routines like
mm-generic-gsm.c:simple_get_status() to work again, as their callbacks
get the error they are expecting. To make this work, adapt get_csq_done()
to handle a NULL response when error is set, and make sure that multiple
errors don't step on each other in the mm_callback_info_chain() sequence
created by simple_get_status().

Change-Id: Ie3a72b1ce71b7f117e8b1f3da7a406c4d2da9e02
2011-11-30 09:38:42 +01: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
Eric Shienbrood eede5bb621 gsm: add new property to track which facility locks are enabled
The property EnabledFacilityLocks on the .Modem.Gsm.Card interface
is a bit mask that indicates which of the various personalization
codes from 3GPP TS 22.022, plus the SIM PIN lock and SIM PIN2 lock,
are enabled. The set of facility locks supported by the modem is
determined at the time the modem is initialized, and the state of
each supported lock (enabled or disabled) is determined. When the
state of a lock changes, a property-change signal is sent out. Note
that ModemManager only supports enabling and disabling SIM-PIN, via
the EnablePin method on Modem.Gsm.Card.
2011-11-16 23:41:49 -06:00
Eric Shienbrood e7b6b2dc1c core: keep track of all PIN retry counts
Added a PinRetryCounts property on org.freedesktop.ModemManager.Modem.
This is dictionary that records the number of PIN tries remaining
for each of the possible PIN code types for which the modem is
capable of reporting the count. Also, these counts are kept up
to date across ChangePin and EnablePin operations, not just when
an unlock is attempted.
2011-11-16 17:42:50 -06:00
Graham Inggs 71598a6289 huawei: remove padding from USSD responses
Probably needed in generic USSD code.
2011-11-15 11:29:04 -06:00
Dan Williams 262f0f5e81 wmc: fix build after fixup of WMC field names 2011-11-14 17:38:02 -06:00
Graham Inggs add6131edf huawei: pad USSD requests if necessary
ModemManager currently encodes the USSD command *141*0# (for MTN South
Africa) as "AA182DA6828D00".
While this works on some modems, for example the E1820, other modems,
for example the E160, require USSD commands that are a multiple of 7
characters long to be padded with 0x0d.
Huawei Mobile Partner dashboard software for Windows encodes *141*0#
as "AA182DA6828D1A" which works on both the E1820 and the E160.

The attached patch pads the USSD command with 0x0d before encoding if
it is a multiple of 7 characters long.
2011-11-14 17:36:23 -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
Thomas Bechtold 83c9058376 build: remove duplicate 'policy' directory entry from SUBDIRS
It is already added when WITH_POLKIT is set.
2011-11-07 00:03:11 +01:00
Nathan Williams 128e9abcee serial: reject new commands when the port is closed.
Otherwise, we can schedule a main loop call to
mm_serial_port_queue_process() for an object that's about to
disappear, leading to a crash.

Change-Id: I433a76855c52536eb2b99a5ecf26ac71afe1f8bb
2011-11-04 11:57:22 -05:00
Nathan Williams a027d27da8 gsm: finish all disable commands before returning
Rearrange the primary and secondary-port disable operations so that
there's a linear chain of callbacks rather than a second dangling
callback chain for the secondary port; it's possible for the primary
port operations to complete, and for the callback to finish and start
tearing down the entire device, before the secondary port commands
run.

Change-Id: Ia95a7eae574737cdec38b14d39786127be1b3184
2011-11-03 16:54:08 -05:00
Nathan Williams 87ec5e09a5 gsm: multipart SMS support
Keep a local cache of SMS message fragments when we perform a List or
Get command on the modem; use this cache to reassemble fragments into
complete messages, which are then what is returned by the Get and List
DBus commands. Similarly, cause Delete to delete all known parts of a
multipart message.

While here, remove some extra whitespace in the SMS commands we send
to the modem.
2011-11-02 20:50:03 -05:00
Dan Williams 889ae2fb4b gsm: fix parsing of unsolicited CREG/CGREG response with RAC 2011-10-27 16:38:11 -05:00