aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/umbim
Commit message (Collapse)AuthorAgeFilesLines
* treewide: replace AUTORELEASE with real PKG_RELEASETianling Shen2023-05-181-1/+1
| | | | | | | | | | | | | | | | | | Based on Paul Fertser <fercerpav@gmail.com>'s guidance: Change AUTORELEASE in rules.mk to: ``` AUTORELEASE = $(if $(DUMP),0,$(shell sed -i "s/\$$(AUTORELEASE)/$(call commitcount,1)/" $(CURDIR)/Makefile)) ``` then update all affected packages by: ``` for i in $(git grep -l PKG_RELEASE:=.*AUTORELEASE | sed 's^.*/\([^/]*\)/Makefile^\1^';); do make package/$i/clean done ``` Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* umbim: allow forcing DHCP/DHCPv6 configurationLech Perczak2023-05-071-8/+8
| | | | | | | | | | | To support the widest variety of modems, allow restoring previous behaviour of configuring the link throug means of DHCP(v6) exclusively. Change the default value of "dhcp" and "dhcpv6" UCI options to "auto", while keeping the default behaviour of "prefer out-of-band configuration", intact. Setting "dhcp" or "dhcpv6" to boolean 1 will now force using DHCP and DHCPv6, respectively. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: include MBIM-provided DNS servers also with DHCP modeLech Perczak2023-04-291-15/+18
| | | | | | | | In MBIM interfaces, DNS servers may be provided out-of-band regardless whether DHCP is used for configuration, or not. Move the DNS configuration outside "if" blocks to support that. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: extract common code from static and dhcp(v6) setup procedureLech Perczak2023-04-291-34/+16
| | | | | | | Beginnings and endings of sub-interface creation procedure were literally duplicates - extract them outside if "if" blocks Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: handle MTU configurationLech Perczak2023-04-291-2/+16
| | | | | | | | | Allow setting interface MTU through UCI. If this is not set, use MBIM-provided MTU, if provided through control channel. If separate MTUs are provided for IPv4 and IPv6, apply larger of them. This is very unlikely and possible only for IPv4v6 dual-stack configuration. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: delegate RFC7278 IPv6 prefixes from OOB configLech Perczak2023-04-291-0/+6
| | | | | | | Delegate prefixes received through MBIM control channel the same way, as would be done through DHCP, according to RFC7278. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: drop IP configuration parsing using 'eval'Lech Perczak2023-04-291-1/+0
| | | | | | Finally, when new helper is in use, drop old IP configuration parser. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: support multiple-valued configuration fieldsLech Perczak2023-04-291-10/+32
| | | | | | | | | MBIM supports multiple values for IP address and DNS server, and such configuration is available through output of MBIM. Use new helper method to support adding multiple addresses and DNS servers to static interfaces for both IPv4 and IPv6. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: add "_proto_mbim_get_field" helperLech Perczak2023-04-291-0/+12
| | | | | | | | | Add a new helper to extract IP configuration from umbim output. This is required to extract fields which can possibly have multiple values, namely IP addresses and DNS servers, and get rid of primitive parser using 'eval' builtin without support for this. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: log output of 'config' stepLech Perczak2023-04-291-1/+3
| | | | | | | | Display full configuration obtained using MBIM control channel in the log, from umbim output verbatim, for easier troubleshooting, and in preparation for parser refactoring. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: pass ipXtable to child interfacesLech Perczak2023-04-291-2/+8
| | | | | | | | Inspired by commti e51aa699f7ca, allow setting specific routing tables via ip4table and ip6table options, by passing them on child interfaces created by MBIM protocol handler. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: respect 'Enable IPv6 negotiation' optionLech Perczak2023-04-291-0/+4
| | | | | | | Don't bring IPv6 part of interface up if it's disabled, or system does not support it. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: use static config by default, fallback to DHCPLech Perczak2023-04-291-4/+7
| | | | | | | | | Finally, inspired by ModemManager's logic, make static configuration obtained through MBIM control channel, preferred. If IP configuration is not available this way, fallback to DHCP(v6) if enabled, else do not create a sub-interface for unavailable IP type. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: separate DHCPv6 configuration from DHCP(v4)Lech Perczak2023-04-291-3/+4
| | | | | | | | | | Now, that sub-interface setup is split by IP type, and separate checks are performed for DHCP selection, it is possible to control DHCP on v4 an v6 sub-interfaces instantly. Add "dhcpv6" variable, akin to QMI option, to control behaviour of DHCPv6 separately from IPv4 option, which is required for some mobile operators. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: restructure IPv4/IPv6 handlingLech Perczak2023-04-291-29/+25
| | | | | | | | Check whether interface is configured per IP type, not per DHCP. This is preparation to allow fallback to DHCP if static IP configuration is not available, which is the default option for MBIM modems Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: inherit firewall zone membership from parent interfaceLech Perczak2023-04-291-0/+6
| | | | | | | | Fix an issue where subinterfaces were not added to the same firewall zone as their parent. Inspired by 64bb88841fb. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: inherit "peerdns" option from parent interfaceLech Perczak2023-04-291-2/+2
| | | | | | | | MBIM protocol handler should intherit "peerdns" options from parent interface on sub-interfaces, otherwise upstream DNS servers are applied regardless of configuration. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: use IP configuration provided by MBIM by defaultLech Perczak2023-04-291-1/+1
| | | | | | | | | | | | Previously, DHCP was used. According to MBIM Specification v1.0 errata 1 [1], section 10.5.20, MBIM_CID_IP_CONFIGURATION, if MBIM information element containing IP configuration is available, host shall use it, and fall back to in-band mechanisms to acquire it therwise - therefore make static configuration the default. [1] https://www.usb.org/document-library/mobile-broadband-interface-model-v10-errata-1-and-adopters-agreement Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: detect actual connection IP typeLech Perczak2023-04-291-4/+10
| | | | | | | | | | | | Current implementation needlessly creates both IPv4 and IPv6 sub-interfaces for single-stack IP types. Limit this only to selected IP type. While at that, ensure that IP type is also passed to umbim during "connect" phase. In addition, detect the actual established connection type returned by umbim and set up subinterfaces according to that, not to requested configuration. While at that, allow empty IP type explicitly, interpreted as "any" according to MBIM specification. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: fail connect step immediatelyLech Perczak2023-04-291-3/+6
| | | | | | | | | | | | | Subsequent calls to 'umbim connect' do not have any effect if a failure occured, and in such case an infinite loop without timeout is created, leading to possibility of interface stuck at connecting forever. Drop this loop, and issue MBIM disconnect properly, so netifd can restart from scratch. This issue can be observed with Sierra EM7455 at changing APN, which causes network re-registration by default, and a MBIM transaction timeout, which is resolved on next interface bringup by netifd. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: connect session for only the selected PDP typeLech Perczak2023-04-291-48/+60
| | | | | | | | | Previous implementation automatically set up connections for both IPv4 and IPv6, even if one of them isn't supported. Respect the "pdptype" option in the same way, as it is done for QMI or NCM, and only start the respective PDN sessions, if set. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: add support for non-dhcp modeMartin Schiller2023-04-291-22/+64
| | | | | | | | | | There are mbim compatible wwan modules available which do not support the dhcp autoconfiguration. (e.g. gemalto Cinterion ELS81) This adds the possibility to get the configuration parameters from mbim. Signed-off-by: Martin Schiller <ms@dev.tdt.de> Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* treewide: add support for "gc-sections" in PKG_BUILD_FLAGSAndre Heider2023-03-211-3/+2
| | | | | | | | | | | | | | | This reduces open coding and allows to easily add a knob to enable it treewide, where chosen packages can still opt-out via "no-gc-sections". Note: libnl, mbedtls and opkg only used the CFLAGS part without the LDFLAGS counterpart. That doesn't help at all if the goal is to produce smaller binaries. I consider that an accident, and this fixes it. Note: there are also packages using only the LDFLAGS part. I didn't touch those, as gc might have been disabled via CFLAGS intentionally. Signed-off-by: Andre Heider <a.heider@gmail.com>
* umbim: Allow roaming and partner connectionsJulio Gonzalez Gil2022-12-111-6/+25
| | | | | | | | | | Allow registration if the SIM is roaming or partner mode, by adding two new options to the protocol. Until now, such registration failed because umbim returns exit codes 4 and 5 for such situations. Signed-off-by: Julio Gonzalez Gil <git@juliogonzalez.es>
* umbim: bump to git HEADHauke Mehrtens2022-08-131-3/+3
| | | | | | 146bc77 umbim: fix invalid mbim message string encoding Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* umbim: add missing json_close_object callMartin Schiller2021-12-271-0/+1
| | | | | | | | Otherwise, connection setup may fail due to JSON parse error in netifd. Signed-off-by: Martin Schiller <ms@dev.tdt.de> [Updated commit description] Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: explicitly check for PIN1 stateMartin Schiller2021-12-271-1/+2
| | | | | | | | | | | PIN2 is used only to restrict changing of fixed dialling feature, does not affect network registration. Therefore explicitly check for PIN1 state during connection setup, which is required for network registration. Signed-off-by: Martin Schiller <ms@dev.tdt.de> [Updated commit description] Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* umbim: call umbim disconnect in error caseMartin Schiller2021-12-271-1/+13
| | | | | | | | This is needed to properly close the control channel. Otherwise, on the next try the caps call may fail. Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* umbim: bump to git HEADStijn Tintel2021-08-181-3/+3
| | | | | | | de56231 umbim: fix compilation with GCC 10 Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
* treewide: remove BUILD_PARALLEL from CMake packagesRosen Penev2021-06-191-2/+0
| | | | | | | | | | | | | It's already default. The only exception is mt76 which has Ninja disabled. Found with: git grep BUILD_PARALLEL | cut -d ':' -f 1 | sort -u > par git grep cmake.mk | cut -d ':' -f 1 > cmake comm -1 -2 par cmake Signed-off-by: Rosen Penev <rosenp@gmail.com>
* umbim: fix return value of proto_mbim_setup()Adrian Schmutzler2021-06-051-1/+1
| | | | | | | The variable name appears to be mistyped. Suggested-by: Howard Chu <hyc@symas.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* umbim: fix whitespace issuesAdrian Schmutzler2021-06-052-5/+5
| | | | | | Make leading whitespaces consistent and remove trailing one. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* umbim: move package to 'WWAN' submenuPiotr Dymacz2020-02-241-0/+1
| | | | | | | 'uqmi' was moved to 'WWAN' submenu in 9abdeee0b7. Let's be consistent and do the same with 'umbim'. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* umbim: update to latest git HEADIngo Feinerer2019-09-121-3/+3
| | | | | | 184b707 umbim: add home provider query support Signed-off-by: Ingo Feinerer <feinerer@logic.at>
* umbim: update to latest git HEADPetr Štetiar2019-04-151-3/+3
| | | | | | | | | 24f9dc7 Iron out all extra compiler warnings 9d8dbc9 Enable extra compiler checks ff8d356 mbim-proxy support ccca03f umbim: add registration set support Signed-off-by: Petr Štetiar <ynezz@true.cz>
* treewide: replace LEDE_GIT with PROJECT_GITJo-Philipp Wich2018-01-101-1/+1
| | | | | | | Remove LEDE_GIT references in favor to the new name-agnostic PROJECT_GIT variable. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* umbim: mark as nonshared because of the usb dependenciesFelix Fietkau2017-01-131-0/+2
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* Revert the recent dependency and metadata scanning reworkFelix Fietkau2017-01-111-1/+1
| | | | | | | | | | | | | | | This reverts the following commits: fbe522d1204149b6c128d55e360bfc15fa8258e1 278ad007ee03c4455c3507322e34b0e3e6ec050d 863888e44f7a1fb1675a2e7a2eaabfec3561d2a2 96daf6352f6e04bc22789466cb5409b93fbec191 cfd83555fc4f0bab18a26f6812da18e64df46ff3 This seems to trigger some mconf bugs when built with all feeds packages, so I will try to find a less intrusive solution before the release. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* umbim: allow build without USB_SUPPORTFelix Fietkau2017-01-111-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* treewide: clean up and unify PKG_VERSION for git based downloadsFelix Fietkau2016-12-221-5/+3
| | | | | | Also use default defintions for PKG_SOURCE_SUBDIR, PKG_SOURCE Signed-off-by: Felix Fietkau <nbd@nbd.name>
* treewide: clean up download hashesFelix Fietkau2016-12-161-1/+1
| | | | | | Replace *MD5SUM with *HASH, replace MD5 hashes with SHA256 Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mbim: add metric, defaultroute and peerdns options for mbim protocolMarcin Jurkowski2016-10-261-2/+5
| | | | | | | | | | Adds generic network options for mbim protocol dynamic interfaces as suggested by Felix in https://lists.openwrt.org/pipermail/openwrt-devel/2016-February/039794.html. This depends on netifd patch https://patchwork.ozlabs.org/patch/686820/. Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
* source: Switch to xz for packages and tools where possibleDaniel Engberg2016-10-061-1/+2
| | | | | | | | | | | * Change git packages to xz * Update mirror checksums in packages where they are used * Change a few source tarballs to xz if available upstream * Remove unused lines in packages we're touching, requested by jow- and blogic * We're relying more on xz-utils so add official mirror as primary source, master site as secondary. * Add SHA256 checksums to multiple git tarball packages Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
* umbim: update to latest git HEADJohn Crispin2016-07-051-2/+2
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* package/*: update git urls for project reposJohn Crispin2016-06-131-1/+1
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* global: change my email addressJohn Crispin2016-05-121-1/+1
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* packages: use OPENWRT_GIT to point at the main openwrt git repoFelix Fietkau2016-01-041-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48118
* comgt/umbim/uqmi: enable RFC 7278 for 3g/4g by defaultSteven Barth2015-09-031-0/+1
| | | | | | Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 46780
* umbim: auto retry when bringup failsJohn Crispin2015-04-211-1/+15
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 45555
* network: also shorten virtual interface names of ppp and 3g/4g connectionsSteven Barth2015-04-171-2/+2
| | | | | | Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 45479