-
Notifications
You must be signed in to change notification settings - Fork 162
Description
模组型号:RM500Q-cn
路由器平台:rk3399
路由器系统发行版:主线openwrt imm iostore均测试过
以下模块通信协议均为pcie
qmode-next:
出现的问题为 配置对应at端口:/dev/mhi_DUN后 无法与模块通信
root@iStoreOS:~# lspci -vnn
01:00.0 Unassigned class [ff00]: Qualcomm Device [17cb:0306]
Subsystem: Qualcomm Device [17cb:5003]
Flags: bus master, fast devsel, latency 0, IRQ 88
Memory at fa000000 (64-bit, non-prefetchable) [size=4K]
Memory at fa001000 (64-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=4/32 Maskable+ 64bit+
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [148] Secondary PCI Express
Capabilities: [168] Physical Layer 16.0 GT/s <?>
Capabilities: [18c] Lane Margining at the Receiver <?>
Capabilities: [19c] Transaction Processing Hints
Capabilities: [228] Latency Tolerance Reporting
Capabilities: [230] L1 PM Substates
Capabilities: [240] Data Link Feature <?>
Kernel driver in use: mhi_q
root@iStoreOS:~#
root@iStoreOS:~# ls /dev
btrfs-control i2c-0 loop5 mmcblk2boot1 rtc0 tty12 tty21 tty30 tty4 tty49 tty58 ttyS0 vcsu1
bus i2c-3 loop6 mmcblk2p1 shm tty13 tty22 tty31 tty40 tty5 tty59 ttyS1 watchdog
console kmsg loop7 mmcblk2p2 stderr tty14 tty23 tty32 tty41 tty50 tty6 ttyS2 watchdog0
cpu_dma_latency log mhi_BHI mmcblk2p3 stdin tty15 tty24 tty33 tty42 tty51 tty60 ttyS3 zero
full loop-control mhi_DIAG mmcblk2rpmb stdout tty16 tty25 tty34 tty43 tty52 tty61 urandom
gpiochip0 loop0 mhi_DUN null tty tty17 tty26 tty35 tty44 tty53 tty62 vcs
gpiochip1 loop1 mhi_LOOPBACK ppp tty0 tty18 tty27 tty36 tty45 tty54 tty63 vcs1
gpiochip2 loop2 mhi_QMI0 ptmx tty1 tty19 tty28 tty37 tty46 tty55 tty7 vcsa
gpiochip3 loop3 mmcblk2 pts tty10 tty2 tty29 tty38 tty47 tty56 tty8 vcsa1
gpiochip4 loop4 mmcblk2boot0 random tty11 tty20 tty3 tty39 tty48 tty57 tty9 vcsu
root@iStoreOS:~#
确认有端口无法通信后改用qmode
qmodem 使用遇到的问题:
1:modem_path= 为空
[2024-08-01 18:37:08] modem_dial:modem_path=,driver=mhi,interface=0000_01_00_0,at_port=/dev/mhi_DUN,using_sim_slot:1,dns_list:
[2024-08-01 18:37:16] modem_dial:info sim card is ready
[2024-08-01 18:37:23] modem_dial:info sim card is ready
[2024-08-01 18:37:31] modem_dial:info sim card is ready
[2024-08-01 18:37:38] modem_dial:info sim card is ready
root@iStoreOS:~# uci show qmodem
qmodem.main=main
qmodem.main.enable_dial='1'
qmodem.main.try_preset_usb='1'
qmodem.main.try_preset_pcie='1'
qmodem.main.enable_pcie_scan='1'
qmodem.main.start_delay='0'
qmodem.main.enable_usb_scan='1'
qmodem.0000_01_00_0=modem-device
qmodem.0000_01_00_0.slot='/sys/bus/pci/devices/0000:01:00.0/'
qmodem.0000_01_00_0.data_interface='pcie'
qmodem.0000_01_00_0.alias='0000_01_00_0'
qmodem.0000_01_00_0.name='RM500Q-GL'
qmodem.0000_01_00_0.soft_reboot='1'
qmodem.0000_01_00_0.pdp_index='1'
qmodem.0000_01_00_0.manufacturer='quectel'
qmodem.0000_01_00_0.platform='qualcomm'
qmodem.0000_01_00_0.at_port='/dev/mhi_DUN'
qmodem.0000_01_00_0.pre_dial_delay='0'
qmodem.0000_01_00_0.post_init_delay='0'
qmodem.0000_01_00_0.modes='qmi' 'mbim' 'ecm' 'ncm' 'rndis'
qmodem.0000_01_00_0.is_fixed_device='1'
qmodem.0000_01_00_0.enable_dial='1'
root@iStoreOS:~#
root@iStoreOS:~# lspci
00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3399 PCI Express Root Port
01:00.0 Unassigned class [ff00]: Qualcomm Device 0306
root@iStoreOS:~#
root@iStoreOS:~# lsmod | grep mhi
pcie_mhi 155648 0
root@iStoreOS:~#
root@iStoreOS:~# ls /sys/bus/pci/devices/0000:01:00.0/
0306_00.01.00 0306_00.01.00_LOOPBACK ari_enabled current_link_width enable max_link_width power_state resource0 uevent
0306_00.01.00_DIAG 0306_00.01.00_QMI0 broken_parity_status device irq mhi_cntrl_q remove resource2 vendor
0306_00.01.00_DUN 0306_00.01.00_TIME_SYNC class devspec link modalias rescan revision
0306_00.01.00_EFS aer_dev_correctable config dma_mask_bits local_cpulist msi_bus reset subsystem
0306_00.01.00_IP_CTRL aer_dev_fatal consistent_dma_mask_bits driver local_cpus msi_irqs reset_method subsystem_device
0306_00.01.00_IP_HW0 aer_dev_nonfatal current_link_speed driver_override max_link_speed power resource subsystem_vendor
root@iStoreOS:~#
经观察发现 QModem 代码中读取的是 path 字段 但 uci 配置里用的是 slot 字段(qmodem.0000_01_00_0.slot),字段名不一致导致程序无法读取到指定的 PCI 路径;在使用uci rename qmodem.0000_01_00_0.slot=path 修改字段名称后 能够正常通信模块
2:没有自动生成接口:
没发现并解决问题1之前 一直没有生成网络接口 并且手动配置也不能上网 解决问题1后才能正常上网。
3:ipv6-pd无法下发 :
在更改PDP类型为:IPv4/IPv6 勾选不修改resolv.conf 扩展前缀 设置lan接口ipv6设置为中继等等措施后均无法获取ipv6-pd,但是获取到了2409开头的ipv6地址 这个地址有点奇怪 因为拨号日志里面 并没有看到获取ipv6地址信息:
[2026-02-20 16:19:39] modem_dial:modem_path=/sys/bus/pci/devices/0000:01:00.0/,driver=unknown,interface=RM500Q-CN,at_port=/dev/mhi_DUN,using_sim_slot:1,dns_list:223.5.5.5
[2026-02-20 16:19:44] modem_dial:info sim card is ready
[2026-02-20 16:19:44] modem_dial:create interface RM500Q-CN with proto dhcp and metric 10
[2026-02-20 16:19:44] modem_dial:create interface RM500Q-CNv6 with proto dhcpv6 and metric 10
[2026-02-20 16:19:44] modem_dial:network reload
[2026-02-20 16:19:44] modem_dial:firewall reload
[2026-02-20 16:19:44] modem_dial:set interface RM500Q-CN to rmnet_mhi0.1
[2026-02-20 16:19:44] modem_dial:dialing /sys/bus/pci/devices/0000:01:00.0/ driver mhi
[2026-02-20 16:19:44] modem_dial:dialing: quectel-CM-M -4 -6 -n 1 -i rmnet_mhi0 -D -d -M 10 -f /var/run/qmodem/0000_01_00_0_dir/dial_log
[02-20_16:19:44:853] network interface 'rmnet_mhi0' or qmidev '' is not exist
[02-20_16:19:44:853] netcard driver = pcie_mhi, driver version = V1.3.8
[02-20_16:19:44:853] qmap_mode = 1, qmap_version = 9, qmap_size = 15360, muxid = 0x81, qmap_netcard = rmnet_mhi0.1
[02-20_16:19:44:853] Modem works in QMI mode
[02-20_16:19:44:881] cdc_wdm_fd = 8
[02-20_16:19:44:983] Get clientWDS = 14
[02-20_16:19:44:985] Get clientWDS = 15
[02-20_16:19:44:988] Get clientDMS = 1
[02-20_16:19:44:992] Get clientNAS = 3
[02-20_16:19:44:996] Get clientUIM = 1
[02-20_16:19:44:999] Get clientWDA = 1
[02-20_16:19:45:002] requestBaseBandVersion RM500QCNAAR13A06M4G
[02-20_16:19:45:002] Modem model RM500QCNAAR13A06M4G does not require FCC authentication
[02-20_16:19:45:005] qmap_settings.rx_urb_size = 15360
[02-20_16:19:45:005] qmap_settings.ul_data_aggregation_max_datagrams = 11
[02-20_16:19:45:006] qmap_settings.ul_data_aggregation_max_size = 8192
[02-20_16:19:45:006] qmap_settings.dl_minimum_padding = 0
[02-20_16:19:45:026] Skipping FCC authentication - not required for this modem model
[02-20_16:19:45:031] requestGetSIMStatus SIMStatus: SIM_READY
[02-20_16:19:45:040] requestGetProfile[pdp:1 index:1] cmnet///0/IPV4V6
[02-20_16:19:45:044] requestRegistrationState2 MCC: 460, MNC: 0, PS: Attached, DataCap: 5G_SA
[02-20_16:19:45:047] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[02-20_16:19:45:051] requestQueryDataCall IPv6ConnectionStatus: DISCONNECTED
[02-20_16:19:45:051] ip link set dev rmnet_mhi0 down
[02-20_16:19:45:056] ip addr flush dev rmnet_mhi0.1
[02-20_16:19:45:059] ip link set dev rmnet_mhi0.1 down
[02-20_16:19:45:501] requestSetupDataCall WdsConnectionIPv4Handle: 0x214337b0
[02-20_16:19:45:550] requestSetupDataCall WdsConnectionIPv6Handle: 0x2127ced0
[02-20_16:19:45:569] ip link set dev rmnet_mhi0 up
[02-20_16:19:45:575] ip link set dev rmnet_mhi0.1 up
[02-20_16:19:45:581] ip -4 address flush dev rmnet_mhi0.1
[02-20_16:19:45:584] ip -4 address add 10.82.3.50/30 dev rmnet_mhi0.1
[02-20_16:19:45:588] ip -4 route add default via 10.82.3.49 dev rmnet_mhi0.1 metric 10
日志信息
模组配置 (Module Configuration)
```bash uci show qmodem # 显示模组配置 # Show module configurationroot@iStoreOS:~# uci show qmodem
qmodem.main=main
qmodem.main.enable_dial='1'
qmodem.main.try_preset_usb='1'
qmodem.main.try_preset_pcie='1'
qmodem.main.enable_pcie_scan='1'
qmodem.main.start_delay='0'
qmodem.0000_01_00_0=modem-device
qmodem.0000_01_00_0.path='/sys/bus/pci/devices/0000:01:00.0/'
qmodem.0000_01_00_0.data_interface='pcie'
qmodem.0000_01_00_0.alias='RM500Q-CN'
qmodem.0000_01_00_0.name='RM500Q-CN'
qmodem.0000_01_00_0.soft_reboot='1'
qmodem.0000_01_00_0.pdp_index='1'
qmodem.0000_01_00_0.manufacturer='quectel'
qmodem.0000_01_00_0.platform='qualcomm'
qmodem.0000_01_00_0.at_port='/dev/mhi_DUN'
qmodem.0000_01_00_0.modes='ecm' 'ncm' 'mbim' 'rndis' 'qmi'
qmodem.0000_01_00_0.pre_dial_delay='0'
qmodem.0000_01_00_0.post_init_delay='0'
qmodem.0000_01_00_0.enable_dial='1'
qmodem.0000_01_00_0.sms_at_port='/dev/mhi_DUN'
qmodem.0000_01_00_0.override_at_port='/dev/mhi_DUN'
qmodem.0000_01_00_0.dns_list='223.5.5.5'
qmodem.0000_01_00_0.extend_prefix='1'
qmodem.0000_01_00_0.pdp_type='ipv4v6'
qmodem.0000_01_00_0.auth='none'
qmodem.0000_01_00_0.metric='10'
qmodem.0000_01_00_0.slot='/sys/bus/pci/devices/0000:01:00.0/'
qmodem.0000_01_00_0.do_not_add_dns='1'
root@iStoreOS:~#
网络配置 (Network Configuration)
uci show network
# 显示网络配置
# Show network configuration粘贴结果到此处
Paste the output here
root@iStoreOS:~# cat /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'
config device
option name 'eth0.1'
option macaddr '8e:20:64:f7:7f:f8'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.9.1'
option netmask '255.255.255.0'
option ipv6 '1'
list dns '223.5.5.5'
option ip6assign '64'
config device
option name 'eth0.2'
option macaddr '8e:20:64:f7:7f:f7'
config interface 'wan'
option device 'eth0.2'
option proto 'dhcp'
config interface 'wan6'
option device 'eth0.2'
option proto 'dhcpv6'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 3 4 5 7t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '6 7t'
config interface 'pon'
option proto 'static'
option device 'eth0.2'
option ifname 'eth0.2'
option delegate '0'
option ipaddr '192.168.1.254'
option netmask '255.255.255.0'
option metric '100'
config route 'pon_route'
option interface 'pon'
option target '192.168.1.10'
option netmask '255.255.255.0'
option gateway '192.168.1.254'
option metric '100'
config interface '0000_01_00_0'
option proto 'dhcp'
option device 'rmnet_mhi0.1'
config interface '0000_01_00_0V6'
option proto 'dhcpv6'
option device '@0000_01_00_0'
option reqaddress 'try'
option reqprefix 'auto'
root@iStoreOS:~#
系统日志 (System Logs)
logread
# 查看系统日志
# View system logs粘贴结果到此处
Paste the output here
内核日志 (Kernel Logs)
dmesg
# 查看内核日志
# View kernel logs粘贴结果到此处
Paste the output here
</details>
</details>
如果是PCIe模组相关的问题,执行以下命令并填写结果:
**If the issue is related to PCIe modules, execute the following command and paste the output:**
<details>
<summary>PCIe设备信息 (PCIe Devices)</summary>
```bash
lspci
# 列出PCIe设备
# List PCIe devices
粘贴结果到此处
Paste the output here
root@iStoreOS:~# lspci
00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3399 PCI Express Root Port
01:00.0 Unassigned class [ff00]: Qualcomm Device 0306
root@iStoreOS:~#
如果模组扫描存在问题,执行以下命令并填写结果:
If there is an issue with module scanning, execute the following command and paste the output:
模组扫描 (Module Scanning)
/usr/share/qmodem/modem_scan.sh scan
# 扫描模组
# Scan modules粘贴结果到此处
Paste the output here
root@iStoreOS:~# /usr/share/qmodem/modem_scan.sh scan
{
"status": "error",
"message": "Port not found"
}