Establishing connections to multiple PDPs simultaneously with MBIM

Dan Williams dcbw at
Wed Aug 5 10:40:12 PDT 2015

On Wed, 2015-08-05 at 18:55 +0200, Bjørn Mork wrote:
> Dan Williams <dcbw at> writes:
> > 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.
> "only"?  How many APNs do you want to connect using a single SIM? :)
> Note that my EM7345 (also XMM7160) increased the number from 8 to 16
> when the firmware was upgraded, so I believe these numbers are really
> arbitrary firmware imposed limits.
> > 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.  
> Yup.  I've had this on my TODO list for a while now, along with some way
> to create/manage the associated data interface(s). But it's not like
> anything is going to happen soon, given my current coding progress...

I just posted a patch for this; comments?  The only thing I don't like
is how --connect specifies the session id, but I'm not sure how else to
do it since adding an additional parameter --session-id wouldn't really
fit with the mbimcli model, as --session-id is only applicable to 3
commands in basic-connect.  So I chose the :-based approach...


More information about the libmbim-devel mailing list