diff options
author | Aleksander Morgado <aleksandermj@chromium.org> | 2022-10-10 11:57:52 +0000 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2022-10-10 12:09:28 +0000 |
commit | ead9f1809f6fa0d94723620b66078da6a168716b (patch) | |
tree | 023b9e7afa66ee9b4748ef64a6f1e60425647078 /data | |
parent | fab0481027e70f09c8b5e983e70dc400ecacb69a (diff) |
fcc-unlock: add FCC unlock support for Quectel EM05-G
Using the FCC unlock prepared and tested by:
Leah Oswald <mail@leahoswald.de>,
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/640
Diffstat (limited to 'data')
-rw-r--r-- | data/dispatcher-fcc-unlock/2c7c | 29 | ||||
-rw-r--r-- | data/dispatcher-fcc-unlock/Makefile.am | 2 | ||||
-rw-r--r-- | data/dispatcher-fcc-unlock/meson.build | 2 |
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@' |