aboutsummaryrefslogtreecommitdiff
path: root/net/modemmanager/files/modemmanager.proto
Commit message (Collapse)AuthorAge
* modemmanager: moving the openwrt related files to subdirectoriesFlorian Eckert2024-03-05
| | | | | | | | Moving the openwrt related files to subdirectories as they are installed on the system. This change makes it immediately apparent during development where the file is to be installed in the running system. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: move generally applicable functions to modemmanager.commonFlorian Eckert2024-01-19
| | | | | | | | These moved functions are general functions. This is a preparatory commit so that these moved functions can also be used in other ModemManager scripts. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: set allowedmode to 'any' if nothing is configuredFlorian Eckert2024-01-19
| | | | | | | | | | | The modem saves the permitted technology configuration in the modem itself. If the technology configuration is deleted in the uci, this is not passed on to the modem. This means that the previously saved technology configuration is remains in the modem and is therefore still active. By setting the technology to 'any', if no option is set, all technologies are allowed again. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: add possibilty for setting initial EPS bearerFlorian Eckert2023-12-04
| | | | | | | | | | | | | | | | | If no GSM but only 4G is available and a special APN must be used, it is necessary to set an inital EPS bearer beforehand. If this is not set, then modem cannot log in and register in the mobile network. The new option 'init_epsbearer' could be set to the following options. * none: No init EPS bearer is used and the old one is deleted (default) * default: Use init EPS bearer with the following config options 'iptype', 'allowedauth', 'password', 'user' and 'apn' as for the connection bearer. * custom: Other parameters are used that do not match those of the default connection bearer. These have an 'init_' prefix and are named in the same way as the default connection bearer config options. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: check modem state before establishing a connectionFlorian Eckert2023-12-04
| | | | | | | | | With this change the following modem 'state' are checked before a connection attempt setup. * failed: Stop connection attempt because of sim-missing * locked: Stop connection attempt if no pincode is set Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: Fix Permission Denied errorOliver Sedlbauer2023-09-01
| | | | | | | | | | | | | | | | | | | | The proto_send_update function is sending a notification to netifd during the teardown section. However, netifd filters link update notifications executed during teardown, as indicated here: https://git.openwrt.org/?p=project/netifd.git;a=blob;f=proto-shell.c#l515 This was leading to a Permission Denied error due to its behavior, making proto_send_update ineffective during teardown. To address the issue, the proto_send_update function has been removed from the teardown section. This prevents the Permission Denied error while ensuring proper operation during teardown. Additionally, in the 10-report-down helper script, a check has been implemented to determine if the interface is already down. This check is crucial to avoid triggering a Permission Denied error, especially in cases where netifd is already aware of a controlled ifdown operation. Signed-off-by: Oliver Sedlbauer <osedlbauer@tdt.de>
* modemmanager: add setting for allowed and preferred modeFlorian Eckert2023-08-09
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: remove unneeded teardown error reportingFlorian Eckert2023-08-09
| | | | | | | Teardown error reporting is not needed, bacause it overrides init error reporting. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: fix white spacesFlorian Eckert2023-08-09
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: improve 'simple connection' option handlingFlorian Eckert2023-07-24
| | | | | | | | The line to generate the argument list for 'simple connect' is quite long and is not maintainable. To improve the handling a function 'append_param' was added for appending the 'simple connect' options. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: Adding support for 'allow_roaming' optionFrancisco Jose Alvarez2023-07-24
| | | | | | | Signed-off-by: Francisco Jose Alvarez <francisco.alvarez@galgus.net> * Update commit head * Rebase patch to the latest changes Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanger: add missing proto_init_update in teardownFlorian Eckert2023-07-24
| | | | | | | Inform netifd with missing 'proto_update', that the interface is not up anymore. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: do not set proto_notify_error on teardownFlorian Eckert2023-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If on teardown the 'proto_notify_error' is set to 'MM_TEARDOWN_IN_PROGRESS', then an error which is set on 'setup' is not visible in the ubus network.interface.<iface> status output. { "up": false, "pending": false, "available": true, "autostart": false, "dynamic": false, "proto": "modemmanager", "data": { }, "errors": [ { "subsystem": "dualsim", "code": "MM_TEARDOWN_IN_PROGRESS" } ] } It alway shows the code 'MM_TEARDWON_IN_PROGRESS'! By removing the line 'proto_notify_error "${interface}" MM_TEARDOWN_IN_PROGRESS' in teardown, the last error is show in the proto stack from setup. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: support setting plmnMladen Milinkovic2023-07-21
| | | | Signed-off-by: Mladen Milinkovic <maxrd2@smoothware.net>
* modemmanager: if an alias name is used do not check sysfs pathFlorian Eckert2023-06-15
| | | | | | | | | If an alias name is used for the modem, then a check if the device exists in sysfs does not work. To fix this remove the check if the sysfs device exists. The protocoll handler already checks if the modem is responsible for this device on the next line. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: fix unquoted strings when launching pppdAleksander Morgado2022-11-11
| | | | Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: explicitly disconnect even if no bearers foundAleksander Morgado2022-07-05
| | | | | | | | | | | | | | | | | A network restart where netifd is cleanly restarted involves bringing the network interfaces down. The 'modemmanager' protocol handler will run a mmcli --simple-disconnect in this case, but only if there are bearer objects found. If the network restart happened *during* the connection attempt procedure, while the modem is e.g. being registered in the network, no bearer objects exist yet, and so, we would skip doing anything during the interface teardown operation. This would lead to the original connection attempt succeeding, so leaving the modem in ModemManager in connected state, while the associated interface in netifd is reported down. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: added new proto optionsValtteri Holopainen2020-08-13
| | | | | | | | | | | | | | | | | | Added signal refresh rate option modemmanager: update readme.md Added description for added proto options. Added compile option to compile --with-at-command-via-dbus for allowing AT commands to modem without --debug flag Changes to be committed: modified: net/modemmanager/Config.in modified: net/modemmanager/Makefile modified: net/modemmanager/files/modemmanager.init modified: net/modemmanager/files/modemmanager.proto modified: README.md Signed-off-by: Valtteri Holopainen <valtsu@gmail.com>
* modemmanager: add error message notifications to proto handlerNicholas Smith2020-07-10
| | | | Signed-off-by: Nicholas Smith <nicholas.smith@telcoantennas.com.au>
* Merge pull request #12086 from aleksander0m/aleksander/mm-authRosen Penev2020-06-28
|\ | | | | Authentication protocol setup in ModemManager
| * modemmanager: allow specifying list of authentication protocolsAleksander Morgado2020-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ModemManager allows specifying which are the authentication protocols to be used during the user/password context authentication with the peer. This protocol update allows users to provide a new 'allowedauth' option in the interface configuration, which is then used in two different places: * It is sent to ModemManager in the --simple-connect call so that modems with a network interface can perform the authentication using their own vendor-specific protocol. * If the connection is done using PPP, this list of protocols is used to configure the pppd call. If the new 'allowedauth' option is not given, all auth protocols are implicitly allowed. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* | modemmanager: set interface MTU based on bearer settingsAleksander Morgado2020-05-25
|/ | | | | | | | Using the same method used by other protocol handlers like uqmi. Fixes https://github.com/openwrt/packages/issues/11383 Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: don't flag the 'device' option as 'device' typeAleksander Morgado2019-11-27
| | | | | | | | | Unlike other modem protocol handlers like the ones implemented by uqmi or umbim, in the modemmanager protocol handler the 'device' option does not specify a device node in /dev. Therefore, we shouldn't flag the option as 'device' type (dt_type_device). Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: flag as available and no_device when initializingAleksander Morgado2019-11-27
| | | | | | | Otherwise, if the modem is reseted, netifd will think that the device is gone forever. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: add default proto configsAleksander Morgado2019-11-27
| | | | Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: fix 'any' iptype settingAleksander Morgado2019-11-15
| | | | | | | | | | | When the user requests 'any' as 'iptype', we may get either IPv4 or IPv6 settings. Simplify the logic by not requiring any explicit iptype before loading the method reported by the bearer object for IPv4 and IPv6; just load the methods right away and setup settings based on those. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: add IPv6/IPv4v6 supportAleksander Morgado2019-11-08
| | | | Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: add proto dynamic defaults on dhcp setupAleksander Morgado2019-11-07
| | | | | | Also, explicitly close the JSON object. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: fix bearer disconnection logicAleksander Morgado2019-11-07
| | | | | | | The bearer status wasn't being loaded in key/value mode, and therefore would always fail to load the IPv4 config method. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: add ModemManager to packagesNicholas Smith2019-09-27
Signed-off-by: Nicholas Smith <nicholas.smith@telcoantennas.com.au>