aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-12-17core,tests: new test to make sure all error codes are supportedAleksander Morgado
Defining the new error codes in the headers is not enough, we also need to add support in the error helpers in order to create proper GErrors with the expected error codes.
2019-12-17core,error-helpers: add missing ME error codesAleksander Morgado
2019-12-16base-bearer: avoid conncheck or stats update while disconnectingAleksander Morgado
We don't want the connection status checks to interfere with the disconnection logic, e.g. if they're both using the same TTY for both things. E.g. the CGACT? from the conncheck gets in the way of the disconnection logic: <debug> [1576037519.710684] Flashing data port (ttyUSB1)... <debug> [1576037519.710740] (ttyUSB1): port attributes not fully set <debug> [1576037520.287636] (ttyUSB1) device open count is 3 (open) <debug> [1576037520.287804] (ttyUSB1): --> 'AT+CGACT?<CR>' <debug> [1576037520.711067] (ttyUSB1) device open count is 2 (close) <debug> [1576037520.711127] (ttyUSB1): running init sequence... <debug> [1576037520.711231] PDP disconnection already sent <debug> [1576037520.711263] Disconnected bearer '/org/freedesktop/ModemManager1/Bearer/0' Instead, fully skip all conncheck and stat updates as long as the modem is not connected. The actual conncheck and stat update timeouts will be removed once completely disconnected, as it was before.
2019-12-16ublox: ignore error when disconnecting last LTE bearerAleksander Morgado
This is required in the TOBY-L2 and TOBY-L4 modules in order to report a proper disconnection, even if there is none in reality. The default LTE bearer is always reported connected while registered in LTE. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/166
2019-12-16include,errors: define +CME ERROR code 151 equal to 171Aleksander Morgado
When the MT detects an attempt to disconnect the last PDN or when the network returns a response message with cause value #49, the "Last PDN disconnection not allowed" error is returned. The numeric error code was changed from 151 to 171 in 3GPP Rel-11, and therefore there are devices out there that would conform to Rel-10 or below and that would report +CME ERROR code 151 instead of 171. Given that 151 isn't defined to a different meaning in the specs, let's define it in the same way as 171.
2019-12-13libmm-glib,3gpp: make MMModem3gppNetwork a boxed typeAleksander Morgado
So that bindings know how to free the list of structs. This commit ends up triggering an API break in the bindings generated via GObject introspection, because the methods to access the items of a MMModem3gppNetwork are no longer treated as Modem3gpp class methods. E.g. instead of: ModemManager.Modem3gpp.network_get_operator_code(network) We should now do: network.get_operator_code() There is no API break in libmm-glib.
2019-12-13examples: new network-scan-python exampleAleksander Morgado
This is currently not working completely ok because python doesn't know how to free the GList of MMModem3gppNetwork elements. /org/freedesktop/ModemManager1/Modem/1: starting network scan... 21403: Orange - Orange (unknown, forbidden) 21401: vodafone ES - vodafone ES (unknown, forbidden) 21403: Orange - Orange (unknown, forbidden) 21403: Orange - Orange (unknown, forbidden) 21401: vodafone ES - vodafone ES (unknown, forbidden) 21404: Yoigo - Yoigo (unknown, forbidden) 21401: vodafone ES - vodafone ES (unknown, forbidden) 21404: Yoigo - Yoigo (unknown, forbidden) 21407: Movistar - Movistar (unknown, available) 21407: Movistar - Movistar (unknown, available) 21407: Movistar - Movistar (unknown, current) free(): invalid pointer Aborted
2019-12-12Revert "build: fix order of linked libs in test apps"Aleksander Morgado
This reverts commit 3eb623e73b546a444c1fc717f4ed105b3b2d5eae. This change is plain wrong. The correct order was already fixed in commit 42dab8e8.
2019-12-11build: fix order of linked libs in test appsAleksander Morgado
Solving build issues with truly strict linkers, as in: http://lists.busybox.net/pipermail/buildroot/2019-December/268817.html
2019-12-05ublox: implement support to enable and detect +UUDTMF URCsAleksander Morgado
Also, make sure we enable/disable the voice related unsolicited events in both primary and secondary ports, because it may happen that the primary port is connected with PPP and we're using the secondary port for control.
2019-12-05cinterion: fix using correct finish() method in AT commandAleksander Morgado
When using mm_base_modem_at_command_full(), the corresponding mm_base_modem_at_command_full_finish() should be used.
2019-12-05base-call: do not require primary port to start a callAleksander Morgado
If the modem is connected using the primary port, we can just rely on the secondary port. # mmcli --call 0 --start error: couldn't start the call: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Connected: Cannot run sequence: port is connected'
2019-12-04broadband-modem: trivial fix in logging +CLIP settingAleksander Morgado
2019-12-03iface-modem: allow Command() while in Failed stateAleksander Morgado
Allow the generic command API while in FAILED state, in case the modem integrator has some special commands to recover the device. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/163
2019-12-03bearer-qmi: current settings are mandatory when using 'static' addressingAleksander Morgado
If for any reason getting current settings fails and we require static IP addressing (when using raw-ip), then that must be a hard error, otherwise we'll end up with the modem reported as connected but without any IP settings to use: <info> error: couldn't get current settings: QMI protocol error (15): 'OutOfCall' <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> connected) <info> Simple connect state (8/8): All done <warn> Reloading stats failed: Couldn't get packet statistics: QMI protocol error (15): 'OutOfCall' # mmcli -b 0 Bearer '/org/freedesktop/ModemManager1/Bearer/0' ------------------------- Status | connected: 'yes' | suspended: 'no' | interface: 'wwan1' | IP timeout: '20' ------------------------- Properties | apn: 'm2minternet' | roaming: 'allowed' | IP type: 'none' | user: 'none' | password: 'none' | number: 'none' | Rm protocol: 'unknown' ------------------------- IPv4 configuration | method: 'unknown' ------------------------- IPv6 configuration | method: 'unknown' ------------------------- Stats | Duration: '0' | Bytes received: 'N/A' | Bytes transmitted: 'N/A' # mmcli -m 0 /org/freedesktop/ModemManager1/Modem/0 (device id '48f6c35f3d0376aa261a91c0cf7e6340d5a91601') ... Status | lock: 'sim-pin2' | unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)' | state: 'connected' | power state: 'on' | access tech: 'lte' | signal quality: '96' (recent)
2019-12-03bearer: avoid reporting disconnection error if already disconnectedAleksander Morgado
When we try to disconnect a bearer and the bearer is already disconnected (e.g. after a cancelled connection attempt), avoid reporting that as an error: <warn> [1575287560.433398] Error disconnecting bearer '/org/freedesktop/ModemManager1/Bearer/0': 'Couldn't disconnect QMI bearer: this bearer is not connected'. Will assume disconnected anyway.
2019-12-03bearer-qmi: handle disconnection indications during connection attemptsAleksander Morgado
If a WDS indication is received telling us that the modem is no longer connected, abort the ongoing connection attempt right away with an error and cleanup all allocated clients (implicitly disconnecting them if required).. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/155
2019-12-03bearer-qmi: common complete method for the connection attemptAleksander Morgado
Refactor the logic and setup a common complete_connect() method that helps us complete the GTask associated to the connection attempt.
2019-12-03bearer-qmi: close QMI port if it was open during connectionAleksander Morgado
If the bearer is using a QMI port that is not the primary one, we need to explicitly open it during the connection attempt. Keep track of that, and make sure we close it during normal disconnection or if the connection attempt fails.
2019-12-03sierra: implement manual CDMA activationAleksander Morgado
2019-12-03sierra: implement automatic CDMA activationAleksander Morgado
2019-12-03novatel: implement manual CDMA activationAleksander Morgado
Including IOTA-based update, e.g. for Sprint.
2019-12-03novatel: implement automatic CDMA activationAleksander Morgado
2019-12-03iface-modem-cdma: don't allow multiple concurrent activation attemptsAleksander Morgado
2019-12-03iface-modem-cdma: disallow empty carrier code in automatic activationAleksander Morgado
2019-12-03libmm-glib: SID value '0' is actually a good oneAleksander Morgado
2019-12-02huawei: avoid using the QCDM port during a voice callAleksander Morgado
2019-12-02data: added valgrind suppressions file imported from NMAleksander Morgado
2019-12-02mmcli,output: skip printing empty value listsAleksander Morgado
E.g. we shouldn't print emergency numbers field if there is none available: $ mmcli -i 0 ------------------------------- General | dbus path: /org/freedesktop/ModemManager1/SIM/0 ------------------------------- Properties | imsi: 901700000026890 | iccid: 8988211000000268907 | operator id: 90170 | operator name: 901 70 | emergency numbers:
2019-11-28broadband-modem-mbim: implement reset in Intel-based devicesAleksander Morgado
2019-11-28iface-modem-voice: plug task memleaks when returning error if cancelledAleksander Morgado
2019-11-28broadband-modem-mbim: plug task leak when completing USSD operationAleksander Morgado
2019-11-28iface-modem-signal: avoid logging about signal refresh context if not enabledAleksander Morgado
2019-11-27port-mbim: before attempting to use QMI over MBIM, check device servicesAleksander Morgado
If we blindly try to use QMI over MBIM on devices that don't support it, the logic works ok but it's very slow, given that the QMI device open operation has several internal retries, and all those end up timing out. Avoid that lost time by checking the list of services supported by the MBIM modem, and if the QMI over MBIM service is not listed, we'll avoid trying to open the QMI device right away.
2019-11-27ci: redefine when jobs are runAleksander Morgado
* single-plugin builds only on schedules * with/without qmi/mbim builds on master and merge requests * default build always, including on branches and when git pushing
2019-11-27ci: new job to build all single-plugin configurationsAleksander Morgado
2019-11-27build: setup plugin selection logicAleksander Morgado
2019-11-27telit: setup as loadable 'shared' utilsAleksander Morgado
2019-11-27foxconn: setup as loadable 'shared' utilsAleksander Morgado
2019-11-27xmm: setup as loadable 'shared' utilsAleksander Morgado
2019-11-27novatel: setup as loadable 'shared' utilsAleksander Morgado
2019-11-27option: setup as loadable 'shared' utilsAleksander Morgado
2019-11-27sierra: setup as loadable 'shared' utilsAleksander Morgado
2019-11-27mbm: skip setting up as common utils libraryAleksander Morgado
The Ericsson MBM modem management is only used by the MBM plugin.
2019-11-27icera: setup as loadable 'shared' utilsAleksander Morgado
2019-11-27plugin-manager: always make sure all needed symbols are availableAleksander Morgado
Never do lazy loading, we'll always make sure that a plugin will only be fully loaded if all the symbols it requires are already available.
2019-11-27plugin-manager: dynamically load 'shared' util librariesAleksander Morgado
2019-11-27plugins: add README explaining plugin relationshipsAleksander Morgado
2019-11-27po: update Brazilian Portuguese translationRafael Fontenelle
2019-11-27plugin-manager: allow new ports up to 1500ms since last port addedAleksander Morgado
Until now we had only a 2500ms timeout initialized since the first port was exposed until we decided we were ready to consider all ports notified by the kernel. With this new logic, we add an additional condition: even if the 2500ms initial timeout has elapsed already, we leave an additional 1500ms since the last port addition for new ports to appear. This new logic is useful when relying on the ReportKernelEvent() DBus method, as it is the user the one responsible for reporting the kernel events instead of udev. Now, the user is not forced to make sure all ports are exposed in 2500ms; instead, we also allow ports to be reported in more than 2500ms as long as the time between port additions reported is less than 1500ms. Note that this does not mean that the whole probing time will now always be 4000ms. On well behaved systems (like when based on udev) this new 'extra' probing timeout may expire long before the 'min' probing timeout we already had as well. E.g. in this setup, the reporting of the NET port was done 1100ms later than the last ttyUSB3, and that was already too late as the original 2500ms threshold had already expired. [1573536994.593874] (tty/ttyUSB0): first port in device /sys/devices/platform/ehci-platform/usb1/1-1 [1573536994.596659] [plugin manager] task 1: port grabbed: ttyUSB0 [1573536995.093579] (tty/ttyUSB1): additional port in device /sys/devices/platform/ehci-platform/usb1/1-1 [1573536995.094172] [plugin manager] task 1: port grabbed: ttyUSB1 [1573536995.603206] (tty/ttyUSB2): additional port in device /sys/devices/platform/ehci-platform/usb1/1-1 [1573536995.603822] [plugin manager] task 1: port grabbed: ttyUSB2 [1573536996.111564] (tty/ttyUSB3): additional port in device /sys/devices/platform/ehci-platform/usb1/1-1 [1573536996.112257] [plugin manager] task 1: port grabbed: ttyUSB3 [1573536996.814816] [device /sys/devices/platform/ehci-platform/usb1/1-1] creating modem with plugin 'Quectel' and '4' ports [1573536997.265820] (net/wwan0): additional port in device /sys/devices/platform/ehci-platform/usb1/1-1 [1573536997.296935] (usbmisc/cdc-wdm0): additional port in device /sys/devices/platform/ehci-platform/usb1/1-1