ERROR: mbim message timeout - (using umbim on OpenWRT)

Bjørn Mork bjorn at mork.no
Thu Mar 12 06:31:10 PDT 2015


Peter Gerten <peter.gerten at googlemail.com> writes:

> There is actually code for MBIM_CID_IP_CONFIGURATION in the umbim source
> but it is not used in the connection script. I tried to add it and it gets
> DNS and gateway configuration right, but the IP address if wrong (I only
> tested ipv4 configuration, nor sure if ipv6 works).

Yes, I noticed that as well a while ago.  Actually went as far as
thinking I could fix it.  That's when I discovered the design thinko in
the data/gen-header.pl script: They try to convert every MBIM message
into a static sized struct.

That will obviously never work for any message with variable sized
fields.  At least not any message varying at multiple places, and not
just the end.  The MBIM_CID_IP_CONFIGURATION reply is a very complex
message, with flags indicating the presence of IPv4 and/or IPv6 data,
and each of those sets containing multple variable length arrays of
addresses.  You just cannot create a single struct matching that...

But that's what they try to do:

struct mbim_basic_connect_ip_configuration_r {
        uint32_t sessionid;
        /* enum MbimIPConfigurationAvailableFlag */
        uint32_t ipv4configurationavailable;
        /* enum MbimIPConfigurationAvailableFlag */
        uint32_t ipv6configurationavailable;
        uint32_t ipv4addresscount;
        /* struct mbimipv4element */
        uint32_t ipv4address;
        uint32_t ipv6addresscount;
        /* struct mbimipv6element */
        uint32_t ipv6address;
        /* array type: ref-ipv4 */
        uint32_t ipv4gateway;
        /* array type: ref-ipv6 */
        uint32_t ipv6gateway;
        uint32_t ipv4dnsservercount;
        /* array type: ipv4-array */
        uint32_t ipv4dnsserver;
        uint32_t ipv6dnsservercount;
        /* array type: ipv6-array */
        uint32_t ipv6dnsserver;
        uint32_t ipv4mtu;
        uint32_t ipv6mtu;
} __attribute__((packed));



Not really a show stopper.  Anything can be fixed.  It just wasn't the
quick fix I imagined it would be, so I decided to let it be.

> I would actually love to use mbimcli instead of umbim on OpenWRT but
> currently do not know an easy way on how to do that.

Nor do I...

Fixing up umbim looks most promising, despite the issues mentioned. It
would be great if you were able to help doing that.

> I noticed Aleksander's blog post about a version with integrated
> ModemManager - unfortunately it seems to be very outdated now (
> https://sigquit.wordpress.com/2013/02/14/modemmanager-and-latest-udev-in-openwrt/
> ).

Yes.  But knowing the OpenWRT concerns about any size overhead (they
even delete most of the kernel module meta-data!), it is proably a waste
of time updating it.  They will want umbim anyway, because of the
footprint.


Bjørn


More information about the libmbim-devel mailing list