Commit Graph
100 Commits
Author SHA1 Message Date
Dan Williams 1c14ca7262 libwmc: remove it
The WMC protocol was only present on older Panasonic/Verizon devices
from the 2006 - 2011 timeframe. The last device to support WMC was
the UML290 which also supported QMI (which is much more functional).
ModemManager also never used WMC support and it was never significantly
reverse engineered.

So remove WMC code from git; it'll still be in the history if anyone
cares in the future.
2019-04-02 11:20:11 -05:00
Dan Williams 88fac7f14a build: fix -Wunused-but-set-variable support and handle clang better
By default the build used -Wno-unused-but-set-variable but that's
clearly not what we want. Fix those problems.

When using clang, the compiler doesn't error on unknown compile
options, so let's add -Werror to the checking too.

CC='clang'
configure:3408: checking for gcc
configure:3435: result: clang
...
configure:17644: checking whether gcc understands -Wno-unused-but-set-variable
configure:17657: clang -c -Wall -std=gnu89 -g -O2 -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wstrict-prototypes -Wno-unused-parameter -Wno-sign-compare -Wno-deprecated-declarations -Wno-unused-but-set-variable  conftest.c >&5
warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Wunknown-warning-option]
1 warning generated.
configure:17657: $? = 0
configure:17666: result: yes

Reported-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
2019-04-02 10:48:40 -05:00
Dan Williams 397faef3c5 mm-common-helpers: add mm_autoptr helpers for GRegex and GMatchInfo
Alias them to g_autoptr() on glib >= 2.44, otherwise re-implement.
2018-12-04 17:39:15 +00:00
Dan Williams e5f65d1b27 port-serial: don't allow opens when a port is connected 2018-10-16 17:09:21 +00:00
Dan Williams 627303a748 api/libmm-glib/cli: add AudioPort and AudioFormat properties to the Call object 2018-10-16 17:09:21 +00:00
Dan Williams 67ecad51e1 filter: add 'nozomi' and 'qcaux' drivers to MM_FILTER_RULE_TTY_DRIVER
nozomi and qcaux only drive modems and thus should be included
in this filter rule.  Allows nozomi/qcaux devices to work
automatically with strict filter mode.
2018-05-24 10:00:10 -05:00
Dan Williams aecc3e99a0 include: fix up whitespace 2018-05-24 10:00:10 -05:00
Dan Williams b074a2b4a4 include: add more 3GPP errors
From 3GPP TS 27.007 version 11.6.0 Release 11, sections 9.2.1,
9.2.2.1, 9.2.2.2, and 9.2.2.3.
2018-05-22 12:03:28 -05:00
Dan Williams dce0752743 iface-modem-3gpp: don't force auto registration if already registered
In mm_iface_modem_3gpp_register_in_network() when deciding whether to
force automatic registration or not, check whether the modem is already
registered in a network.  Just checking whether we have a valid operator
code is not sufficient, as some modems (ublox Toby R2xx) don't always
return an operator name/code even when registered.
2018-02-08 11:54:32 -06:00
Dan Williams 3e15dc15ef bearer-mbim: don't crash when modem doesn't send gateways
When the Ericsson F5321 with firmware R3C11/R4D04 is told to make
an IPv6-only connection, it reports that it has IPv4 configuration
but then returns no actual addresses.  Check both the flags and
actual data before trying to use them.

ModemManager[25850]: <debug> [1506958721.914717] IPv4 configuration available: 'address, gateway, dns, mtu'
ModemManager[25850]: <debug> [1506958721.914731]   IP addresses (0)
ModemManager[25850]: <debug> [1506958721.914741]   DNS addresses (0)
ModemManager[25850]: <debug> [1506958721.914748]   MTU: '0'
ModemManager[25850]: <debug> [1506958721.914758] IPv6 configuration available: 'address, dns, mtu'
ModemManager[25850]: <debug> [1506958721.914767]   IP addresses (1)
ModemManager[25850]: <debug> [1506958721.914852]     IP [0]: 'fe80::39:f622:7d01/64'
ModemManager[25850]: <debug> [1506958721.914866]   DNS addresses (2)
ModemManager[25850]: <debug> [1506958721.914883]     DNS [0]: 'fd00:976a::9'
ModemManager[25850]: <debug> [1506958721.914896]   MTU: '1500'
ModemManager[25850]: <debug> [1506958721.914947] (wwp0s20u1i6): port now connected
2017-10-02 10:49:32 -05:00
Dan Williams e37e81c2e4 broadband-modem-qmi: allow prefix match for Modem images ending with '?'
Assume that a modem image build_id "02.08.02.00_?" matches a pri build_id
of "02.08.02.00_ATT" or "02.08.02.00_GENERIC".
2017-06-14 20:22:49 -05:00
Dan Williams f3cc78ef02 broadband-modem-qmi: ensure PLMN name is UTF-8
Some Telit modems apparently sometimes report non-UTF8 characters.
2017-04-24 22:37:46 -05:00
Dan Williams 75d9c0bc95 broadband-modem: open QCDM port for CDMA Serving System checking when needed 2017-04-17 11:59:13 -05:00
Dan Williams 5c94c8cc6d broadband-modem: open QCDM port for Call Manager state checking when needed 2017-04-17 11:59:13 -05:00
Dan Williams 3901ceade1 broadband-modem: open QCDM port for HDR state checking when needed 2017-04-17 11:59:13 -05:00
Dan Williams 355a594223 broadband-modem: open QCDM port for access tech checking when needed 2017-04-17 11:59:13 -05:00
Dan Williams aa87775a81 broadband-modem: open QCDM port for signal checking when needed 2017-04-17 11:59:13 -05:00
Dan Williams 977d5ac6ce broadband-modem-novatel: $NWRSSI can report lower values than -115
My E725 reported 125 once; that's a valid dBm and MM shouldn't report
an error when parsing it.
2017-04-17 11:59:12 -05:00
Dan Williams dedc1f15c7 broadband-modem-novatel: clean up detailed registration state handling
Allocate the results instead of passing them back on the stack, which removes
the "can't complete in idle" restriction.  Also always open the QCDM port
since we can't assume it will be open already at this point.
2017-04-17 11:59:12 -05:00
Dan Williams 77fbcf534b broadband-modem-novatel: clean up access technology reporting
Instead of mixing the QCDM Novatel Snapshot code directly into the
access technology checking code, split it out with its own async
result.  At the same time, make sure to open the QCDM port when
it's needed, instead of assuming its already open.  Since it won't
always be.
2017-04-17 11:59:12 -05:00
Dan Williams 8c04cc0367 telit: fix AT+SERVICE 3GPP2 access technology reporting
Looks like a C&P error from the AT#PSNT codepath; all the docs
I can find indicate that AT+SERVICE returns only an integer and
no commas:

<debug> (ttyUSB2): --> 'AT+SERVICE?<CR>'
<debug> (ttyUSB2): <-- '<CR><LF>+SERVICE: 3<CR><LF><CR><LF>OK<CR><LF>'
<debug> Couldn't refresh access technologies: 'Failed to parse +SERVICE response: '+SERVICE: 3''
2017-04-06 17:09:39 -05:00
Dan Williams 230e732a24 iface-modem-3gpp: use mm_3gpp_parse_operator_id() instead of custom code 2017-03-17 22:48:39 -05:00
Dan Williams 8c3312918a bearer-qmi: add WDS event reporting support
Don't do anything with the events yet, but at least turn them on
and capture them in debug logging.
2017-03-01 12:57:48 -06:00
Dan Williams bf27e44caf broadband-modem: fix QCDM access tech reporting for WCDMA system modes
Two issues here:

1) PCH_SLEEP wasn't considered a "wcdma_open" state, but it should be
since the modem is still registered and can be attached in this state

2) If the system mode is WCDMA (eg, not GSM and not GSM/WCDMA) then
MM shouldn't assume GPRS if WCDMA isn't "open", since GPRS isn't
enabled in WCDMA-only mode

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100000
2017-02-28 13:44:48 -06:00
Dan Williams cec01fdaf6 libqcdm: fix WCDMA L1 Manager states
The enum was wrong.  There isn't actually an L1M_INIT state; the
enum should start with L1M_IDLE.  There should also be a
L1M_PCH_SLEEP state between DEACTIVATE and DEEP_SLEEP.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100000
2017-02-28 13:44:46 -06:00
Dan Williams ab48dc5b17 telit: add LTE access technology reporting 2017-01-28 21:54:13 -06:00
Dan Williams 14ccde2b5f huawei: handle some weird SYSCFG acquisition orders
<debug> (ttyUSB2): --> 'AT^SYSCFG?<CR>'
<debug> (ttyUSB2): <-- '<CR><LF>^SYSCFG:14,2,400380,1,2<CR><LF><CR><LF>OK<CR><LF>'
<warn>  couldn't load current allowed/preferred modes: 'No SYSCFG combination found matching the current one (14,2)'

14,2 means "WCDMA-only; acquire WCDMA then GSM" which is somewhat
non-sensical. The supported modes parsing doesn't generate this
combination because it doesn't really make sense, so current mode
matching failed. Just fix up the non-sensical acquisition order
to 0 (automatic).
2016-10-05 09:14:44 -05:00
Dan Williams 546d33db6c broadband-modem-huawei: fix missing return in unsolicited voice message enable 2016-09-08 11:29:00 -05:00
Dan Williams 03a6d969ab broadband-modem-huawei: implement Modem.Signal extended signal info interface
Implement the detailed signal info interface for some Huawei 3GPP modems
including those based on HiSilicon chipsets like the E3276.  Known not to
work on many Qualcomm-based Huawei modems like E392, E397, and E367 as
they don't support the ^HCSQ command, but they do support QMI and so
have access to the extended signal interface via QMI.
2016-08-31 09:43:32 -05:00
Dan Williams 2306a466c8 api,signal: fix LTE signal dictionary docstring 2016-08-12 12:05:51 -05:00
Dan Williams f33ea91ccf base-call: formatting cleanups 2016-08-02 16:27:56 -05:00
Dan Williams 5350b9f568 broadband-modem/libqcdm: add signal strength from QCDM EVDO Pilot Sets log messages
When a CDMA-only modem is registered with the EVDO network, its not possible to
read signal strength in the following cases:

1) while a data connection is active on single-AT-port modems, because the AT
port is used for PPP and not available for AT+CSQ, AT+CIND or vendor-specific
signal strength commands

2) when the modem reports only CDMA 1x signal strength with AT+CSQ

Now that we have a reasonable interpretation of RSSI from the QCDM
EVDO Pilot Sets V2 log messgae, use that when other means of getting
signal strength aren't available.
2016-07-27 10:44:43 -05:00
Dan Williams 803caab80a libqcdm: add HDR Pilot Sets V2 log item structures
Apparently I was looking at this in 2012:
https://blogs.gnome.org/dcbw/2012/11/14/got-evdo-help-me-out/

So why not at least get the structures into libqcdm and figure
out a rough correlation between pilot energy and EC/IO.
2016-07-20 11:40:42 -05:00
Dan Williams 48f0210739 bearer-mbim: use the context IP type MM asked to be activated instead of modem response
MM never passes MBIM_CONTEXT_IP_TYPE_DEFAULT which would require paying
attention to the ip_type in the reply to figure out what type the modem
activated.  Instead, MM always specifies the ip_type it wants to activate,
and some modems (K5160) return a different type in the response.  The modem
is required to activate the type MM asks for or return an error, so if
the activation was successful we can safely assume the modem activated
the ip_type we want, and we can ignore the ip_type in the response.
2016-07-11 11:02:53 -05:00
Dan Williams 8080be8209 broadband-bearer-mbim: log context IP type when connecting 2016-06-15 14:16:52 -05:00
Dan Williams 182cf1fa89 iface-modem-firmware: clarify log message about unsupported firmware interface 2016-06-01 12:12:47 -05:00
Dan Williams f232afffe9 broadband-modem: document why firmware/OMA interfaces are left enabled in FAILURE state 2016-06-01 11:34:13 -05:00
Dan Williams 55f3ab8083 merge: fix various mbm-related connect/disconnect issues (fdo #95302) (fdo #95304)
https://bugs.freedesktop.org/show_bug.cgi?id=95302
https://bugs.freedesktop.org/show_bug.cgi?id=95304
2016-05-27 12:39:56 -05:00
Dan Williams ba097f1a43 broadband-bearer-mbm: connect errors should trigger a disconnect
Otherwise we may leave a bearer connected when ModemManager doesn't
think it's connected.  Prevents a CME ERROR 277 loop on connect when
the bearer hasn't been torn down correctly.
2016-05-27 12:30:06 -05:00
Dan Williams 5c3461ff9c broadband-bearer-mbm: wait for disconnect to complete
Wait for either an E2NAP unsolicited disconnect status or (for older
devices) an ENAP poll response before completing the disconnect.
Otherwise the client may start connecting again (such as
NetworkManager autoconnect retry) and the unsolicited E2NAP may
abort it, or the modem may return CME ERROR 277 ("not disconnected
yet") for the next connection attempt.

https://bugs.freedesktop.org/attachment.cgi?id=123525
2016-05-27 12:30:05 -05:00
Dan Williams 9cc851954d broadband-bearer-mbm: simplify dial_3gpp connection setup flow
There are a few key parts to this patch:

1) move the poll id into the Dial3gppContext structure as it is
conceptually part of the connection context data.  This simplifies
context cleanup by keeping the poll id cleanup in one place.

2) move unsolicited connection status (E2NAP) handling into the
normal connection codepath, instead of completing the connection
context from the report_connection_status() E2NAP handler.  This
simplifies connect code by not requiring checks for a NULL context
everywhere, and allows us to pass the Dial3gppContext structure
around instead of the Bearer object, since the Dial3gppContext
will never be comleted/freed outside the normal connection flow
codepaths like GLib idles and AT command requests.

3) use the connect context cancellable for all AT command requests
in the connect path.  This lets us use the error return from
mm_base_modem_at_command_full_finish() to handle cancellation and
also not bother listening to the 'cancelled' signal of the
cancellable, since we can just check for cancellation the next time
the ENAP poll function runs.

https://bugs.freedesktop.org/show_bug.cgi?id=95304
2016-05-27 12:30:05 -05:00
Dan Williams 830b6ebca8 broadband-bearer-icera: deactivate context before authentication
If the modem thinks a PDP context is already active it'll return
583 errors from IPDPCFG and IPDPACT until the context is
deactivated.  Deactivation was previously done after authentication,
but needs to be done before any part of the connect process to
ensure the PDP context is inactive.

The previous approach worked only if the context was being
deactivated already (which can take a bit of time) because it would
be deactivated after a few seconds and the connect could continue.
This approach works for more cases (like a MM crash and restart
while the modem is connected).
2016-05-24 09:35:49 -05:00
Dan Williams f5a061efbf bearer-mbim: fine-tune bearer IP method reporting
v4: modems/providers may not return DNS servers and not all modems
support DHCP, so lack of DNS servers should not indicate a bearer
IP method of "DHCP".  IP config daemon/scripts already have to handle
missing DNS anyway.

v6: IPv6 requires SLAAC or DHCPv6 as part of the specification, so for
now we assume modems will support it.  Provide all the info the modem
sent, but if there is any missing information use an IP method of
"DHCP" to indicate that info should be obtained via SLAAC/DHCPv6.  Only
use an IP method of "STATIC" when all basic properties are given by
the modem.
2016-05-03 11:39:19 -05:00
Dan Williams 80ce59385f bearer-qmi: listen for Packet Service Status indication and handle disconnection
Hook up to the WDS Packet Service Status indication, listen for
disconnection events, and disconnect the bearer when we get one.
2016-04-15 11:49:03 -05:00
Dan Williams 1ae6a7be8a build: work around automake-1.15 & intltool complaining about translations in build dir
make distcheck runs a build in dist directory subtirs and then runs intltool -m
which in turn complains about translations in a built file:

  The following files contain translations and are currently not in use. Please
  consider adding these to the POTFILES.in file, located in the po/ directory.

    sub/data/org.freedesktop.ModemManager.policy.in

The issue is reported to intltool upstream already:
https://bugs.launchpad.net/intltool/+bug/1117944
2016-03-15 16:17:42 -05:00
Dan Williams 0a9cbf65ea modem-helpers: fix handling split PDP context ID reporting in CGDCONT=? response
Cinterion PHS8-US devices send split PDP context ID like "(1-17,101-112)" and
that caused the modem-helpers to choke.
2016-03-15 10:34:28 -05:00
Dan Williams a9b69d210d huawei: use AT^DHCP response if available for NDISDUP-capable devices
For non-QMI/non-MBIM Huawei devices that use HiSense chipsets,
the recommended way to create the connection is to use NDISDUP
and either DHCP on the net interface, or the ^DHCP command.
There are some reports of devices that connect successfully, but
don't respond to DHCP requests on the interface.  Try to get
IP addressing info from the device via ^DHCP and fall back to
telling clients to use actual DHCP if that fails.

https://bugzilla.redhat.com/show_bug.cgi?id=1254886
2016-03-13 13:25:19 +01:00
Dan Williams 9cb0b22f91 broadband-modem-qmi: fix compile errors with newest QMI commands enabled 2016-02-11 11:09:54 -06:00
Dan Williams 232d4d4aae broadband-bearer: don't send disconnect CGACT on data port for multi-port modems
A Huawei E173 (with FW 11.126.15.00.445) seems to stop responding on the
primary port (ttyUSB2) when the CGACT is resent on the data port (ttyUSB0).
The CGACT-on-data-port was originally added as a fallback attempt to get
single-port modems to disconnect when all other methods failed.

For single-port modems, the primary port is also the data port so this
patch will have no effect.

For multi-port modems, this patch will retry the CGACT on the primary
port which has a higher chance of success because we already know
the primary port is talking to us, while the data port may still
be stuck in PPP mode.
2016-02-11 10:46:17 -06:00
Dan Williams 0512a820cd libmm-glib: make C++ happy by not using 'class' 2016-01-20 17:06:33 -06:00
Dan Williams 98c58ca64b bearer-qmi: print IP details at 'info' log level 2016-01-19 17:19:22 -06:00
Dan Williams 99ae677789 libqcdm: fix mixed whitespace in test-qcdm.c 2016-01-13 15:31:59 -06:00
Dan Williams 3129516736 broadband-modem-qmi: implement power-cycle reset functionality 2015-11-11 12:38:49 -06:00
Dan Williams 3f3ad507e2 sim-qmi: load operator identifier and name from NAS home network 2015-10-25 15:11:37 +01:00
Dan Williams 267b13c231 api: correct description of SimIdentifier property
In MM 0.6 days it used to be obfuscated, but that was pointless.  Now
it's just the ICCID.
2015-10-22 17:13:31 -05:00
Dan Williams 7cb3b3faad broadband-modem-qmi: update access technology from signal info for newest QMI commands 2015-09-24 14:54:45 -05:00
Dan Williams a8666bd98f sierra: fix build error when MBIM and QMI are disabled
Found by Jean-Christian de Rivaz
2015-09-24 14:17:03 -05:00
Dan Williams 2034918d7b broadband-modem-mbim: disable CDMA capabilities until we actually support MBIM+CDMA
CDMA-capable modems (like a Sierra EM7355) will fail to even enable,
because the internal CDMA code tries to initialize using AT commands and
that fails because many MBIM modems don't have an AT port.  We should
figure out how to support minimal MBIM + CDMA using MBIM instead of
AT-anything.

[mm-broadband-modem.c:9000] enabling_step(): Modem has CDMA capabilities, enabling the Modem CDMA interface...
[mm-iface-modem-cdma.c:946] mm_iface_modem_cdma_run_registration_checks(): Running registration checks (CDMA1x: 'yes', EV-DO: 'yes')
[mm-broadband-modem.c:7397] setup_registration_checks_context_complete_and_free(): Will skip all QCDM-based registration checks
[mm-broadband-modem.c:7418] setup_registration_checks_context_complete_and_free(): Will skip generic detailed registration check, we don't have Sprint commands
[mm-iface-modem-cdma.c:768] registration_check_step(): Starting QCDM-based registration checks
[mm-iface-modem-cdma.c:780] registration_check_step():   Skipping all QCDM-based checks and falling back to AT-based checks
[mm-iface-modem-cdma.c:823] registration_check_step(): Starting AT-based registration checks
[mm-iface-modem-cdma.c:641] get_service_status_ready(): Could not get service status: No AT port available to run command
[mm-iface-modem.c:1392] __iface_modem_update_state_internal(): Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabling -> disabled)
2015-08-31 10:49:16 -05:00
Dan Williams 9b051b14ed iface-modem: don't check the cache when asking for required unlocks
When passing known_lock=UNKNOWN to mm_iface_modem_update_lock_info()
we actually do want to ask the modem itself for locks instead of
checking the cache.  For example, when an unknown error is returned
after performing PIN/PUK operations, the cache value may well be
NONE if that was the prior lock state, and that bypasses the modem
which might now be locked.  Thus the state gets messed up.

Reproducer is to send 'ChangePin' with the wrong "old" PIN 3 times,
then send a wrong PUK.  No error was returned from mmcli and
the modem's lock state was shown as 'none'.
2015-07-20 12:24:22 -05:00
Dan Williams ad2c2ad14c blacklist: ignore POSNET POLSKA S.A. devices 2015-07-02 10:30:58 -05:00
Dan Williams 9293fd2bca base-manager: quiet message about unsupported ports
This message gets printed for all netdevs and ttys, including most
machines normal ethernet/Wi-Fi interfaces.  It seems a bit less critical
than 'warning' level would indicate.

ModemManager[32097]: <warn>  Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:19.0': not supported by any plugin
ModemManager[32097]: <warn>  Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:1c.1/0000:02:00.0': not supported by any plugin
2015-03-31 11:25:35 -05:00
Dan Williams 9186e2aa39 iface-modem-3gpp: used DENIED registration state if others are UNKNOWN
If all other registration states are UNKNOWN, use a registration state
of DENIED as the global modem state.
2015-02-23 10:25:14 -06:00
Dan Williams 086a10ede0 blacklist: ignore PalmOS devices driven by 'visor'
MM probing appears to make 'visor' module die; and anyway
most of the devices driven by 'visor' are not phones, and
of the 3 that are phones they are so old (2002 - 2005 era)
that nobody is likely using them for dialup anymore.

http://www.spinics.net/lists/linux-usb/msg120483.html
2015-01-26 17:05:39 -06:00
Dan Williams 046d9141c4 blacklist: ignore GW Instek AFG-2225 arbitrary waveform generator 2014-10-28 11:46:51 -05:00
Dan Williams 41b7e7b048 port-serial: fix forced closing after b28230411
b28230411 moved up the self->priv->forced_close = TRUE, which
caused mm_port_serial_close() to just return without actually
closing the port and cleaning up.

Also, cancel the reopen separately from closing the port since
the two operations are actually independent of each other.
2014-10-07 16:01:54 -05:00
Dan Williams 0c6f1ae6c4 qmi: always use DHCP for IPv4 configuration instead of STATIC
Some newer modems (Huawei E1750, Sierra 73xx) provide what looks like
legitimate static IPv4 configuration through the WDSGetCurrentSettings
call, but when configured the interface does not pass traffic.  Running
DHCP on the same interface provides a slightly different IPv4
configuration but does allow traffic to pass.

Since QMI was switched to static originally for consistency with IPv6
and for speed of IP configuration (since DHCP takes a bit of time), but
not for any known problems with modems, let's switch back to DHCP until
we have time to figure out what's actually going on.
2014-08-18 09:47:59 -05:00
Dan Williams 8c4318d87a iface-mode: downgrade "access technology changed" message to debug
We have a report of a modem that switches access technologies frequently,
in this case almost every 10 seconds.  While that's unusual, it's not
unexpected depending on the RF environment.  We shouldn't spam syslog
with that info; if we need it we can get it with mmcli.
2014-08-11 10:45:41 -05:00
Dan Williams 31695a3912 build: INCLUDES -> AM_CPPFLAGS to quiet automake warning 2014-08-05 09:52:20 -05:00
Dan Williams 915a5beac0 bearer-mbim: ignore empty DNS server addresses 2014-07-01 16:38:34 -05:00
Dan Williams 6e490944d0 merge: fix IPv6 support and operation
Notable changes include reporting all available IP configruation
information in the bearer IP details, even if the method is DHCP,
in which case the client should apply the given configuration and
then proceed with DHCP/PPP/SLAAC/etc addressing mechanisms.

QMI, MBIM, and some other plugins have been switched to the "STATIC"
configuration method from DHCP when the firmware supplies all the
necessary details.
2014-06-13 14:57:08 -05:00
Dan Williams 02f9b926cd broadband-bearer-mbm: support IPv6 DNS and use static IPv4 configuration 2014-06-13 11:30:49 -05:00
Dan Williams ca0a567f74 broadband-bearer-qmi: support IPv6 configuration and use static for IPv4 2014-06-13 11:30:49 -05:00
Dan Williams 8017628353 cli: print IP details for all valid bearer types
Even DHCP or PPP may have some IP details, like the link-local
address for IPv6 bearers.
2014-06-13 11:30:49 -05:00
Dan Williams 7673a1d3a3 bearer-mbim: use DHCP method when only an IPv6 link-local address is found
When only given a link-local address, then SLAAC must be used to
retrieve the real prefix.
2014-06-13 11:30:49 -05:00
Dan Williams 33eba0393d api: update documentation about IPv6 bearer methods
Even if the IPv6 bearer method is DHCP, the client should use SLAAC
(eg, IPv6 Router Solicitations, Router Adverisements, and possibly
DHCPv6) to determine the correct prefix and DNS information.  In
some cases, even with the DHCP method, and IPv6 "address" will be
given which should be assigned to the data port before beginning
an IP addressing as the mobile network may expect this address
to be used.
2014-06-13 11:30:49 -05:00
Dan Williams 6e5d013eb1 broadband-bearer-sierra: use Icera authentication for Icera devices
Devices with Icera chipsets (USB305) don't support the Qualcomm
proprietary $QCPDPP command, and we must use the Icera command
instead.  Otherwise authenticated bearer creation will fail.
2014-06-13 11:30:49 -05:00
Dan Williams a416d8056c broadband-bearer-icera: add IPv6 support
Split out the %IPDPADDR parsing into a helper and add testcases for it,
and add support for IPv6 handling.  If the returned IPv6 is link-local,
the address should be assigned to the interface and SLAAC performed to
retrieve the actual IPv6 prefix and RDNSS/DNSSD information.
2014-06-13 11:30:49 -05:00
Dan Williams e68d51f439 broadband-bearer: also return IPv6 config if IPv6 context is used
If the subclass doesn't override IP config retrieval, and IPv6 was
used when connecting the bearer, return IPv6 config too.
2014-06-13 11:30:49 -05:00
Dan Williams e9395d83e3 broadband-bearer: pass the IP family to subclasses when getting IP config
Subclasses may need to know which IP families were used for the setup
so they can return the correct IP configuration.  We can't just use
the MMBearer default_ip_family becuase that isn't the family that
was actually used during the connection.
2014-06-13 11:30:49 -05:00
Dan Williams 502a5dbaf5 broadband-bearer-sierra: use correct modem type when creating bearer
MMBroadbandModemSierraIcera is not a subclass of
MMBroadbandModemSierra, so we cannot cast it to that type when
passing it to bearer creation.  Luckily the bearer doesn't
care, so just downgrade the type to MMBroadbandModem.
2014-06-13 11:30:49 -05:00
Dan Williams 1e30bad174 libmm-glib: always return all bearer properties
IPv6 may have addresses and other information even if the bearer's
method is DHCP.
2014-06-13 11:30:48 -05:00
Dan Williams aedcb376a8 iface-modem: make "signal quality updated" log message debug not info
Otherwise your logs fill up if the signal quality changes, which is
pretty frequently for many devices.
2014-06-04 14:11:16 -05:00
Dan Williams 66e4b0d603 api,errors: define new EPS-related errors
We can use these to return better error messages if an operator
does not support the default subscription APN functionality,
and the user does not give us an APN.
2014-05-07 16:19:00 -05:00
Dan Williams 8e3b67bf44 broadband-bearer-qmi: don't set APN if it isn't given
If the APN was empty (implying that the modem/network should choose
the default APN) this caused an assertion in libqmi.  Just don't
set an APN if we aren't given one.
2014-05-07 16:18:11 -05:00
Dan Williams e3bebc85c4 libmm-glib: deep-copy ports array in ensure_internal_ports() (bgo #724900)
ensure_internal_ports() didn't deep-copy the ports array, which
meant that anything calling mm_modem_port_info_array_free() was
freeing the internal memory owned by MMModem if it retrieved
the array with mm_modem_get_ports().

https://bugzilla.gnome.org/show_bug.cgi?id=724900
2014-02-27 13:06:04 -06:00
Dan Williams acc7b4b8b9 Revert "broadband-modem-mbim: update to use mbim_message_device_service_subscribe_list"
This reverts commit 8327db70b9.

libmbim change not committed yet...
2014-02-19 18:59:24 -06:00
Dan Williams 9e1472d5ec trivial: fix dist of gsm-port.conf 2014-02-17 12:34:05 -06:00
Dan Williams 50de6798b0 broadband-modem: fix double-free of QCDM mode-pref query
Caused by a merge conflict between 81ee0783 and 529e94b0.
2014-02-13 15:55:35 -06:00
Dan Williams 42ad7b758a manager: make Bluetooth rfcomm ports work again
At some point rfcomm serial ports stopped having parents in sysfs,
so checks to get the physical device fail because the rfcomm port
is /sys/devices/virtual/rfcommX and has no parents.  So we have
to fall back on checking the interface name.
2014-02-13 15:18:16 -06:00
Dan Williams a1ffe805af broadband-modem-huawei: fix CDMA unsolicited response parsing
On at least the EC168C, various unsolicited responses like RSSILVL,
HRSSILVL, and MODE can include an extra Carriage Return:

^MODE: 2<CR><CR><LF><CR><CR><LF>
^RSSILVL:60<CR><CR><LF><CR><CR><LF>
2013-12-09 11:27:27 -06:00
Dan Williams 1b34fe6c51 broadband-bearer-qmi: ensure errors are cleared before re-using them
If the bearer doesn't have one of IPv4 or IPv6 configuration, then the
qmi_message_wds_get_current_settings_output_get_ip*_address() functions
will return FALSE with a filled error, which was not cleared.

This fixes a glib warning message about overwriting an already-filled
GError.
2013-12-01 14:20:19 -06:00
Dan Williams c431fb8208 blacklist/greylist: add more GPS devices (rh #1023234)
Attempt to blacklist entire drivers that we know aren't modems,
and add a sprinkling of specific devices too.
2013-10-25 16:25:14 -05:00
Dan Williams 613155cb2e broadband-modem: report signal quality as 0 when no service/unknown/etc
Instead of using the NO_NETWORK error, which is only ever read
internally by ModemManager and not very useful when reading quality,
just report signal quality as zero.  Before MM 1.0, the signal quality
could be explicitly requested by clients, so the NO_NETWORK error was of
some use, but now that the quality is updated automatically by MM and is
a property instead of a D-Bus method call, the error is pointless.
2013-10-23 19:39:04 -05:00
Dan Williams 0755beff07 mtk: update udev rules to always match both VID/PID together
See commit c79d266e62.

    If the rules to tag specific USB interface numbers only apply on the PID, we'll
    end up seeing that if the port has a parent with another PID, and that other
    PID also has a rule, port will get tagged multiple times.
2013-09-16 11:54:16 -05:00
Dan Williams 872bd3e837 mtk: add D-Link DWM-156 udev rules
For HW version A5 and possibly later, which are based on MediaTek
chipsets instead of Qualcomm ones.
2013-09-16 11:54:16 -05:00
Dan Williams 73978cbe6f sim-huawei: add SIM class to handle ICCID request
Use AT^ICCID if possible to read the ICCID.
2013-09-10 09:42:37 +02:00
Dan Williams 11a7e3dfdf core: add helper for parsing and validating the ICCID 2013-09-10 09:42:36 +02:00
Dan Williams b8e8c2a56d telit: install udev rules 2013-09-06 21:36:01 -05:00
Dan Williams 65f633ab96 build: fix distcheck after Introspection changes 2013-08-14 10:37:45 -05:00
Dan Williams 1d3ec932d5 build: install mm-cdma-manual-activation-properties.h to includes dir 2013-08-08 09:45:16 -05:00