aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/dispatcher-fcc-unlock/1eac34
-rw-r--r--data/dispatcher-fcc-unlock/2c7c24
-rw-r--r--data/dispatcher-fcc-unlock/meson.build6
3 files changed, 22 insertions, 42 deletions
diff --git a/data/dispatcher-fcc-unlock/1eac b/data/dispatcher-fcc-unlock/1eac
deleted file mode 100644
index 44ce46d7..00000000
--- a/data/dispatcher-fcc-unlock/1eac
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-# SPDX-License-Identifier: CC0-1.0
-# 2021 Aleksander Morgado <aleksander@aleksander.es>
-#
-# Quectel EM120 FCC unlock operation
-#
-
-# require program name and at least 2 arguments
-[ $# -lt 2 ] && exit 1
-
-# first argument is DBus path, not needed here
-shift
-
-# second and next arguments are control port names
-for PORT in "$@"; do
- # match port type in Linux 5.14 and newer
- grep -q MBIM "/sys/class/wwan/$PORT/type" 2>/dev/null && {
- MBIM_PORT=$PORT
- break
- }
- # match port name in Linux 5.13
- echo "$PORT" | grep -q MBIM && {
- MBIM_PORT=$PORT
- break
- }
-done
-
-# fail if no MBIM port exposed
-[ -n "$MBIM_PORT" ] || exit 2
-
-# run mbimcli operation
-mbimcli --device-open-proxy --device="/dev/$MBIM_PORT" --quectel-set-radio-state=on
-exit $?
diff --git a/data/dispatcher-fcc-unlock/2c7c b/data/dispatcher-fcc-unlock/2c7c
index fa372927..d5542918 100644
--- a/data/dispatcher-fcc-unlock/2c7c
+++ b/data/dispatcher-fcc-unlock/2c7c
@@ -1,9 +1,18 @@
#!/bin/sh
# SPDX-License-Identifier: CC0-1.0
+# 2021 Aleksander Morgado <aleksander@aleksander.es>
# 2022 Leah Oswald <mail@leahoswald.de>
+# 2025 Jongmin Kim <jmkim@debian.org>
#
-# Queltec EM05-G FCC unlock mechanism
+# Quectel MBIM FCC unlock mechanism
+# EM05-G, 2c7c:030a
+# EM05-G (GR), 2c7c:0313
+# EM05-G (RS), 2c7c:0314
+# RM520N, 2c7c:0801
+# EM120, 1eac:1001
+# RM520N (HP shipped), 1eac:1004
+# RM520N (Lenovo shipped), 1eac:1007
#
# require program name and at least 2 arguments
@@ -14,16 +23,19 @@ shift
# second and next arguments are control port names
for PORT in "$@"; do
- # match port name
+ # match port type in Linux 5.14 and newer
+ grep -q MBIM "/sys/class/wwan/$PORT/type" 2>/dev/null ||
+ # match port name in Linux 5.13
+ echo "$PORT" | grep -qi MBIM ||
echo "$PORT" | grep -q cdc-wdm && {
- CDC_WDM_PORT=$PORT
+ MBIM_PORT="$PORT"
break
}
done
-# fail if no cdc-wdm port exposed
-[ -n "$CDC_WDM_PORT" ] || exit 2
+# fail if no MBIM port exposed
+[ -n "$MBIM_PORT" ] || exit 2
# run mbimcli operation
-mbimcli --device-open-proxy --device="/dev/$CDC_WDM_PORT" --quectel-set-radio-state=on
+mbimcli --device-open-proxy --device="/dev/$MBIM_PORT" --quectel-set-radio-state=on
exit $?
diff --git a/data/dispatcher-fcc-unlock/meson.build b/data/dispatcher-fcc-unlock/meson.build
index d2f0d118..b834dd56 100644
--- a/data/dispatcher-fcc-unlock/meson.build
+++ b/data/dispatcher-fcc-unlock/meson.build
@@ -14,7 +14,6 @@ examples = files(
'105b',
'1199',
'14c3',
- '1eac',
'2c7c',
)
@@ -32,10 +31,13 @@ vidpids = {
'413c:81a3': '1199',
'413c:81a8': '1199',
'14c3:4d75': '14c3',
- '1eac:1001': '1eac',
+ '1eac:1001': '2c7c',
+ '1eac:1004': '2c7c',
+ '1eac:1007': '2c7c',
'2c7c:030a': '2c7c',
'2c7c:0313': '2c7c',
'2c7c:0314': '2c7c',
+ '2c7c:0801': '2c7c',
}
ln_cmd = 'ln -fs @0@ ${DESTDIR}@1@'