Sierra Wireless EM7455, MBIM connect

Bjørn Mork bjorn at
Wed Apr 20 12:02:46 UTC 2016

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

>> 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)
> This does not sound very reliable because ultimately I want to use the
> device on a device where only umbim is available.

Yes, it should be fixed.  But doing so without changing the existing
userspace ABI isn't easy.  We originally made a point out of letting the
driver be completely protocol agnostic.  But if it is to understand when
the interrupt URB can be cancelled and when it can't, then it needs to
know when an MBIM session is open.

I see two ways to make that happen:
 1) let userspace tell the driver when it is OK to kill the URB, or
 2) let the driver snoop on userspace<->firmware requests and replies

What we have today is basically 1.  Userspace can "tell" the driver this
by keeping the character device open.

I don't know if we should formalize that as a requirement, make it "best
practice", or go for alternative 2.  I fear all the unexpected fallout
of that.... What happens when userspace crash?  What happens if
userspace writes something which isn't properly formatted, but still
understood by firmware?  Etc etc.

So I suggest that you just keep the device open.  It's simple and it
works.  MM will do this.  The mbim-proxy will do this.  umbim should
too, except that it needs some scripting around it.  Which it does need
in any case.  It's a basic building block but not a complete modem
management application.


More information about the libmbim-devel mailing list