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
This commit is contained in:
Aleksander Morgado
2022-10-10 11:57:52 +00:00
committed by Aleksander Morgado
parent fab0481027
commit ead9f1809f
3 changed files with 33 additions and 0 deletions

View File

@@ -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 $?

View File

@@ -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:

View File

@@ -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@'