Sierra Wireless EM7455, MBIM connect

Bjørn Mork bjorn at mork.no
Sat Apr 16 23:02:27 UTC 2016


Fabian Schörghofer <fabian.schoergi at gmail.com> writes:

> Thank you for your answer.
>
> I used the following command to connect after connecting the modem to
> the USB port:
>
> mbim-network /dev/cdc-wdm0 start
>
> Which yields the following output:
>
> Loading profile...
>     APN: drei.at
> 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: '232106606055008' SIM ICCID: 'somenumber'
> Ready info: 'unknown' Telephone numbers: (1) '+43660xxxxxxx'
> [/dev/cdc-wdm0] Session not closed: TRID: '3'
> Saving state... (TRID: 3)
> Querying registration state 'mbimcli -d /dev/cdc-wdm0
> --query-registration-state --no-open=3 --no-close'...
> error: operation failed: Transaction timed out

Ah, OK.  Something went wrong here.  And I am pretty sure the problem is
that the driver lost a notification because the /dev/cdc-wdm0 device was
closed in the middle of a session. This isn't currently working too good
with most firmwares. They queue the message even if the notification was
lost. When the next message is queued and the driver is notified, it
will get the previous message instead of the expected one.  And so on.

There isn't currently any way out of this, except resetting the modem.
Or writing a tool to flush all queued messages.

Yes, the driver should deal with this firmware behaviour since it is so
common.  And not that unreasonable. I do understand that the firmware
doesn't expect the driver to kill the interrupt URB in the middle of a
session. That's really crazy.  But the driver doesn't have any clue
about MBIM or MBIM sessions, and will kill the interrupt URB when it
has no clients.

So you'd better make sure at least one process is keeping the
/dev/cdc-wdm0 open while you are in an MBIM session (i.e. between MBIM
OPEN and MBIM CLOSE).  That's the way you inform the driver that you are
in a session.  I recommend using the proxy for that, but it doesn't seem
to be straight forward with the mbim-network script.  Another
alternative, which I use with e.g. umbim, is simply cat'ing to the
device in another terminal:  "cat >/dev/cdc-wdm0".

(note that you should not *read* from the device, because only one
process can read - and you want that process to be mbimcli)


End of long story.  Shorter instructions:

 # reset modem after last error, then try:
 mbimcli -p -d /dev/cdc-wdm0 --query-subscriber-ready-status --no-close
 mbimcli -p -d /dev/cdc-wdm0 --connect=drei.at --no-open=3 --no-close



Which worked for me:

mbimcli -p -d /dev/cdc-wdm0 --query-subscriber-ready-status --no-close
[/dev/cdc-wdm0] Subscriber ready status retrieved:
              Ready state: 'initialized'
            Subscriber ID: '24201305013xxxx'
                SIM ICCID: '8947030512101100xxxx'
               Ready info: 'unknown'
        Telephone numbers: (0) 'unknown'
[/dev/cdc-wdm0] Session not closed:
            TRID: '4'

mbimcli -p -d /dev/cdc-wdm0 --connect=telenor.smart --no-open=5 --no-close
[/dev/cdc-wdm0] Successfully connected

[/dev/cdc-wdm0] Connection status:
              Session ID: '0'
        Activation state: 'activated'
        Voice call state: 'none'
                 IP type: 'ipv4v6'
            Context type: 'internet'
           Network error: 'unknown'

[/dev/cdc-wdm0] IPv4 configuration available: 'address, gateway, dns, mtu'
     IP [0]: '10.140.186.156/29'
    Gateway: '10.140.186.157'
    DNS [0]: '193.213.112.4'
    DNS [1]: '130.67.15.198'
        MTU: '1500'

[/dev/cdc-wdm0] IPv6 configuration available: 'address, gateway, dns, mtu'
     IP [0]: '2a02:2121:87:d554:30b1:2c53:d3f2:454/64'
    Gateway: '2a02:2121:87:d554:c8a2:5cdb:ce95:a9ac'
    DNS [0]: '2001:4600:4:fff::52'
    DNS [1]: '2001:4600:4:1fff::52'
        MTU: '1500'
[/dev/cdc-wdm0] Session not closed:
            TRID: '8'




Bjørn


More information about the libmbim-devel mailing list