MC7455/EM7455 dependencies and protocols

Tim Harvey tharvey at gateworks.com
Tue Mar 21 14:02:13 UTC 2017


On Thu, Mar 9, 2017 at 2:21 PM, Dan Williams <dcbw at redhat.com> wrote:
><snip>
>>
>> So next steps on MC7455 (QMI):
>> root at ventana:~# uname -r
>> 4.10.0
>> root at ventana:~# dmesg | grep wdm
>> [    9.557519] usbcore: registered new interface driver cdc_wdm
>> [    9.566986] qmi_wwan 1-1.2:1.8: cdc-wdm0: USB WDM device
>> [    9.589439] qmi_wwan 1-1.2:1.10: cdc-wdm1: USB WDM device
>> root at ventana:~# echo "APN=m2m.com.attz" > /etc/qmi-network.conf
>> root at ventana:~# qmi-network /dev/cdc-wdm0 start
>> Loading profile at /etc/qmi-network.conf...
>>     APN: m2m.com.attz
>>     APN user: unset
>>     APN password: unset
>>     qmi-proxy: no
>> Checking data format with 'qmicli -d /dev/cdc-wdm0 --wda-get-data-
>> format '...
>> Device link layer protocol retrieved: raw-ip
>> Getting expected data format with 'qmicli -d /dev/cdc-wdm0
>> --get-expected-data-format'...
>> Expected link layer protocol retrieved: 802-3
>> Updating kernel link layer protocol with 'qmicli -d /dev/cdc-wdm0
>> --set-expected-data-format=raw-ip'...
>> Kernel link layer protocol updated
>> Starting network with 'qmicli -d /dev/cdc-wdm0
>> --wds-start-network=apn='m2m.com.attz'  --client-no-release-cid '...
>> [09 Mar 2017, 16:34:29] -Warning ** Error reading from istream: Error
>> reading from file descriptor: Input/output error
>> error: couldn't create client for the 'wds' service: CID allocation
>> failed in the CTL client: Transaction timed out
>> error: network start failed, client not allocated
>> ^^^^ any idea what could be going on here?
>
> Can you add a "-v" arg to the START_NETWORK_CMD part of /usr/bin/qmi-
> network so we can see what the verbose output is?

Dan,

On the MC7455 adding some debugging to qmi-network this is what I was
able to capture:
root at ventana:~# qmi-network /dev/cdc-wdm0 start
Loading profile at /etc/qmi-network.conf...
    APN: m2m.com.attz
    APN user: unset
    APN password: unset
    qmi-proxy: no
Checking data format with 'qmicli -d /dev/cdc-wdm0 --wda-get-data-format '...
Device link layer protocol retrieved: raw-ip
Getting expected data format with 'qmicli -d /dev/cdc-wdm0
--get-expected-data-format'...
Expected link layer protocol retrieved: 802-3
Updating kernel link layer protocol with 'qmicli -d /dev/cdc-wdm0
--set-expected-data-format=raw-ip'...
Kernel link layer protocol updated
Starting network with 'qmicli -v -d /dev/cdc-wdm0
--wds-start-network=apn='m2m.com.attz'  --client-no-release-cid '...
error: couldn't start network: QMI protocol error (26): 'NoEffect'
[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] Opening device with
flags 'auto'...
[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] loaded driver of
cdc-wdm port: qmi_wwan
[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] automatically selecting QMI mode
[21 Mar 2017, 13:58:54] [Debug] QMI Device at '/dev/cdc-wdm0' ready
[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] Assuming service 'wds'
is supported...
[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] Allocating new client ID...
[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] sent message...
<<<<<< RAW:
<<<<<<   length = 16
<<<<<<   data   = 01:0F:00:00:00:00:00:01:22:00:04:00:01:01:00:01

[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] sent generic request
(translated)...
<<<<<< QMUX:
<<<<<<   length  = 15
<<<<<<   flags   = 0x00
<<<<<<   service = "ctl"
<<<<<<   client  = 0
<<<<<< QMI:
<<<<<<   flags       = "none"
<<<<<<   transaction = 1
<<<<<<   tlv_length  = 4
<<<<<<   message     = "Allocate CID" (0x0022)
<<<<<< TLV:
<<<<<<   type       = "Service" (0x01)
<<<<<<   length     = 1
<<<<<<   value      = 01
<<<<<<   translated = wds

[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] received message...
<<<<<< RAW:
<<<<<<   length = 24
<<<<<<   data   =
01:17:00:80:00:00:01:01:22:00:0C:00:02:04:00:00:00:00:00:01:02:00:01:08

[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] received generic
response (translated)...
<<<<<< QMUX:
<<<<<<   length  = 23
<<<<<<   flags   = 0x80
<<<<<<   service = "ctl"
<<<<<<   client  = 0
<<<<<< QMI:
<<<<<<   flags       = "response"
<<<<<<   transaction = 1
<<<<<<   tlv_length  = 12
<<<<<<   message     = "Allocate CID" (0x0022)
<<<<<< TLV:
<<<<<<   type       = "Result" (0x02)
<<<<<<   length     = 4
<<<<<<   value      = 00:00:00:00
<<<<<<   translated = SUCCESS
<<<<<< TLV:
<<<<<<   type       = "Allocation Info" (0x01)
<<<<<<   length     = 2
<<<<<<   value      = 01:08
<<<<<<   translated = [ service = 'wds' cid = '8' ]

[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] Registered 'wds'
(version unknown) client with ID '8'
[21 Mar 2017, 13:58:54] [Debug] Network start parameters set (apn:
'm2m.com.attz', 3gpp_profile: '0', 3gpp2_profile: '0', auth:
'unspecified', ip-type: 'unspecified', username: 'unspecified',
password: 'unspecified', autoconnect: 'unspecified')
[21 Mar 2017, 13:58:54] [Debug] Asynchronously starting network...
[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] sent message...
<<<<<< RAW:
<<<<<<   length = 28
<<<<<<   data   =
01:1B:00:00:01:08:00:01:00:20:00:0F:00:14:0C:00:6D:32:6D:2E:63:6F:6D:2E:61:74:74:7A

[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] sent generic request
(translated)...
<<<<<< QMUX:
<<<<<<   length  = 27
<<<<<<   flags   = 0x00
<<<<<<   service = "wds"
<<<<<<   client  = 8
<<<<<< QMI:
<<<<<<   flags       = "none"
<<<<<<   transaction = 1
<<<<<<   tlv_length  = 15
<<<<<<   message     = "Start Network" (0x0020)
<<<<<< TLV:
<<<<<<   type       = "APN" (0x14)
<<<<<<   length     = 12
<<<<<<   value      = 6D:32:6D:2E:63:6F:6D:2E:61:74:74:7A
<<<<<<   translated = m2m.com.attz

[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] received message...
<<<<<< RAW:
<<<<<<   length = 20
<<<<<<   data   = 01:13:00:80:01:08:02:01:00:20:00:07:00:02:04:00:01:00:1A:00

[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] received generic
response (translated)...
<<<<<< QMUX:
<<<<<<   length  = 19
<<<<<<   flags   = 0x80
<<<<<<   service = "wds"
<<<<<<   client  = 8
<<<<<< QMI:
<<<<<<   flags       = "response"
<<<<<<   transaction = 1
<<<<<<   tlv_length  = 7
<<<<<<   message     = "Start Network" (0x0020)
<<<<<< TLV:
<<<<<<   type       = "Result" (0x02)
<<<<<<   length     = 4
<<<<<<   value      = 01:00:1A:00
<<<<<<   translated = FAILURE: NoEffect

[/dev/cdc-wdm0] Client ID not released:
        Service: 'wds'
            CID: '8'
[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] Releasing 'wds' client
with flags 'none'...
[21 Mar 2017, 13:58:54] [Debug] [/dev/cdc-wdm0] Unregistered 'wds'
client with ID '8'
[21 Mar 2017, 13:58:54] [Debug] Client released
[21 Mar 2017, 13:58:54] [Debug] Closed
Saving state at /tmp/qmi-network-state-cdc-wdm0... (CID: 8)
error: network start failed, no packet data handle
Clearing state at /tmp/qmi-network-state-cdc-wdm0...

>
> Also after this happens, can you run other qmicli commands right after
> this happens?  Like "qmicli -d /dev/cdc-wdm0 --dms-get-ids"?  Or is the
> modem dead?

It seems hit and miss:

root at ventana:~# qmicli -d /dev/cdc-wdm0 --dms-get-ids
[21 Mar 2017, 14:00:22] -Warning ** Error reading from istream: Error
reading from file descriptor: Input/output error
error: couldn't create client for the 'dms' service: CID allocation
failed in the CTL client: Transaction timed out
root at ventana:~# qmicli -d /dev/cdc-wdm0 --dms-get-ids
[/dev/cdc-wdm0] Device IDs retrieved:
         ESN: '806DDAA4'
        IMEI: '359225050194950'
        MEID: '35922505019495'
^^^ works second time

>
>> Note that I do not have ModemManager installed - still trying to
>> configure the modem by hand to understand the process.
>>
>> Also occasionally the MC7455 comes up as 1199:9070 (instead of
>> 1199:9071) in which case its detected by qcserial which provides a
>> /dev/ttyUSB0 but that's it. Have you ever seen that or know what
>> could
>> cause that? I have two MC7455's and they both behave the same.
>
> The modem is coming back in firmware update mode.  Or maybe it's debug
> mode.  But a single tty is an indication that the device was not able
> to start up correctly.

interesting... not sure what would trigger that. I'll keep an eye out
for how often it occurs.

>
>> The next steps on the board with the EM7455 (MBIM):
>> root at ventana:~# uname -r
>> 4.10.0
>> root at ventana:~# dmesg | grep wdm
>> [   24.963503] usbcore: registered new interface driver cdc_wdm
>> [   25.059084] cdc_mbim 2-1.1:1.12: cdc-wdm0: USB WDM device
>> root at ventana:~# mbimcli --version
>>
>> mbimcli 1.15.0
>> ...
>> root at ventana:~# mbim-network /dev/cdc-wdm0 start
>> Loading profile at /etc/mbim-network.conf...
>>     APN: h2g2
>>     APN auth protocol: unset
>>     APN user: unset
>>     APN password: unset
>>     mbim-proxy: no
>> Querying subscriber ready status 'mbimcli -d /dev/cdc-wdm0
>> --query-subscriber-ready-status --no-close '...
>> [/dev/cdc-wdm0] Subscriber ready status retrieved: Ready state:
>> 'initialized' Subscriber ID: '310260970524563' SIM ICCID:
>> '8901260971105245631' Ready info: 'unknown' Telephone numbers: (0)
>> 'unknown' [/dev/cdc-wdm0] Session not closed: TRID: '3'
>> Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 3)
>> Querying registration state 'mbimcli -d /dev/cdc-wdm0
>> --query-registration-state --no-open=3 --no-close '...
>> [/dev/cdc-wdm0] Registration status: Network error: 'unknown'
>> Register
>> state: 'deregistered' Register mode: 'automatic' Available data
>> classes: 'unknown' Current cellular class: 'gsm' Provider ID:
>> 'unknown' Provider name: 'unknown' Roaming text: 'unknown'
>> Registration flags: 'packet-service-automatic-attach' [/dev/cdc-wdm0]
>> Session not closed: TRID: '4'
>> Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 4)
>> Attaching to packet service with 'mbimcli -d /dev/cdc-wdm0
>> --attach-packet-service --no-open=4 --no-close '...
>> error: operation failed: RadioPowerOff
>>
>
> Here's your issue (and as you state below).  A couple possiblities:
>
> 1) Your device needs the FCCAuth command which can only be tunneled
> through QMI-over-MBIM.  Sierra devices often need this.  *Even though
> it's an MBIM device*, try:
>
> qmicli -d /dev/cdc-wdm0 --device-open-mbim --dms-set-fcc-authentication
>
> and then run "mbimcli -d /dev/cdc-wdm0 --query-radio-state" to see if
> that makes a difference.

ok for the EM7455 (MBIM) that did the trick to get "Software Radio State: 'on'".

root at ventana:~# qmicli -d /dev/cdc-wdm0 --device-open-mbim
--dms-set-fcc-authentication
[/dev/cdc-wdm0] Successfully set FCC authentication
root at ventana:~# mbimcli -d /dev/cdc-wdm0 --query-radio-state
[/dev/cdc-wdm0] Radio state retrieved:
             Hardware Radio State: 'on'
             Software Radio State: 'on'

Was there anything that pointed to this as being the issue or should
it just be one of those standard troubleshooting steps?

>
> 2) Your firmware is mismatched.  Qualcomm devices have a couple
> different firmware images stored onboard, and you have to make sure the
> ones that are selected match each other, otherwise it won't let you do
> anything radio-related.  Try:
>
> qmicli -d /dev/cdc-wdm0 --device-open-mbim --dms-list-stored-images
> qmicli -d /dev/cdc-wdm0 --device-open-mbim --dms-get-firmware-preference
>

this was not likely the issue but here it is just in case you see
anything funny:

root at ventana:~# qmicli -d /dev/cdc-wdm0 --device-open-mbim
--dms-list-stored-images
[/dev/cdc-wdm0] Device list of stored images retrieved:

        [0] Type:    'modem'
            Maximum: '4'

                >>>>>>>>>> [CURRENT] <<<<<<<<<<
                [modem0]
                Unique ID:     '?_?'
                Build ID:      '02.08.02.00_?'
                Storage index: '1'
                Failure count: '0'

        [1] Type:    'pri'
            Maximum: '50'

                >>>>>>>>>> [CURRENT] <<<<<<<<<<
                [pri0]
                Unique ID:     '002.007_000'
                Build ID:      '02.08.02.00_GENERIC'

root at ventana:~# qmicli -d /dev/cdc-wdm0 --device-open-mbim
--dms-get-firmware-preference
firmware preference successfully retrieved:
[image 0]
        Image type: 'modem'
        Unique ID:  '002.007_000'
        Build ID:   '02.08.02.00_GENERIC'
[image 1]
        Image type: 'pri'
        Unique ID:  '002.007_000'
        Build ID:   '02.08.02.00_GENERIC'


> And lets see what you get.  If those don't show anything, there are
> some AT commands we could try (if the device exposes an AT port at all)
> that give more information about firmware selections.

there are 3 serial devices created, yet I couldn't get any response to
an AT<CR> over any of them at 115200

Next I try to start the network connection using a Google Fi SIM (I've
xx'd out the CSID and phone nums)

root at ventana:~# mbimcli -d /dev/cdc-wdm0 --query-signal-state; mbimcli
-d /dev/cdc-wdm0 --query-home-provider
[/dev/cdc-wdm0] Signal state:
                  RSSI [0-31,99]: '5'
             Error rate [0-7,99]: '99'
        Signal strength interval: '5'
                  RSSI threshold: '2'
            Error rate threshold: 'unspecified'
root at ventana:~# mbimcli -d /dev/cdc-wdm0 --query-registration-state
[/dev/cdc-wdm0] Registration status:
                 Network error: 'unknown'
                Register state: 'home'
                 Register mode: 'automatic'
        Available data classes: 'lte'
        Current cellular class: 'gsm'
                   Provider ID: '310260'
                 Provider name: 'Project Fi'
                  Roaming text: 'unknown'
            Registration flags: 'packet-service-automatic-attach'
root at ventana:~# echo "APN=h2g2" > /etc/mbim-network.conf
root at ventana:~# mbim-network /dev/cdc-wdm0 start
Loading profile at /etc/mbim-network.conf...
    APN: h2g2
    APN auth protocol: unset
    APN user: unset
    APN password: unset
    mbim-proxy: no
Querying subscriber ready status 'mbimcli -d /dev/cdc-wdm0
--query-subscriber-ready-status --no-close '...
[/dev/cdc-wdm0] Subscriber ready status retrieved: Ready state:
'initialized' Subscriber ID: 'xxxxx' SIM ICCID: 'xxxxx' Ready info:
'unknown' Telephone numbers: (1) 'xxxx' [/dev/cdc-wdm0] Session not
closed: TRID: '3'
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 3)
Querying registration state 'mbimcli -d /dev/cdc-wdm0
--query-registration-state --no-open=3 --no-close '...
[/dev/cdc-wdm0] Registration status: Network error: 'unknown' Register
state: 'home' Register mode: 'automatic' Available data classes: 'lte'
Current cellular class: 'gsm' Provider ID: '310260' Provider name:
'Project Fi' Roaming text: 'unknown' Registration flags:
'packet-service-automatic-attach' [/dev/cdc-wdm0] Session not closed:
TRID: '4'
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 4)
Attaching to packet service with 'mbimcli -d /dev/cdc-wdm0
--attach-packet-service --no-open=4 --no-close '...
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 5)
Starting network with 'mbimcli -d /dev/cdc-wdm0 --connect=apn='h2g2'
--no-open=5 --no-close '...
Network started successfully
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 7)
root at ventana:~# ifconfig wwan0
wwan0     Link encap:Ethernet  HWaddr fa:c7:c8:cf:0d:4d
          BROADCAST NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root at ventana:~# ifconfig wwan0 up
root at ventana:~# dhclient wwan0
^^^^ no DHCP response... killed after a while and I see TX pkts but no RX

Various MBIM commands (--query-home-provider,
--query-visible-providers) keep returning 'error: operation failed:
NotInitiialized' in case that is any indication to the problem:
root at ventana:~# mbimcli -d /dev/cdc-wdm0 --attach-packet-service
error: operation failed: NotInitialized

Thanks for the continued help!

Tim


More information about the libmbim-devel mailing list