Commit Graph

661 Commits

Author SHA1 Message Date
Dan Williams
0108a36d27 serial: let port subclasses handle their own debug logging
We want to print out QCDM messages as hex, not ASCII.  So let
each port type print out it's own communication as it wants to.
2010-04-05 12:01:54 -07:00
Dan Williams
bac945a8e4 core: fix supports check for last plugin (rh #579247)
Since Generic is always last, it was getting ignored by this
off-by-one bug caused by a previous patch.
2010-04-05 11:15:09 -07:00
Dan Williams
a55265f03a gsm: clean up periodic poll start/stop and poll signal strength 2010-04-05 10:47:14 -07:00
Dan Williams
7da2b5cb6a cdma: clean up periodic poll start/stop
And fix a small bug where polling wasn't started for the ENABLED state.
2010-04-05 10:38:39 -07:00
Dan Williams
9112180f8a cdma: periodically poll registration state and quality 2010-04-05 09:58:12 -07:00
Dan Williams
2f1fbfb520 core: only enable location API for dbus-glib >= 0.86 2010-04-04 09:17:08 -07:00
Dan Williams
f39afdd5f7 qcdm: fix endian issues for BE platforms
And add a testcase for packet encapsulation to ensure we don't
have further endian issues in the future.
2010-03-31 20:24:12 -07:00
Dan Williams
4d89b519b4 core: don't advance to next plugin until needed
Otherwise info->cur_plugin is wrong (and therefore we left uncleared
supports tasks in MMPluginBase) when the port isn't supported by
the plugin, but it's parent modem device was supported by the plugin.
Like when all probing of the port fails but one of it's siblings has
already been claimed by a modem; in this case we just drop the port
(so that no other plugin could try to claim it, because only one
plugin is allowed to handle all a modem's ports) but we still need
to tell the parent modem's plugin to clean up the supports task.
2010-03-31 03:05:22 -07:00
Dan Williams
40a713be6f core: pass try_supports_port() the existing modem 2010-03-30 23:36:08 -07:00
Dan Williams
4753f7360b core: don't re-export modems after db413acc4e
If a port is found by the kernel after the modem is already exported,
make sure we don't re-export the modem after the tardy port is handled.
2010-03-30 23:28:26 -07:00
Dan Williams
d2e12742c4 cdma: use best active pilot EC/IO for signal strength when connected
If the modem doesn't have two AT ports (so one can be used for AT+CSQ
while connected) get the 1x active pilot's EC/IO and use that for
signal strength.
2010-03-30 17:28:13 -07:00
Dan Williams
db413acc4e core: only export modems when all ports are handled
A modem is now only exported to D-Bus when both of the following are true:

1) the modem is valid
2) all ports the modem provides have been handled by appropriate plugins

This ensures that all the modem's ports are completely ready before
any clients can do anything with it.  In the case of CDMA modems with
QCDM ports, this allows the QCDM ports to be detected before exporting
the modem.  Since the QCDM detection comes after AT probing, previously
this resulted in a CDMA modem getting exported to clients before we had
a QCDM port to query for registration status.
2010-03-30 16:06:55 -07:00
Dan Williams
df08f6a43f core: find the existing modem for a port in the manager 2010-03-30 15:03:35 -07:00
Dan Williams
720e38aec0 core: move physical device checking into the manager
It turns out that the manager needs to know about the physical
device so we can prevent multiple plugins from claiming ports on
the same modem.
2010-03-30 14:50:40 -07:00
Dan Williams
39326f2491 cdma: use DM for serving system if possible 2010-03-30 01:01:53 -07:00
Dan Williams
a7e7854171 qcdm: don't fail testcase on unknown mode pref values
EC168C has a value of 0x16 for mode pref, which is unknown.  But
that shouldn't fail the testcases.
2010-03-30 00:57:15 -07:00
Dan Williams
41c2e0a946 qcdm: add CM subsystem digital only mode preference
Found on the Huawei EC121.
2010-03-30 00:48:55 -07:00
Dan Williams
fc33616ae2 qcdm: fix testcases for various devices
Huawei EC121 doesn't implement the MDN NV item, and we're also missing
some values for the CM subsystem mode pref enum.
2010-03-30 00:38:14 -07:00
Dan Williams
0ae176c63c qcdm: add Pilot Set retrieval for signal strength calculations
Determined from various	sources	including RTManager and
"Technical Introduction to CDMA" (Course RF100 Chapter 7).
2010-03-30 00:32:27 -07:00
Dan Williams
cff40ac472 qcdm: allow result objects to hold boxed types 2010-03-30 00:29:31 -07:00
Dan Williams
71c6fa79f7 qcdm: fix CRC checking on some packets
Should be pointing to the CRC location in the *unescaped* packet
buffer since the CRC is subject to escaping/unescaping.  Previous
code pointed to the wrong location in the escaped packet buffer,
which was often pointing to the write place if there weren't many
escaped bytes in the input buffer, but was still wrong.
2010-03-29 16:42:53 -07:00
Dan Williams
2f099e2964 qcdm: complete Version Info command fields
Found in RTManager
2010-03-29 00:23:07 -07:00
Dan Williams
a98fa8a4b3 qcdm: fix up CDMA Status command fields and values
Found in two sources:
a) Руководство пользования тестером CDMA-450
b) RTManager
2010-03-29 00:08:46 -07:00
Dan Williams
98e8108ac2 qcdm: update CM subsys system modes 2010-03-28 23:39:19 -07:00
Dan Williams
4d426ebbbd gsm: only set auto registration if the modem isn't idle (related: bgo #591047)
Some modems (Huawei E1552) appear to have problems with auto registration
in some circumstances that we don't yet fully understand, such that when
AT+COPS=0 is sent they never end up registering with the correct network.
As a minor workaround, if the modem is already registered with a provider
and the user hasn't specified manual registration, don't set auto
registration but let the modem figure it out itself.

See (bgo #591047) for more details.
2010-03-28 09:30:16 -07:00
Dan Williams
fe69ab4210 huawei: ensure modem ports get claimed even if probe fails
Previously there was an issue where if the probe failed, because
we can't really probe huawei secondary ports for various reasons,
the Generic plugin would eventually come around and try actively
probing the secondary port after the Huawei plugin said "I don't
support this port".  Which resulted (potentially) in two MMModem
objects for the same device (one driven by Huawei, the other by
Generic).
2010-03-28 09:12:17 -07:00
Dan Williams
b876182fe6 zte: implement GSM solicited access technology request 2010-03-26 01:27:49 -07:00
Dan Williams
23986f8b0e huawei: implement GSM solicited access technology request 2010-03-26 01:15:20 -07:00
Dan Williams
a50708dbea sierra: implement GSM solicited access technology request 2010-03-26 00:27:30 -07:00
Dan Williams
3d12055818 gsm: ensure solicited access technology is valid before using it 2010-03-26 00:16:24 -07:00
Dan Williams
843a772b4c option/hso: implement solicited access technology request 2010-03-26 00:14:47 -07:00
Dan Williams
a83dcdba8a gsm: update access technology on successful registration 2010-03-26 00:14:23 -07:00
Dan Williams
4dbc2f2e9b gsm: fix wrong comparison
Bug didn't have much of an effect, but should be fixed anyway.
2010-03-25 13:47:30 -07:00
Dan Williams
0b9c173fe9 core: assume +CPIN "READY" response indicates GSM capability (rh #573510)
Assume (for now) that devices that respond to AT+CPIN without an
error are GSM devices.  This may not be 100% true as some devices
in Asia (where CDMA devices use RUIMs which are basically SIMs) support
+CPIN for unlocking the RUIM, but since CDMA devices more consistently
implement AT+GCAP and ATI than we should be safe for a while.
2010-03-23 14:37:01 -07:00
Dan Williams
e7d1e4adb9 cdma: use DM Call Manager for registration status if available
This should solve problems with users who's providers are EVDO
only and thus the device isn't in 1X mode, but who's modems
don't set anything meaningful for CAD or CSS when the 1X radio
isn't registered.  Previously, MM would just spin thinking it
wasn't registered when trying to connect.

This was mostly found with AnyDATA, Huawei, and some ZTE devices
from Russia and India.
2010-03-23 02:10:58 -07:00
Dan Williams
bcfb75d88d core: grab probed QCDM ports for plugins where they are useful 2010-03-23 01:36:00 -07:00
Dan Williams
c36aacee0a qcdm: use tcsetattr/tcgetattr for better compatibility
With Alpha, mainly.
2010-03-22 22:28:36 -07:00
Dan Williams
76130862ed core: cleanly disable modems on shutdown 2010-03-22 15:41:14 -07:00
Dan Williams
9e8a0fda9f option/hso: ensure unsolicited messages get turned off on disable 2010-03-22 15:05:45 -07:00
Dan Williams
7a5ba2e099 option/hso: make use of unsolicited access technology signals 2010-03-22 15:03:58 -07:00
Dan Williams
282ba6561e gsm: fix argument validation in SetAllowedMode 2010-03-22 14:56:47 -07:00
Dan Williams
6ab36bacf3 qcdm: add ZTE signal strength request 2010-03-22 13:03:53 -07:00
Dan Williams
7fbe4d8383 cdma: check SPSERVICE and SPERI when getting registration state 2010-03-22 00:28:21 -07:00
Dan Williams
3b32e2a679 cdma: check for +SPSERVICE and $SPERI
Which are Sprint-specific commands which appear to be implemented by
various phones for getting access technology and roaming status.
2010-03-21 17:50:45 -07:00
Dan Williams
6598d2ef7f core: parse the right thing on QCDM version info response 2010-03-21 17:48:19 -07:00
Dan Williams
96f5400cc9 core: fix error when unescaping QCDM packet fails 2010-03-21 17:47:15 -07:00
Dan Williams
f3e660444c core: fix 64-bit build error in QCDM packet decapsulation 2010-03-20 00:58:14 -07:00
Dan Williams
88c1423838 qcdm: clarify note about CM state vs. roam/mode pref values 2010-03-20 03:53:44 -07:00
Dan Williams
c03556f820 qcdm: fix up testcase output 2010-03-20 03:53:31 -07:00
Dan Williams
2e62a2e0a6 core: probe ports for QCDM capability too 2010-03-20 03:39:10 -07:00