create: 蜂窝拨号:空 APN 要靠空 APN 附着,改 1 号配置后必须重新附着

MemRelay-Operation: memory-save:ltedongle-null-apn-reattach-20261130
MemRelay-Resource: bb992ebe-8935-4cc3-bb6c-5954498d3103
This commit is contained in:
2026-11-30 16:26:26 +08:00
parent 3005e26742
commit 59a90941e7
@@ -0,0 +1,30 @@
---
title: 蜂窝拨号:空 APN 要靠空 APN 附着,改 1 号配置后必须重新附着
type: experience
permalink: main/projects/bc51a377-ed2d-4afc-a176-554fce220d45/蜂窝拨号空-apn-要靠空-apn-附着改-1-号配置后必须重新附着
stable_id: bb992ebe-8935-4cc3-bb6c-5954498d3103
scope: project
memory_type: experience
project_id: bc51a377-ed2d-4afc-a176-554fce220d45
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
status: active
revision: 1
request_id: ltedongle-null-apn-reattach-20261130
created_at: '2026-11-30T08:26:21.284479+00:00'
updated_at: '2026-11-30T08:26:21.284479+00:00'
tags:
- cellular
- apn
- networkmanager
- modemmanager
- mifipanel
---
UFI003_CT 基带 + ModemManager 1.24 + NetworkManager 1.52 上实测(2026-11-30,板子 07e6697d,电信卡 46011):
- 基带 QMI 1 号配置(profile 1)同时是 LTE 附着用的接入点。空 APN 拨号只在“用空 APN 附着”时被允许;1 号配置里存着 APN,或者刚把它从某个 APN 改回空却没重新附着时,空 APN 拨号报 null-apn-disallowed(QMI call end reason 2,242)。关开一次射频(qmicli --dms-set-operating-mode=low-power 再 online)重新附着后空 APN 又能拨上。
- NetworkManager 的 gsm.auto-config=true 依赖 mobile-broadband-provider-info,镜像里没有这个包时直接报 Failed to select the specified APN。面板默认配置改成 auto-config=false 且不写 apn(由网络下发),不装这个包。
- 面板做法(mifipanel/src/cellular.rs):连接名 cellular,文件 /etc/NetworkManager/system-connections/cellular.nmconnection(600),镜像配方 image/debian/UFI003_MB_V02/cellular.nmconnection 与面板生成的内容必须一致(单元测试比对)。拨号前若连接没写 APN、基带 1 号配置有 APN,照抄 APN 和用户名(基带读不出密码)。首页保存 APN 时基带配置变了就先重新附着再重拨。
- 飞行模式是面板直接对基带下的 QMI 命令,ModemManager 不知道,NetworkManager 会一直卡在 activating。打开飞行模式时要 nmcli connection down cellular,关掉后再拨。user-requested down 会挡住 NetworkManager 自动重连,靠面板巡检重拨。
- nmcli -t -f GENERAL.STATE,IP4.ADDRESS,IP6.ADDRESS connection show cellular:未激活时没有 GENERAL.STATE 行。nmcli -t -f TYPE,STATE device 里 gsm:disconnected 表示基带已交给 NM、可拨号。
- mmcli --simple-disconnect 不能模拟断线;用 qmicli 关开射频模拟信号丢失,NM 在信号恢复后 2 秒内自己重连。