Disconnect vs Delete bearer

Aleksander Morgado aleksander at aleksander.es
Wed Nov 12 06:34:39 PST 2014


On Wed, Nov 12, 2014 at 3:13 PM, Highland, Glenn
<Glenn.Highland at etherios.com> wrote:
> Is there any functional difference between the Modem.Simple interface’s
> Disconnect() method and the Modem interface’s DeleteBearer()
>
> method?   I know Disconnect() allows you to pass a “/” argument to specify
> all bearers, but if you’re passing a specific bearer object’s path,
>
> is there any difference between the two operations?
>
>
>
> I’m not encountering any problems/issues – just for my own better
> understanding.  The DeleteBearer() method’s description on the web
> documentation only mentions a disconnect action.

So... You can setup connections in 2 different ways with ModemManager:

 * The Simple interface has Connect() and Disconnect(). Easy, you just
forget about the fact that there are bearer objects created until you
need to read the IP config setup they expose. Apart from that, bearers
are nothing else that some connection info holders for you. The Simple
interface is what e.g. NetworkManager uses.

 * You can also CreateBearer() and DeleteBearer(), and
Bearer.Connect() or Bearer.Disconnect() them independently. Why would
you need this? Well, if your modem supports more than one data
interface and you want to connect each data interface to a different
APN, you'll need to create 2 bearers and connect them manually
independently.

Disconnect() will also allow to disconnect all available bearers, but
won't remove any (i.e. bearer objects are kept exposed in DBus), while
DeleteBearer() should remove them also from DBus. Bearer objects are
anyway non-persistent; you won't get the same back if you re-plug the
modem.

Apart from that, there aren't many differences.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list