aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-05-30cinterion,location: refactor enable/disable and capabilities checksAleksander Morgado
When checking for location capabilities, we will make sure AT^SGPSS is supported and if it isn't we won't report GPS capabilities. The location enable and disable paths are refactored to make it easier to add possible new GPS commands to use instead of AT^SGPSS, if this isn't supported (e.g. in the PLS8 devices).
2017-05-30plugins: use G_N_ELEMENTS when iterating ports arrayAleksander Morgado
2017-05-30ublox: use send-delay=0 by defaultAleksander Morgado
Looks like the u-blox SARA-U260 requires this, see: https://lists.freedesktop.org/archives/modemmanager-devel/2017-May/004670.html
2017-05-30altair,hso,samsung: setup send-delay=0 for probingAleksander Morgado
The Altair, Option HSO and Samsung plugins all use the send-delay=0 setting once the modem object has been created. For consistency, use the same setting during port probing.
2017-05-29telit: remove custom +CMER enablingAleksander Morgado
This is now managed directly in the generic plugin.
2017-05-29cinterion: remove custom +CMER enablingAleksander Morgado
This is now managed directly in the generic plugin.
2017-05-29broadband-modem: query +CMER format before enabling/disablingAleksander Morgado
Don't blindly try '+CMER=3,0,0,1' to enable and '+CMER=0' to disable Mobile Equipment Event Reporting. We now query the device for the supported formats and use that info to build commands that will work.
2017-05-29helpers: new 'AT+CMER=?' parserAleksander Morgado
2017-05-29cinterion: support changing modes in LTE capable devicesAleksander Morgado
2017-05-29udev: remove default ID_MM_PLATFORM_DRIVER_PROBE whitelistAleksander Morgado
The whitelist made all platform TTYs managed by the 'atmel_usart' kernel driver probed by ModemManager, which isn't something we want, as most of these aren't broadband modems. We leave the logic supporting the ID_MM_PLATFORM_DRIVER_PROBE udev tag as there may be a case where the user does need ModemManager to probe a given platform TTY.
2017-05-29log: remove func loc info unless MM_LOG_FUNC_LOC is definedAleksander Morgado
The user can build the project passing custom CFLAGS to enable the function location information, e.g.: $ ./configure --prefix=/usr CFLAGS="-DMM_LOG_FUNC_LOC"
2017-05-29context: rework application options and help outputAleksander Morgado
Group together all options that allow configuring the logging output, and make them have the same --log-[XXX] prefix. Also rework the --help output so that all option groups are printed by default (i.e. there is no longer a --help-all option).
2017-05-29dell: speed probing time up and reduce udev dependencyCarlo Lobrano
Currently Dell plugin implements a retry logic of three commands (AT+GMI, AT+CGMI, ATI1I2I3) to detect modem's vendor string. Moreover, since Telit modems always reply to the first command, to speed the probing time up, those modem are tagged with an Udev rule so that we can avoid sending the other two commands at all. However, the retry logic is in case a port needs some time to reply, so it makes sense to apply it only to the first command. Then if the port still does not respond with any kind of reply, that probably means that it is not AT capable and we can skip the other AT commands as well. Then, this patch: - sets a maximum number of timeouts for AT+GMI to 3. After this timeouts, the port is considered not AT-capable. - sets AT+CGMI and ATI1I2I3 to be sent only once. - removes Dell udev rule for tagging Telit Modems.
2017-05-29telit: removed ID_MM_TELIT_PORTS_TAGGED dependencyCarlo Lobrano
Currently, Telit plugin depends on ID_MM_TELIT_PORTS_TAGGED environment variable, set by udev, for tagging modems that support dynamic port config (#PORTCFG) To remove this dependency from udev, Telit plugin now relies only on the error management of the command AT#PORTCFG? itself in order to see whether the modem supports it or not.
2017-05-23broadband-modem: don't create sim hot swap ports context multiple timesAleksander Morgado
2017-05-21cinterion: don't enable simstatus URCsAleksander Morgado
When polling for the SIM status, we want to read the value (mode 2) without enabling indications (mode 1).
2017-05-21mbm: fix async method completion enabling unsolicited eventsAleksander Morgado
2017-05-20iface-modem: always complete async context with a valueAleksander Morgado
Just for consistency, this is not a bug per se.
2017-05-18blacklist: ignore default Linux USB Serial GadgetAleksander Morgado
Blacklist the default VID:PID for the Linux USB Serial Gadget in ACM mode: {LINUX}/drivers/usb/gadget/legacy/serial.c #define GS_VENDOR_ID 0x0525 /* NetChip */ #define GS_CDC_PRODUCT_ID 0xa4a7 /* ... as CDC-ACM */ This should never be reused for real products by hardware manufacturers, but anyway... Patch actually ported from downstream Ubuntu: https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/1105352
2017-05-18man: include missing --no-auto-scan and --initial-kernel-eventsAleksander Morgado
And remove --test-no-auto-scan, as the 'no auto scan' feature isn't only a test feature now.
2017-05-15iface-modem: fix setting up signal quality retrieval logicAleksander Morgado
If going directly e.g. from "Searching" to "Connecting", just setup the signal quality retrieval logic right away, don't assume we always go through "Registered" state before starting a connection. Reported-by: <colin.helliwell@ln-systems.com>
2017-05-10ublox: align property values in g_object_new()Aleksander Morgado
2017-05-10ublox: support modems connected to serial portJavier Viguera
Add the vendor string, so it can be probed via AT commands. This allows to support modems that are connected to a serial port. Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-05-10port-serial: add B230400 and B921600 missing baudratesJavier Viguera
So MM can use them when opening a specific serial port. Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-05-10blacklist: add keyboard.io devicesAleksander Morgado
See https://bugs.freedesktop.org/show_bug.cgi?id=85007#c5 Reported-by: Jesse Vincent <jesse@keyboard.io>
2017-05-05port-qmi: fix QMI client allocation procedureAleksander Morgado
Commit 26ee94ec28b6f68 introduced a bug, where we would be completing the client allocation task *before* tracking the new client allocation info in the private tracking list. This meant that if mm_port_qmi_peek_client() was called in the task completion handler, the client object wouldn't be returned, as it wasn't found in the private tracking list. The fix is just to defer the task completion until after the private tracking list is updated. Reported-by: Salvador Penalva <salvador.penalva@digi.com>
2017-04-24broadband-modem-qmi: ensure PLMN name is UTF-8Dan Williams
Some Telit modems apparently sometimes report non-UTF8 characters.
2017-04-24blacklist: add Analog Devices EVAL-ADXL362Z-DBMaksim Salau
Signed-off-by: Maksim Salau <maksim.salau@gmail.com>
2017-04-19telit: give load lock retries steps a descriptive nameCarlo Lobrano
In order to make debug logging more clear, I replaced the step ID with a descriptive step name.
2017-04-19telit: use mm_get_uint_from_hex_str() to parse CSIM hex responseAleksander Morgado
The regex is already limiting the string to 4 hex chars, so we can definitely fit the number in a guint, no need a guint64.
2017-04-19telit: add error_code recognition to +CSIM parserCarlo Lobrano
- Refactored mm_telit_parse_csim_response in order to correctly recognize the following +CSIM error codes: * 6300 - Verification failed * 6983 - Authentication method blocked * 6984 - Reference data invalidated * 6A86 - Incorrect parameters * 6A88 - Reference data not found - Updated correspondent tests. - Finally, some minor changes in other files for better error logging Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100374
2017-04-18core: prefer g_task_return_error_if_cancelled() than custom errorsAleksander Morgado
When the GCancellable is added to the GTask, we can use a single method call to check for the task being cancelled, and complete it right away if so. This patch also clears up the logic in the Novatel plugin, where the code was trying to return "TRUE" when the task was cancelled, but wouldn't work as the check-cancellable flag in the GTask is TRUE by default (i.e. when completing the GTask, if it was cancelled, a G_IO_ERROR_CANCELLED would be returned by default, regardless of any other return value set). This patch also introduces a small variation of the logic in the Cinterion plugin: instead of running SWWAN=0 before completing the async action, the command is now sent just after completion of the async action. This shouldn't be an issue, as the SWWAN result itself is ignored.
2017-04-18broadband-bearer: once connected, set flow control settingsAleksander Morgado
During modem initialization we detected the flow control settings supported by the modem, and selected the best one to use from them, notifying it to the device via AT+IFC. The device was therefore instructed to use that flow control setting for data transmission in the TTY (i.e. not during AT control commands). The missing thing was to also configure ourselves our end of the serial port with the same flow control settings when getting into data mode. By doing it ourselves, we avoid requiring any explicit setting in pppd for flow control; pppd can assume the flow control settings are already the expected ones. Worth noting that all this setup is completely ignored for TTYs exposed directly via USB. https://bugs.freedesktop.org/show_bug.cgi?id=100394
2017-04-18port-serial: remove all default flow control settingsAleksander Morgado
We won't set XON/XOFF by default and we won't allow setting RTS/CTS via a property. The serial port by default starts with no flow control configured.
2017-04-18port-serial: new method to explicitly set flow control settingsAleksander Morgado
2017-04-18port-serial: new internal method to run tcsetattr()Aleksander Morgado
The method takes care of looping if EAGAIN errors happen, as well as checking whether all attributes were set or not.
2017-04-18telit: ignore custom flow control handlingAleksander Morgado
The generic modem object already supports querying for the supported methods and setting the best one found.
2017-04-18wavecom: ignore custom flow control handlingAleksander Morgado
The generic modem object already supports querying for the supported methods and setting the best one found.
2017-04-18broadband-modem: query supported flow control modes before settingAleksander Morgado
Instead of assuming XON/XOFF is supported, we query the supported flow control modes, and then we set the best one based on that, preferring hardware flow control over software flow control.
2017-04-18helpers: new parser for AT+IFC=?Aleksander Morgado
Instead of having the parser return separate list of supported flow controls for TE and TA, we simplify it by only returning those settings that apply to both TE and TA. This logic isn't perfect either, though, as some settings (e.g. '3' in TE in some modems, specifying a different XON/XOFF behavior) may not have a corresponding setting in the other end. The most common cases we care about (i.e. standard XON/XOFF, RTS/CTS) should be properly reported with this logic.
2017-04-17broadband-modem: open QCDM port for CDMA Serving System checking when neededDan Williams
2017-04-17broadband-modem: open QCDM port for Call Manager state checking when neededDan Williams
2017-04-17broadband-modem: open QCDM port for HDR state checking when neededDan Williams
2017-04-17broadband-modem: open QCDM port for access tech checking when neededDan Williams
2017-04-17broadband-modem: open QCDM port for signal checking when neededDan Williams
2017-04-17broadband-modem-novatel: $NWRSSI can report lower values than -115Dan Williams
My E725 reported 125 once; that's a valid dBm and MM shouldn't report an error when parsing it.
2017-04-17broadband-modem-novatel: clean up detailed registration state handlingDan Williams
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-17broadband-modem-novatel: clean up access technology reportingDan Williams
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-15iface-modem-signal: port mm_iface_modem_signal_initialize to use GTaskBen Chan
2017-04-15iface-modem-signal: port mm_iface_modem_signal_enable to use GTaskBen Chan