diff --git a/data/dispatcher-fcc-unlock/1eac b/data/dispatcher-fcc-unlock/1eac deleted file mode 100644 index 44ce46d77d72cb4579f3d59fc0ac9fbf3184e90c..0000000000000000000000000000000000000000 --- 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 fa3729275082677e8ce3a01311ef8430797dbe99..d5542918212b3532a726ad524a6945ecb0e053fe 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 d2f0d118f9d5f1ccbee8696677d3ad85a7917dfc..b834dd5609a8fbb6d320c28a4b0eccfe0272198e 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@'