summaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-11-06 02:46:36 +0000
committerDaniel Golle <daniel@makrotopia.org>2021-11-06 02:46:36 +0000
commit81832b38a0833290ad794065f4bde07df271beb1 (patch)
treef35a1264a7d1c0a9a19973b85572644bbe004b2b /package/network
parent9f90a89655d41ba8afcd8018d7bc8b3753beb17e (diff)
downloadopenwrt-81832b38a0833290ad794065f4bde07df271beb1.tar.gz
openwrt-81832b38a0833290ad794065f4bde07df271beb1.tar.bz2
openwrt-81832b38a0833290ad794065f4bde07df271beb1.zip
uqmi: update to git HEAD and improve proto handler script
e303ba8 uqmi: update code generator 7880de8 uqmi: sync data from libqmi project d647f8d uqmi: add more diagnostics commands 6f95626 uim: add --uim-get-sim-state Use newly introduce --uim-get-sim-state command to query PIN status from modems which require using uim instead of dms command for that. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/utils/uqmi/Makefile8
-rwxr-xr-xpackage/network/utils/uqmi/files/lib/netifd/proto/qmi.sh8
2 files changed, 9 insertions, 7 deletions
diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile
index 53ca67230b..8f0caf5e8d 100644
--- a/package/network/utils/uqmi/Makefile
+++ b/package/network/utils/uqmi/Makefile
@@ -1,13 +1,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uqmi
-PKG_RELEASE:=3
+PKG_RELEASE:=$(AUTORELEASE)
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_SOURCE_DATE:=2021-11-06
+PKG_SOURCE_VERSION:=6f956265167945267d676c99f123a8c822f0a77b
+PKG_MIRROR_HASH:=1dbe14a28ec59b364dbde5dea9e10ed1c5c3eda274b6c7690c793a06643acf3e
PKG_MAINTAINER:=Matti Laakso <malaakso@elisanet.fi>
PKG_LICENSE:=GPL-2.0
diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
index c0134f44dd..156e57b135 100755
--- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
+++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
@@ -94,7 +94,8 @@ proto_qmi_setup() {
fi
done
- if uqmi -s -d "$device" --get-pin-status | grep '"Not supported"\|"Invalid QMI command"' > /dev/null; then
+ if uqmi -s -d "$device" --uim-get-sim-state | grep -q '"Not supported"\|"Invalid QMI command"' &&
+ uqmi -s -d "$device" --get-pin-status | grep -q '"Not supported"\|"Invalid QMI command"' ; then
[ -n "$pincode" ] && {
uqmi -s -d "$device" --verify-pin1 "$pincode" > /dev/null || uqmi -s -d "$device" --uim-verify-pin1 "$pincode" > /dev/null || {
echo "Unable to verify PIN"
@@ -105,7 +106,8 @@ proto_qmi_setup() {
}
else
. /usr/share/libubox/jshn.sh
- json_load "$(uqmi -s -d "$device" --get-pin-status)"
+ json_load "$(uqmi -s -d "$device" --get-pin-status)" 2>&1 | grep -q Failed &&
+ json_load "$(uqmi -s -d "$device" --uim-get-sim-state)"
json_get_var pin1_status pin1_status
json_get_var pin1_verify_tries pin1_verify_tries
@@ -144,7 +146,7 @@ proto_qmi_setup() {
echo "PIN already verified"
;;
*)
- echo "PIN status failed ($pin1_status)"
+ echo "PIN status failed (${pin1_status:-sim_not_present})"
proto_notify_error "$interface" PIN_STATUS_FAILED
proto_block_restart "$interface"
return 1