MM: How to get valid IP & network interface after successfully get connected
Aleksander Morgado
aleksander at aleksander.es
Wed Sep 23 01:26:35 PDT 2015
Just realized there were multiple questions in the email :)
On Wed, Sep 23, 2015 at 9:17 AM, Priyank Kumar <priyank.guddu at gmail.com> wrote:
> It would be really useful if one example is given on mmcli or dbus API how
> to do the connect and disconnect to packet service.
Connection request can be done in just one command:
$ sudo mmcli -m 0 --simple-connect="pin=1234,apn=internet.whatever"
(will return which bearer got connected)
You can check the manpage of mmcli to see the full list of allowed
parameters there.
Disconnection can also be just one command (disconnects all bearers):
$ sudo mmcli -m 0 --simple-disconnect
> When to know which port data packet get through (QMI/AT or other) ?
The bearer info will tell you which port to use for data. When it says
PPP it'll be a TTY; when it says static or dhcp it will be a WWAN. At
this point you don't explicitly know which control protocol was used
to get the modem connected, although that can be guessed looking at
the primary port listed by the modem info, as well as which are the
kernel drivers listed. From the user's point of view, it shouldn't
matter which was the control port in use; ideally.
> Also is there a dbus API to send AT command, i see mmcli has some commands.?
mmcli has --command, but will only work if ModemManager is running in
debug mode.
> Also do we have dbus api for libqmi and libqcdm?
No; these are just C libraries. But you have qmicli to talk directly
to /dev/cdc-wdm ports (use --device-open-proxy if ModemManager is
already running); and also some qcdm tools within ModemManager to talk
to QCDM ttys.
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list