aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/dispatcher-fcc-unlock/2c7c29
-rw-r--r--data/dispatcher-fcc-unlock/Makefile.am2
-rw-r--r--data/dispatcher-fcc-unlock/meson.build2
3 files changed, 33 insertions, 0 deletions
diff --git a/data/dispatcher-fcc-unlock/2c7c b/data/dispatcher-fcc-unlock/2c7c
new file mode 100644
index 00000000..1161aec6
--- /dev/null
+++ b/data/dispatcher-fcc-unlock/2c7c
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# SPDX-License-Identifier: CC0-1.0
+# 2022 Leah Oswald <mail@leahoswald.de>
+#
+# Queltec EM05-G FCC unlock mechanism
+#
+
+# 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 name
+ echo "$PORT" | grep -q cdc-wdm && {
+ CDC_WDM_PORT=$PORT
+ break
+ }
+done
+
+# fail if no cdc-wdm port exposed
+[ -n "$CDC_WDM_PORT" ] || exit 2
+
+# run mbimcli operation
+mbimcli --device-open-proxy --device="/dev/$CDC_WDM_PORT" --quectel-set-radio-state=on
+exit $?
diff --git a/data/dispatcher-fcc-unlock/Makefile.am b/data/dispatcher-fcc-unlock/Makefile.am
index a98a68fa..7f6224ca 100644
--- a/data/dispatcher-fcc-unlock/Makefile.am
+++ b/data/dispatcher-fcc-unlock/Makefile.am
@@ -11,6 +11,7 @@ fccunlockavailable_SCRIPTS = \
105b \
1199 \
1eac \
+ 2c7c \
$(NULL)
EXTRA_DIST = $(fccunlockavailable_SCRIPTS)
@@ -26,6 +27,7 @@ install-data-hook:
$(LN_S) -f 1199 413c:81a3; \
$(LN_S) -f 1199 413c:81a8; \
$(LN_S) -f 1eac 1eac:1001; \
+ $(LN_S) -f 2c7c 2c7c:030a; \
$(NULL)
uninstall-hook:
diff --git a/data/dispatcher-fcc-unlock/meson.build b/data/dispatcher-fcc-unlock/meson.build
index f945fbf8..5dc3b6a0 100644
--- a/data/dispatcher-fcc-unlock/meson.build
+++ b/data/dispatcher-fcc-unlock/meson.build
@@ -14,6 +14,7 @@ examples = files(
'105b',
'1199',
'1eac',
+ '2c7c',
)
install_data(
@@ -29,6 +30,7 @@ vidpids = {
'413c:81a3': '1199',
'413c:81a8': '1199',
'1eac:1001': '1eac',
+ '2c7c:030a': '2c7c',
}
ln_cmd = 'ln -fs @0@ ${DESTDIR}@1@'