modemmanager: fix netifd proto sim path

Use specific SIM path instead of 'any' when unlocking with PIN
code. This fixes PIN unlock issues on devices with multiple modems
where 'any' could select the wrong modem.

Bump modemmanager PKG_RELEASE

Signed-off-by: micpf <micpf@westermo.com>
This commit is contained in:
micpf
2026-02-09 16:52:10 +01:00
committed by Florian Eckert
parent 8ce03e3065
commit e1d680d19a
2 changed files with 4 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=modemmanager PKG_NAME:=modemmanager
PKG_VERSION:=1.24.0 PKG_VERSION:=1.24.0
PKG_RELEASE:=8 PKG_RELEASE:=9
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git

View File

@@ -393,6 +393,7 @@ modemmanager_check_state_locked() {
local unlock_required unlock_retries unlock_retry unlock_lock local unlock_required unlock_retries unlock_retry unlock_lock
local unlock_value unlock_match local unlock_value unlock_match
local sim_path
if [ -z "$pincode" ]; then if [ -z "$pincode" ]; then
echo "PIN required" echo "PIN required"
@@ -434,7 +435,8 @@ modemmanager_check_state_locked() {
return 1 return 1
fi fi
mmcli --modem="${device}" -i any --pin=${pincode} || { sim_path="$(modemmanager_get_field "${modemstatus}" "modem.generic.sim")"
mmcli --modem="${device}" -i "${sim_path}" --pin=${pincode} || {
proto_notify_error "${interface}" MM_PINCODE_WRONG proto_notify_error "${interface}" MM_PINCODE_WRONG
proto_block_restart "${interface}" proto_block_restart "${interface}"
return 1 return 1