Re: [PATCH] uqmi: Move to community packages repo
On 02.07.21 13:35, Koen Vandeputte wrote: +1 for keeping it in the core I agree, moving packages into the feed makes sense, but stuff needed for connectivity should stay in trunk John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH] uqmi: Move to community packages repo
On 01.07.21 22:12, Arjun wrote: On 02/07/21 1:36 am, David Bauer wrote: [resend, as I've missed to keep the list CC'ed] Hi Arjun On 7/1/21 9:50 PM, Arjun AK wrote: Signed-off-by: Arjun AK And just my personal opinion: While I think it makes sense to move optional packages to the packages feed, this is clearly a core functional dependency for multiple targets. We win absolutely nothing by moving it to packages, but lose the ability to build images providing seamless ootb internet connectivity without pulling in packages feed. Just because a lot of packages were moved in the not-so-distant past means this has to be done to each and every packages in core. Best David +1 for keeping it in the core For now i would be happy with the patch titled "uim: add --uim-get-sim-state" be merged in. I'm preparing a major update in the background (using libqmi 1.28.4 as source). Hold on a little longer please. Kind regards, Koen ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH] uqmi: Move to community packages repo
Paul Spooren [2021-07-01 09:53:27]: Hi, > I'm all for moving it maybe we should get back[1] to the drawing board and finally formaly define what is core/base package, so it's clear? BTW in that email I've proposed initial list of potential packages for cleanup/move, but comgt/uqmi and probably few others were omitted. In this case removing the package in DEFAULT_PACKAGES would clearly result in the regression during sysupgrade to the next release, as folks might lose upstream connectivity if they're using uqmi/comgt for that purpose. Yeah, we can document it and all, but it would be really silly to remove such essential and core networking/wireless feature. It seems, that once the feature is in official image it can't be removed easily without making some users angry. 1. https://lists.infradead.org/pipermail/openwrt-devel/2019-August/024109.html -- ynezz ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH] uqmi: Move to community packages repo
On 01.07.2021 21:50, Arjun AK wrote: Signed-off-by: Arjun AK Nacked-by: Rafał Miłecki No proper explanation. Package is included by default in few device images. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH] uqmi: Move to community packages repo
On 02/07/21 1:42 am, Arjun wrote: On 02/07/21 1:36 am, David Bauer wrote: [resend, as I've missed to keep the list CC'ed] Hi Arjun On 7/1/21 9:50 PM, Arjun AK wrote: Signed-off-by: Arjun AK And just my personal opinion: While I think it makes sense to move optional packages to the packages feed, this is clearly a core functional dependency for multiple targets. We win absolutely nothing by moving it to packages, but lose the ability to build images providing seamless ootb internet connectivity without pulling in packages feed. Just because a lot of packages were moved in the not-so-distant past means this has to be done to each and every packages in core. Best David For now i would be happy with the patch titled "uim: add --uim-get-sim-state" be merged in. Also the current maintainers (Matti Laakso ) server is not accepting emails anymore. -- Arjun ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH] uqmi: Move to community packages repo
On 02/07/21 1:36 am, David Bauer wrote: [resend, as I've missed to keep the list CC'ed] Hi Arjun On 7/1/21 9:50 PM, Arjun AK wrote: Signed-off-by: Arjun AK And just my personal opinion: While I think it makes sense to move optional packages to the packages feed, this is clearly a core functional dependency for multiple targets. We win absolutely nothing by moving it to packages, but lose the ability to build images providing seamless ootb internet connectivity without pulling in packages feed. Just because a lot of packages were moved in the not-so-distant past means this has to be done to each and every packages in core. Best David For now i would be happy with the patch titled "uim: add --uim-get-sim-state" be merged in. -- - Arjun ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH] uqmi: Move to community packages repo
Hi Arjun, On 01.07.2021 21:50, Arjun AK wrote: Signed-off-by: Arjun AK There are many devices with uqmi dependency (more than 10?). Personally, I would prefer to keep this one in the core packages set. -- Cheers, Piotr --- package/network/utils/uqmi/Makefile | 48 -- .../utils/uqmi/files/lib/netifd/proto/qmi.sh | 471 -- 2 files changed, 519 deletions(-) delete mode 100644 package/network/utils/uqmi/Makefile delete mode 100755 package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile deleted file mode 100644 index 53ca67230b..00 --- a/package/network/utils/uqmi/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=uqmi -PKG_RELEASE:=3 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git -PKG_SOURCE_DATE:=2020-11-22 -PKG_SOURCE_VERSION:=0a19b5b77140465c29e2afa7d611fe93abc9672f -PKG_MIRROR_HASH:=0a6641f8e167efd21d464b0b2aeb1fec5f974dddcdb8822fbd5d7190d0b741b4 -PKG_MAINTAINER:=Matti Laakso - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:= - -PKG_FLAGS:=nonshared - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/uqmi - SECTION:=net - CATEGORY:=Network - SUBMENU:=WWAN - DEPENDS:=+libubox +libblobmsg-json +kmod-usb-net +kmod-usb-net-qmi-wwan +wwan - TITLE:=Control utility for mobile broadband modems -endef - -define Package/uqmi/description - uqmi is a command line tool for controlling mobile broadband modems using - the QMI-protocol. -endef - -TARGET_CFLAGS += \ - -I$(STAGING_DIR)/usr/include -ffunction-sections -fdata-sections - -TARGET_LDFLAGS += -Wl,--gc-sections - -CMAKE_OPTIONS += \ - -DDEBUG=1 - -define Package/uqmi/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/uqmi $(1)/sbin/ - $(CP) ./files/* $(1)/ -endef - -$(eval $(call BuildPackage,uqmi)) diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh deleted file mode 100755 index c0134f44dd..00 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ /dev/null @@ -1,471 +0,0 @@ -#!/bin/sh - -[ -n "$INCLUDE_ONLY" ] || { - . /lib/functions.sh - . ../netifd-proto.sh - init_proto "$@" -} - -proto_qmi_init_config() { - available=1 - no_device=1 - proto_config_add_string "device:device" - proto_config_add_string apn - proto_config_add_string auth - proto_config_add_string username - proto_config_add_string password - proto_config_add_string pincode - proto_config_add_int delay - proto_config_add_string modes - proto_config_add_string pdptype - proto_config_add_int profile - proto_config_add_boolean dhcp - proto_config_add_boolean dhcpv6 - proto_config_add_boolean autoconnect - proto_config_add_int plmn - proto_config_add_int timeout - proto_config_add_int mtu - proto_config_add_defaults -} - -proto_qmi_setup() { - local interface="$1" - local dataformat connstat plmn_mode mcc mnc - local device apn auth username password pincode delay modes pdptype - local profile dhcp dhcpv6 autoconnect plmn timeout mtu $PROTO_DEFAULT_OPTIONS - local ip4table ip6table - local cid_4 pdh_4 cid_6 pdh_6 - local ip_6 ip_prefix_length gateway_6 dns1_6 dns2_6 - - json_get_vars device apn auth username password pincode delay modes - json_get_vars pdptype profile dhcp dhcpv6 autoconnect plmn ip4table - json_get_vars ip6table timeout mtu $PROTO_DEFAULT_OPTIONS - - [ "$timeout" = "" ] && timeout="10" - - [ "$metric" = "" ] && metric="0" - - [ -n "$ctl_device" ] && device=$ctl_device - - [ -n "$device" ] || { - echo "No control device specified" - proto_notify_error "$interface" NO_DEVICE - proto_set_available "$interface" 0 - return 1 - } - - [ -n "$delay" ] && sleep "$delay" - - device="$(readlink -f $device)" - [ -c "$device" ] || { - echo "The specified control device does not exist" - proto_notify_error "$interface" NO_DEVICE - proto_set_available "$interface" 0 - return 1 - } - - devname="$(basename "$device")" - devpath="$(readlink -f /sys/class/usbmisc/$devname/device/)" - ifname="$( ls "$devpath"/net )" - [ -n "$ifname" ] || { - echo "The interface could not be found." - proto_notify_error "$interface" NO_IFACE - proto_set_available "$interface" 0 - return 1 - } - - [ -n "$mtu" ] && { - echo "Setting MTU to $mtu" - /sbin/ip link set dev $ifname mtu $mtu - } - - echo "Waiting for SIM initialization" - local
Re: [PATCH] uqmi: Move to community packages repo
[resend, as I've missed to keep the list CC'ed] Hi Arjun On 7/1/21 9:50 PM, Arjun AK wrote: Signed-off-by: Arjun AK Describing the rationale of this change would've been nice. This package is used on most boards with a cellular modem to provide ootb internet capability, so please explain how you intend to deal with that. And just my personal opinion: While I think it makes sense to move optional packages to the packages feed, this is clearly a core functional dependency for multiple targets. We win absolutely nothing by moving it to packages, but lose the ability to build images providing seamless ootb internet connectivity without pulling in packages feed. Just because a lot of packages were moved in the not-so-distant past means this has to be done to each and every packages in core. Best David --- package/network/utils/uqmi/Makefile | 48 -- .../utils/uqmi/files/lib/netifd/proto/qmi.sh | 471 -- 2 files changed, 519 deletions(-) delete mode 100644 package/network/utils/uqmi/Makefile delete mode 100755 package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile deleted file mode 100644 index 53ca67230b..00 --- a/package/network/utils/uqmi/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=uqmi -PKG_RELEASE:=3 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git -PKG_SOURCE_DATE:=2020-11-22 -PKG_SOURCE_VERSION:=0a19b5b77140465c29e2afa7d611fe93abc9672f -PKG_MIRROR_HASH:=0a6641f8e167efd21d464b0b2aeb1fec5f974dddcdb8822fbd5d7190d0b741b4 -PKG_MAINTAINER:=Matti Laakso - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:= - -PKG_FLAGS:=nonshared - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/uqmi - SECTION:=net - CATEGORY:=Network - SUBMENU:=WWAN - DEPENDS:=+libubox +libblobmsg-json +kmod-usb-net +kmod-usb-net-qmi-wwan +wwan - TITLE:=Control utility for mobile broadband modems -endef - -define Package/uqmi/description - uqmi is a command line tool for controlling mobile broadband modems using - the QMI-protocol. -endef - -TARGET_CFLAGS += \ - -I$(STAGING_DIR)/usr/include -ffunction-sections -fdata-sections - -TARGET_LDFLAGS += -Wl,--gc-sections - -CMAKE_OPTIONS += \ - -DDEBUG=1 - -define Package/uqmi/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/uqmi $(1)/sbin/ - $(CP) ./files/* $(1)/ -endef - -$(eval $(call BuildPackage,uqmi)) diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh deleted file mode 100755 index c0134f44dd..00 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ /dev/null @@ -1,471 +0,0 @@ -#!/bin/sh - -[ -n "$INCLUDE_ONLY" ] || { - . /lib/functions.sh - . ../netifd-proto.sh - init_proto "$@" -} - -proto_qmi_init_config() { - available=1 - no_device=1 - proto_config_add_string "device:device" - proto_config_add_string apn - proto_config_add_string auth - proto_config_add_string username - proto_config_add_string password - proto_config_add_string pincode - proto_config_add_int delay - proto_config_add_string modes - proto_config_add_string pdptype - proto_config_add_int profile - proto_config_add_boolean dhcp - proto_config_add_boolean dhcpv6 - proto_config_add_boolean autoconnect - proto_config_add_int plmn - proto_config_add_int timeout - proto_config_add_int mtu - proto_config_add_defaults -} - -proto_qmi_setup() { - local interface="$1" - local dataformat connstat plmn_mode mcc mnc - local device apn auth username password pincode delay modes pdptype - local profile dhcp dhcpv6 autoconnect plmn timeout mtu $PROTO_DEFAULT_OPTIONS - local ip4table ip6table - local cid_4 pdh_4 cid_6 pdh_6 - local ip_6 ip_prefix_length gateway_6 dns1_6 dns2_6 - - json_get_vars device apn auth username password pincode delay modes - json_get_vars pdptype profile dhcp dhcpv6 autoconnect plmn ip4table - json_get_vars ip6table timeout mtu $PROTO_DEFAULT_OPTIONS - - [ "$timeout" = "" ] && timeout="10" - - [ "$metric" = "" ] && metric="0" - - [ -n "$ctl_device" ] && device=$ctl_device - - [ -n "$device" ] || { - echo "No control device specified" - proto_notify_error "$interface" NO_DEVICE - proto_set_available "$interface" 0 - return 1 - } - - [ -n "$delay" ] && sleep "$delay" - - device="$(readlink -f $device)" - [ -c "$device" ] || { - echo "The specified control device does not exist" - proto_notify_error "$interface" NO_DEVICE - proto_set_available "$interface" 0 - return 1 -
Re: [PATCH] uqmi: Move to community packages repo
On 7/1/21 9:50 AM, Arjun AK wrote: Signed-off-by: Arjun AK --- Could you please add a brief commit message describing why this package isn't needed in core? I'm all for moving it, don't get me wrong, we just try to have commit messages everywhere to keep context over time. package/network/utils/uqmi/Makefile | 48 -- .../utils/uqmi/files/lib/netifd/proto/qmi.sh | 471 -- 2 files changed, 519 deletions(-) delete mode 100644 package/network/utils/uqmi/Makefile delete mode 100755 package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile deleted file mode 100644 index 53ca67230b..00 --- a/package/network/utils/uqmi/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=uqmi -PKG_RELEASE:=3 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git -PKG_SOURCE_DATE:=2020-11-22 -PKG_SOURCE_VERSION:=0a19b5b77140465c29e2afa7d611fe93abc9672f -PKG_MIRROR_HASH:=0a6641f8e167efd21d464b0b2aeb1fec5f974dddcdb8822fbd5d7190d0b741b4 -PKG_MAINTAINER:=Matti Laakso - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:= - -PKG_FLAGS:=nonshared - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/uqmi - SECTION:=net - CATEGORY:=Network - SUBMENU:=WWAN - DEPENDS:=+libubox +libblobmsg-json +kmod-usb-net +kmod-usb-net-qmi-wwan +wwan - TITLE:=Control utility for mobile broadband modems -endef - -define Package/uqmi/description - uqmi is a command line tool for controlling mobile broadband modems using - the QMI-protocol. -endef - -TARGET_CFLAGS += \ - -I$(STAGING_DIR)/usr/include -ffunction-sections -fdata-sections - -TARGET_LDFLAGS += -Wl,--gc-sections - -CMAKE_OPTIONS += \ - -DDEBUG=1 - -define Package/uqmi/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/uqmi $(1)/sbin/ - $(CP) ./files/* $(1)/ -endef - -$(eval $(call BuildPackage,uqmi)) diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh deleted file mode 100755 index c0134f44dd..00 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ /dev/null @@ -1,471 +0,0 @@ -#!/bin/sh - -[ -n "$INCLUDE_ONLY" ] || { - . /lib/functions.sh - . ../netifd-proto.sh - init_proto "$@" -} - -proto_qmi_init_config() { - available=1 - no_device=1 - proto_config_add_string "device:device" - proto_config_add_string apn - proto_config_add_string auth - proto_config_add_string username - proto_config_add_string password - proto_config_add_string pincode - proto_config_add_int delay - proto_config_add_string modes - proto_config_add_string pdptype - proto_config_add_int profile - proto_config_add_boolean dhcp - proto_config_add_boolean dhcpv6 - proto_config_add_boolean autoconnect - proto_config_add_int plmn - proto_config_add_int timeout - proto_config_add_int mtu - proto_config_add_defaults -} - -proto_qmi_setup() { - local interface="$1" - local dataformat connstat plmn_mode mcc mnc - local device apn auth username password pincode delay modes pdptype - local profile dhcp dhcpv6 autoconnect plmn timeout mtu $PROTO_DEFAULT_OPTIONS - local ip4table ip6table - local cid_4 pdh_4 cid_6 pdh_6 - local ip_6 ip_prefix_length gateway_6 dns1_6 dns2_6 - - json_get_vars device apn auth username password pincode delay modes - json_get_vars pdptype profile dhcp dhcpv6 autoconnect plmn ip4table - json_get_vars ip6table timeout mtu $PROTO_DEFAULT_OPTIONS - - [ "$timeout" = "" ] && timeout="10" - - [ "$metric" = "" ] && metric="0" - - [ -n "$ctl_device" ] && device=$ctl_device - - [ -n "$device" ] || { - echo "No control device specified" - proto_notify_error "$interface" NO_DEVICE - proto_set_available "$interface" 0 - return 1 - } - - [ -n "$delay" ] && sleep "$delay" - - device="$(readlink -f $device)" - [ -c "$device" ] || { - echo "The specified control device does not exist" - proto_notify_error "$interface" NO_DEVICE - proto_set_available "$interface" 0 - return 1 - } - - devname="$(basename "$device")" - devpath="$(readlink -f /sys/class/usbmisc/$devname/device/)" - ifname="$( ls "$devpath"/net )" - [ -n "$ifname" ] || { - echo "The interface could not be found." - proto_notify_error "$interface" NO_IFACE - proto_set_available "$interface" 0 - return 1 - } - - [ -n "$mtu" ] && { - echo "Setting MTU to $mtu" - /sbin/ip link set dev $ifname mtu $mtu - } - - echo "Waiting
[PATCH] uqmi: Move to community packages repo
Signed-off-by: Arjun AK --- package/network/utils/uqmi/Makefile | 48 -- .../utils/uqmi/files/lib/netifd/proto/qmi.sh | 471 -- 2 files changed, 519 deletions(-) delete mode 100644 package/network/utils/uqmi/Makefile delete mode 100755 package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile deleted file mode 100644 index 53ca67230b..00 --- a/package/network/utils/uqmi/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=uqmi -PKG_RELEASE:=3 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git -PKG_SOURCE_DATE:=2020-11-22 -PKG_SOURCE_VERSION:=0a19b5b77140465c29e2afa7d611fe93abc9672f -PKG_MIRROR_HASH:=0a6641f8e167efd21d464b0b2aeb1fec5f974dddcdb8822fbd5d7190d0b741b4 -PKG_MAINTAINER:=Matti Laakso - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:= - -PKG_FLAGS:=nonshared - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/uqmi - SECTION:=net - CATEGORY:=Network - SUBMENU:=WWAN - DEPENDS:=+libubox +libblobmsg-json +kmod-usb-net +kmod-usb-net-qmi-wwan +wwan - TITLE:=Control utility for mobile broadband modems -endef - -define Package/uqmi/description - uqmi is a command line tool for controlling mobile broadband modems using - the QMI-protocol. -endef - -TARGET_CFLAGS += \ - -I$(STAGING_DIR)/usr/include -ffunction-sections -fdata-sections - -TARGET_LDFLAGS += -Wl,--gc-sections - -CMAKE_OPTIONS += \ - -DDEBUG=1 - -define Package/uqmi/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/uqmi $(1)/sbin/ - $(CP) ./files/* $(1)/ -endef - -$(eval $(call BuildPackage,uqmi)) diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh deleted file mode 100755 index c0134f44dd..00 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ /dev/null @@ -1,471 +0,0 @@ -#!/bin/sh - -[ -n "$INCLUDE_ONLY" ] || { - . /lib/functions.sh - . ../netifd-proto.sh - init_proto "$@" -} - -proto_qmi_init_config() { - available=1 - no_device=1 - proto_config_add_string "device:device" - proto_config_add_string apn - proto_config_add_string auth - proto_config_add_string username - proto_config_add_string password - proto_config_add_string pincode - proto_config_add_int delay - proto_config_add_string modes - proto_config_add_string pdptype - proto_config_add_int profile - proto_config_add_boolean dhcp - proto_config_add_boolean dhcpv6 - proto_config_add_boolean autoconnect - proto_config_add_int plmn - proto_config_add_int timeout - proto_config_add_int mtu - proto_config_add_defaults -} - -proto_qmi_setup() { - local interface="$1" - local dataformat connstat plmn_mode mcc mnc - local device apn auth username password pincode delay modes pdptype - local profile dhcp dhcpv6 autoconnect plmn timeout mtu $PROTO_DEFAULT_OPTIONS - local ip4table ip6table - local cid_4 pdh_4 cid_6 pdh_6 - local ip_6 ip_prefix_length gateway_6 dns1_6 dns2_6 - - json_get_vars device apn auth username password pincode delay modes - json_get_vars pdptype profile dhcp dhcpv6 autoconnect plmn ip4table - json_get_vars ip6table timeout mtu $PROTO_DEFAULT_OPTIONS - - [ "$timeout" = "" ] && timeout="10" - - [ "$metric" = "" ] && metric="0" - - [ -n "$ctl_device" ] && device=$ctl_device - - [ -n "$device" ] || { - echo "No control device specified" - proto_notify_error "$interface" NO_DEVICE - proto_set_available "$interface" 0 - return 1 - } - - [ -n "$delay" ] && sleep "$delay" - - device="$(readlink -f $device)" - [ -c "$device" ] || { - echo "The specified control device does not exist" - proto_notify_error "$interface" NO_DEVICE - proto_set_available "$interface" 0 - return 1 - } - - devname="$(basename "$device")" - devpath="$(readlink -f /sys/class/usbmisc/$devname/device/)" - ifname="$( ls "$devpath"/net )" - [ -n "$ifname" ] || { - echo "The interface could not be found." - proto_notify_error "$interface" NO_IFACE - proto_set_available "$interface" 0 - return 1 - } - - [ -n "$mtu" ] && { - echo "Setting MTU to $mtu" - /sbin/ip link set dev $ifname mtu $mtu - } - - echo "Waiting for SIM initialization" - local uninitialized_timeout=0 - while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do - [ -e "$device" ] || return 1 - if [ "$uninitialized_timeout" -lt "$timeout"