Age | Commit message (Collapse) | Author |
|
We no longer need to complete in idle, because the limitation imposed by the
serial port methods no longer exists.
|
|
|
|
|
|
Icera-based modems need to return a correct response to the AT%IPSYS? command,
so that they are properly detected as being Icera-based.
Now, some modems, like the Nokia 21M-02, don't seem to return a correct response
to AT%IPSYS just after being plugged in. So, setup a retry mechanism (3 retries,
with 2 seconds between retries) to try to cope with this issue.
https://bugs.freedesktop.org/show_bug.cgi?id=85012
Logs from the error situation:
[mm-port-serial-at.c:440] debug_log(): (ttyACM0): --> 'ATE1 E0<CR>'
[mm-port-serial-at.c:440] debug_log(): (ttyACM2): --> 'ATE1 E0<CR>'
[mm-port-serial-at.c:440] debug_log(): (ttyACM1): --> 'ATE1 E0<CR>'
[mm-port-serial-at.c:440] debug_log(): (ttyACM0): <-- 'E0'
[mm-port-serial-at.c:440] debug_log(): (ttyACM0): <-- '<CR><CR><LF>ERROR<CR><LF>'
[mm-serial-parsers.c:364] mm_serial_parser_v1_parse(): Got failure code 100: Unknown error
[mm-port-probe-at.c:43] mm_port_probe_response_processor_is_at(): Parsing AT got: 'Unknown error'
[mm-port-probe.c:155] mm_port_probe_set_result_at(): (tty/ttyACM0) port is AT-capable
[mm-port-serial-at.c:440] debug_log(): (ttyACM2): <-- 'ATE1 E0'
[mm-port-serial-at.c:440] debug_log(): (ttyACM1): <-- ' E0'
[mm-port-serial-at.c:440] debug_log(): (ttyACM2): <-- '<CR>'
[mm-port-serial-at.c:440] debug_log(): (ttyACM1): <-- '<CR><CR><LF>ERROR<CR><LF>'
[mm-serial-parsers.c:364] mm_serial_parser_v1_parse(): Got failure code 100: Unknown error
[mm-port-probe-at.c:43] mm_port_probe_response_processor_is_at(): Parsing AT got: 'Unknown error'
[mm-port-probe.c:155] mm_port_probe_set_result_at(): (tty/ttyACM1) port is AT-capable
[mm-port-serial-at.c:440] debug_log(): (ttyACM2): <-- '<CR><LF>OK<CR><LF>'
[mm-port-probe.c:155] mm_port_probe_set_result_at(): (tty/ttyACM2) port is AT-capable
[mm-port-serial-at.c:440] debug_log(): (ttyACM0): --> 'AT%IPSYS?<CR>'
[mm-port-serial-at.c:440] debug_log(): (ttyACM1): --> 'AT%IPSYS?<CR>'
[mm-port-serial-at.c:440] debug_log(): (ttyACM2): --> 'AT%IPSYS?<CR>'
[mm-port-serial-at.c:440] debug_log(): (ttyACM0): <-- 'AT%IPSYS?'
[mm-port-serial-at.c:440] debug_log(): (ttyACM0): <-- '<CR>'
[mm-port-serial-at.c:440] debug_log(): (ttyACM1): <-- 'AT%IPSYS?'
[mm-port-serial-at.c:440] debug_log(): (ttyACM1): <-- '<CR><CR><LF>ERROR<CR><LF>'
|
|
But keep the retries when the frame marker isn't found.
https://bugzilla.gnome.org/show_bug.cgi?id=708861
|
|
The new 'ID_MM_PORT_IGNORE' tag will tell ModemManager to fully avoid using a
given port.
Note that it is key to not only flag the port probe as ignored, but also to
fully ignore the ports in e.g. mm_port_probe_list_has_qmi_port() as those
methods will be used to decide which kind of modem object to create. We don't
want to create a QMI-based modem which may have all QMI ports blacklisted.
|
|
|
|
|
|
The 3s wait before opening a MBIM port is not necessary for handling a
delayed response to the MBIM OPEN messages. mbim_device_open() already
retries the MBIM OPEN message when the MBIM device does not respond.
|
|
|
|
Don't just assume that all AT ports are TTYs.
|
|
The QCDM port commands are never cached, so remove the option from the command()
method. Will also simplify command caching afterwards as it will be an AT-only
thing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Make sure we cleanup the 'buffer-full' signal handler when moving from AT
probing to QCDM probing, so that we don't try to remove a signal handler from
a QCDM port in which we haven't set it.
E.g. avoids:
ModemManager[1493]: <debug> [1390731359.108502] [mm-port-probe.c:239] mm_port_probe_set_result_qcdm(): (tty/ttyHS2) port is QCDM-capable
(ModemManager:1493): GLib-GObject-WARNING **: gsignal.c:2585: instance '0x7431b0' has no handler with id '16'
|
|
|
|
It is no longer used since commit 736aa0d2d.
|
|
Icera-based Nokia modems may reply correctly to the Icera probing only in some
AT ports, not in all. In order to handle this situation we override the final
plugin selected to be the Icera-based one if we find that the mismatched plugins
have the 'icera-allowed' and 'icera-forbidden' filters.
https://bugzilla.gnome.org/show_bug.cgi?id=703022
|
|
Don't just close the port and forget, really wait to get the CLOSE response
before going on.
|
|
|
|
|
|
|
|
We remove "/SRC/AMSS" as a hint of non-AT port, as it really comes in ATI
replies, see:
[mm-at-serial-port.c:408] debug_log(): (ttyUSB6): <-- '<CR><LF>Manufacturer: Sierra Wireless, Incorporated<CR><LF>Model: USB 306<CR><LF>Revision: M3_0_10_1AP C:/WS/FW/M3_0_10_1AP/MDM8200/SRC/AMSS 2010/03/29 17:52:11<CR><LF>IMEI: xxxxxxxx<CR><LF>IMEI SV: 11<CR><LF>FSN: xxxxxxxxxx<CR><LF>3GPP Release 7<CR><LF>+GCAP: +CGSM,+DS,+ES<CR><LF><CR><LF><CR><LF>OK<CR><LF>'
[mm-serial-parsers.c:188] mm_serial_parser_v1_parse(): Got response filtered in serial port: Not an AT response
[mm-port-probe.c:148] mm_port_probe_set_result_at(): (tty/ttyUSB6) port is not AT-capable
|
|
Remove the additional check for AT responses done *after* having parsed the
response. This check only worked whenever the response string ended up matching
one of the regular expressions in the parser, which of course wasn't always.
|
|
We will check each string with our custom filter before even trying to
parse them. A MM_SERIAL_ERROR_PARSE_FAILED error will be issued whenever the
string doesn't match the filter.
|
|
Also report as non-AT responses if the NUL bytes are embedded within a stream
of bytes which doesn't start with NUL. This e.g. applies to CnS ports from
Sierra modems, which show streams like:
~\0\245y\0}^T1_0_4_0BT R372 CNSZXD00000061 2011/05/12 15:25:25\0\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0T1_0_4_0AP R372 CNSZXD00000061 2011/05
/12 15:25:25\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
03\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0~~
\0Tb\0T1_0_4_0AP R372 CNSZXD
|
|
When the serial port buffer gets full of non-AT garbage during port probing,
we were re-scheduling the next probing step, which is completely wrong, as we
then would be processing the same probing task twice. If we get a buffer full,
just cancel the AT probing cancellable, which would cancel not only the possible
AT probings, but also the custom init if there is any.
Also, make sure that the custom_init() of the plugins out there don't return an
error if the GCancellable is cancelled. Cancelling the GCancellable means we
should just stop the custom_init(), and actually sending an error in
custom_init() means that the port should be set as unsupported by the plugin, so
completely different things.
Should fix https://bugzilla.gnome.org/show_bug.cgi?id=696695
|
|
|
|
'info' log level, the default if none specified, included too many logs which
aren't that useful, to try to minimize the noise we produce by default.
|
|
If we read a response that indicates the port is definitely not an
AT capable port, stop AT probing. Certain ports that use proprietary
protocols or other non-AT protocols tend to spew data at us, so when
this happens we can cut probing short.
|
|
Signal was attached with user_data as MMPortProbe*, but
serial_buffer_full() treated user_data as a PortProbeRunTask*.
Hillarity ensued.
|
|
Sierra devices often have limited AT parsers on their APP ports
which reply with OK to any command they don't understand, and
thus we need to actually check for a valid IPSYS reply instead of
just checking whether the IPSYS request completed without error.
Previously MM would detect Icera capability on devices that
didn't actually have it.
|
|
The kernel drivers expect this mode, so make sure we set it.
|
|
For those who don't care about the QMI support through libqmi-glib, or if you're
stuck with glib 2.30 (libqmi-glib requires 2.32), this configure switch allows
disabling the QMI support completely.
The logic to detect cdc-wdm ports is still in place, but the QMI probing is
never launched at them. Also, all QMI-related objects won't be compiled.
|
|
This is the port to git master of the following commit:
commit 01201860de5565a78823913423c6b2a762e3731f
Author: Dan Williams <dcbw@redhat.com>
Date: Tue Aug 28 21:12:14 2012 -0500
core: speed up QCDM probing a bit
The point of sending two "version info" commands was to ensure that
the terminating 0x7E of the first one was processed as a QCDM frame
boundary and that any random data in the buffer (like AT commands
from probing) got cleared out. The second command would always
get processed as a valid QCDM command if the device supported QCDM,
since there was no garbage before it.
Instead of that dance, just prepend the version info message with
an extra 0x7E to ensure a clean QCDM frame which the device hopefully
responds to immediately. Second, actually process that response
instead of throwing it away. Should save about 3 seconds when
probing QCDM ports.
|
|
This is the port to git master of the following patch:
commit 21e66dfa1774ac2ee037ac8b6e8bb4d71a6f7931
Author: Dan Williams <dcbw@redhat.com>
Date: Thu Aug 23 21:13:35 2012 -0500
core: add function to open probe ports without removing echo
Some devices (Sierra GSM ones) return stuff we need but don't
bother to prefix it with <CR><LF>, so we need to optionally turn
off the echo removal at probe time.
|
|
|
|
|
|
We'll try to cope with getting devices being reported in either 'usb' or
'usbmisc', trying to avoid the need of checking kernel version during runtime.
|
|
|
|
Some devices may export cdc-wdm ports talking AT. We need to explicitly check
for QMI protocol support on the cdc-wdm ports before assuming they are QMI.
|
|
|
|
Commands treated as 'raw' won't get the 'AT' prefix and will also not get the
trailing carriage return.
|
|
|