Establishing connections to multiple PDPs simultaneously with MBIM

Dan Williams dcbw at
Wed Aug 5 09:49:33 PDT 2015

On Wed, 2015-08-05 at 11:24 -0500, Dan Williams wrote:
> On Wed, 2015-08-05 at 17:47 +0200, Markus Gothe wrote:
> > Per specification MBIM allows you to have up to 256 simultanous data connections IIRC.
> > 
> > You can use the command line interface for mbimcli or even better modemmanager to allocate simultanous connections. Then you need to do vlan-tagging etc on the "ethernet device".
> > 
> > It is kinda complex but doable.
> Bjorn implemented this on the kernel side, so he'd know exactly what has
> to happen.
> But I think what you do is create a new VLAN interface on top of the
> ethernet interface that gets created for the device.  Then each VLAN
> interface gets mapped to a specific data session that you've created.
> I guess this is one area where ModemManager would help, since it would
> create these interfaces for you and just hand you the interface name and
> the IP details (though this isn't all implemented yet).
> Otherwise you get to poke the kernel yourself.  Something like:
> 1) make sure the device supports multiple sessions using
> "--query-device-caps".  My XMM7160 device only supports 16.
> 2) create a kernel VLAN interface on top of the MBIM network interface
> using the session ID you'd like to use; you get to manage the session
> IDs :)
> 3) run the mbimcli connect and send it the session ID you chose
> 4) assign the IP address information that mbimcli returns from the
> connect request to the VLAN interface
> 5) send some packets
> But it doesn't actually look like mbimcli supports multiple sessions
> since it always passes '0' to the functions that deal with connect.  So
> we'd need to fix that up and allow passing a specific session ID to
> --connect, --disconnect, and --query-connection-state.  

Neal, can you try the attached patch to libmibm?

ip link add link wwan0 name wwan0.1 type vlan id 1
mbimcli -d /dev/cdc-wdm0 --connect=1:<apn>
< assign IP and stuff to wwan0.1 >
mbimcli -d /dev/cdc-wdm0 --query-connect-status=1
mbimcli -d /dev/cdc-wdm0 --disconnect=1

See if that works, I haven't tested it myself.  And Bjorn may show up to
tell us we're all crazy and this isn't how it's done...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: mbim-session-id.patch
Type: text/x-patch
Size: 7102 bytes
Desc: not available
URL: <>

More information about the libmbim-devel mailing list