QMI what is and how it works

i have 2 router both with openwrt and a sierra wirelecc MC7430 LTE modem, used in qmi mode

i need to understand a little more about this QMI support and it's behaviour
in the past i have a lot of problem with this router, and i read around the web less or more , tried some command and at the end it works
today, i had a problem in one of this router and to test the modem i swap the card between the two router ... and start again with the pain!!! they doesn't work anymore, under a piece of logread from the mobile router but it's the same on the associazione router, it tries to connect and hang up with the Network registration failed ....

root@mobile:~# logread -f
Mon Apr  3 00:52:26 2023 daemon.notice netifd: Interface 'tim' is setting up now
Mon Apr  3 00:52:26 2023 daemon.notice netifd: tim (3667): Waiting for SIM initialization
Mon Apr  3 00:52:26 2023 daemon.notice netifd: tim (3667): Failed to parse message data
Mon Apr  3 00:52:28 2023 daemon.notice netifd: tim (3667): Device does not support 802.3 mode. Informing driver of raw-ip only for wwan0 ..
Mon Apr  3 00:52:28 2023 daemon.notice netifd: tim (3667): Waiting for network registration
Mon Apr  3 00:52:41 2023 daemon.notice netifd: tim (3667): Network registration failed, registration timeout reached
Mon Apr  3 00:52:41 2023 daemon.notice netifd: tim (3745): Stopping network tim
Mon Apr  3 00:52:41 2023 daemon.notice netifd: tim (3745): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "tim" } (Permission denied)
Mon Apr  3 00:52:41 2023 daemon.notice netifd: Interface 'tim' is now down

playing with the qmicli command i found a profile list , as soon as i modify this entry it start to works and connect to the carrier

root@mobile:~# qmicli -d /dev/cdc-wdm0 --wds-get-profile-list=3gpp
Profile list retrieved:
        [1] 3gpp -
                APN: 'apn.fastweb.it'
                PDP type: 'ipv4'
                PDP context number: '1'
                Username: ''
                Password: ''
                Auth: 'none'
                No roaming: 'no'
                APN disabled: 'no'


root@mobile:~# qmicli -d /dev/cdc-wdm0  --wds-modify-profile=3gpp,1,apn="ibox.tim.it"
Profile successfully modified.
root@mobile:~# qmicli -d /dev/cdc-wdm0 --wds-get-profile-list=3gpp
Profile list retrieved:
        [1] 3gpp -
                APN: 'ibox.tim.it'
                PDP type: 'ipv4'
                PDP context number: '1'
                Username: ''
                Password: ''
                Auth: 'none'
                No roaming: 'no'
                APN disabled: 'no

Mon Apr  3 00:56:16 2023 daemon.notice netifd: Interface 'tim' is setting up now
Mon Apr  3 00:56:16 2023 daemon.notice netifd: tim (3840): Waiting for SIM initialization
Mon Apr  3 00:56:17 2023 daemon.notice netifd: tim (3840): Failed to parse message data
Mon Apr  3 00:56:17 2023 daemon.notice netifd: tim (3840): PIN already verified
Mon Apr  3 00:56:17 2023 daemon.notice netifd: tim (3840): Device does not support 802.3 mode. Informing driver of raw-ip only for wwan0 ..
Mon Apr  3 00:56:18 2023 daemon.notice netifd: tim (3840): Waiting for network registration
Mon Apr  3 00:56:19 2023 daemon.notice netifd: tim (3840): Starting network tim
Mon Apr  3 00:56:19 2023 daemon.notice netifd: tim (3840): Setting up wwan0
Mon Apr  3 00:56:19 2023 daemon.notice netifd: Interface 'tim' is now up
Mon Apr  3 00:56:19 2023 daemon.notice netifd: Network device 'wwan0' link is up
Mon Apr  3 00:56:20 2023 daemon.notice netifd: Network alias 'wwan0' link is up
Mon Apr  3 00:56:20 2023 daemon.notice netifd: Interface 'tim_4' is enabled
Mon Apr  3 00:56:20 2023 daemon.notice netifd: Interface 'tim_4' has link connectivity
Mon Apr  3 00:56:20 2023 daemon.notice netifd: Interface 'tim_4' is setting up now
Mon Apr  3 00:56:20 2023 daemon.notice netifd: tim_4 (3921): udhcpc: started, v1.35.0
Mon Apr  3 00:56:20 2023 user.notice firewall: Reloading firewall due to ifup of tim (wwan0)
Mon Apr  3 00:56:20 2023 daemon.notice netifd: tim_4 (3921): udhcpc: broadcasting discover
Mon Apr  3 00:56:20 2023 daemon.notice netifd: tim_4 (3921): udhcpc: broadcasting select for 10.165.9.57, server 10.165.9.58
Mon Apr  3 00:56:20 2023 daemon.notice netifd: tim_4 (3921): udhcpc: lease of 10.165.9.57 obtained from 10.165.9.58, lease time 7200
Mon Apr  3 00:56:21 2023 daemon.notice netifd: Interface 'tim_4' is now up
Mon Apr  3 00:56:21 2023 daemon.info dnsmasq[1]: reading /tmp/resolv.conf.d/resolv.conf.auto
Mon Apr  3 00:56:21 2023 daemon.info dnsmasq[1]: using nameserver 1.1.1.1#53
Mon Apr  3 00:56:21 2023 daemon.info dnsmasq[1]: using nameserver 217.200.201.67#53
Mon Apr  3 00:56:21 2023 daemon.info dnsmasq[1]: using nameserver 217.200.201.66#53
Mon Apr  3 00:56:21 2023 user.notice firewall: Reloading firewall due to ifup of tim_4 (wwan0)

here some data about the two router:

MOBILE

router mobile OpenWrt 22.03.2 r19803-9a599fee93 / LuCI openwrt-22.03 branch git-22.288.45147-96ec0cd
root@mobile:~# qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer
[/dev/cdc-wdm0] Device manufacturer retrieved:
        Manufacturer: 'Sierra Wireless, Incorporated'
root@mobile:~# qmicli -d /dev/cdc-wdm0 --dms-get-model
[/dev/cdc-wdm0] Device model retrieved:
        Model: 'MC7430'
root@mobile:~# qmicli -d /dev/cdc-wdm0 --dms-get-revision
[/dev/cdc-wdm0] Device revision retrieved:
        Revision: 'SWI9X30C_02.30.03.00 r7804 CARMD-EV-FRMWR2 2018/07/25 01:10:04'
root@mobile:~# qmicli -d /dev/cdc-wdm0 --dms-get-hardware-revision
[/dev/cdc-wdm0] Hardware revision retrieved:
        Revision: '1.0'
root@mobile:~# qmicli -d /dev/cdc-wdm0 --dms-swi-get-current-firmware
[/dev/cdc-wdm0] Successfully retrieved current firmware:
        Model: MC7430
        Boot version: SWI9X30C_02.30.03.00
        AMSS version: SWI9X30C_02.30.03.00
        SKU ID: 1102644
        Package ID: unknown
        Carrier ID: 1
        Config version: 002.046_001

config interface 'tim'
        option proto 'qmi'
        option apn 'ibox.tim.it'
        option auth 'none'
        option pdptype 'ipv4'
        option device '/dev/cdc-wdm0'
        option auto '0'

ASSOCIAZIONE

router associazione  OpenWrt 22.03.2 r19803-9a599fee93 / LuCI openwrt-22.03 branch git-23.069.50944-cd8bea9
root@associazione:~# qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer
[/dev/cdc-wdm0] Device manufacturer retrieved:
        Manufacturer: 'Sierra Wireless, Incorporated'
root@associazione:~# qmicli -d /dev/cdc-wdm0 --dms-get-model
[/dev/cdc-wdm0] Device model retrieved:
        Model: 'MC7430'
root@associazione:~# qmicli -d /dev/cdc-wdm0 --dms-get-revision
[/dev/cdc-wdm0] Device revision retrieved:
        Revision: 'SWI9X30C_02.24.05.06 r7040 CARMD-EV-FRMWR2 2017/05/19 06:23:09'
root@associazione:~# qmicli -d /dev/cdc-wdm0 --dms-get-hardware-revision
[/dev/cdc-wdm0] Hardware revision retrieved:
        Revision: '1.0'
root@associazione:~# qmicli -d /dev/cdc-wdm0 --dms-swi-get-current-firmware
[/dev/cdc-wdm0] Successfully retrieved current firmware:
        Model: MC7430
        Boot version: SWI9X30C_02.24.05.06
        AMSS version: SWI9X30C_02.24.05.06
        SKU ID: 1103737
        Package ID: unknown
        Carrier ID: 1
        Config version: 002.025_000

config interface 'fastweb'
        option proto 'qmi'
        option pdptype 'ipv4'
        option auth 'none'
        option apn 'apn.fastweb.it'
        option device '/dev/cdc-wdm0'


now, some question ...

  • what is exactly the QMI protocol
  • how it works
  • why we have it
  • whats the difference between qmicli command and uqmi
  • whats the purpouse to have two device cdc-wdm0 and cdc-wdm1
  • why the router refuse to use the APN configured in the /etc/config/network files???

See: https://en.m.wikipedia.org/wiki/Qualcomm_MSM_Interface

See: https://en.m.wikipedia.org/wiki/Qualcomm_MSM_Interface#Linux

See: