machine-readable --query-ip-configuration [patch] (2nd attempt)

Daniel Barlow dan at
Thu Mar 23 22:47:17 UTC 2017

[ Sorry. hit something magic that apparently meant 'send'.  Trying again ]

Hi all

I recently added an EM7455 to my Thinkpad X1 and in the goal of making it
work have been learning a *little* more than I expected to have to about
MBIM (and for that matter about IPv6-only connectivity)

Because my current distribution doesn't seem to want to let me run
ModemManager without NetworkManager I wanted to make everything work using
the supplied mbim-network script, and it seems that the biggest missing bit
there is actually configuring the interface/gateway/dns servers etc after
the connection is made.  Because I don't much like writing machine parsers
for potentially brittle intended-for-humans output, I took the liberty of
writing a small patch to optionally turn the output of
--query-ip-configuration into awk-friendly tab separated lines.  So for
example I can run

$ mbimcli  -p -d /dev/cdc-wdm0 --query-ip-configuration --machine-readable

IPv4    fields  none

IPv6    fields  address, gateway, dns, mtu
IPv6    address 2a01:4c8:1b:eb13:2dbf:b045:8a94:88fa/64
IPv6    gateway 2a01:4c8:1b:eb13:40dc:ba5f:4d43:d4c
IPv6    dns     2a01:4c8:f000:1::1
IPv6    dns     2a01:4c8:f000:1::2
IPv6    mtu     1500

Would there be any interest in merging this or something like it?  I see
some previous discussion about extending mbim-network to configure the wwan
interface (
and it seems to me like having an easy-to-parse output format for the
necessary config data would be an important part of that work.

I can't see any contribution guidelines in the project repo so I hope that
attaching a diff as MIME is acceptable.  I've also posted it as a gist at


dan at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tab-separated.patch
Type: application/octet-stream
Size: 10032 bytes
Desc: not available
URL: <>

More information about the libmbim-devel mailing list