MM: How to get valid IP & network interface after successfully get connected

Priyank Kumar priyank.guddu at gmail.com
Wed Sep 23 09:56:43 PDT 2015


Thanks for prompt response,
I used att information to make a bearer, I get ppp but I dont see any IP in
ifconfig, neither the PPP network interface comes as ppp0, which normally
comes in wvdial.
So I am stuck there.


mmcli -m 0 --create-bearer="apn=wap.cingular,user=wap at cingulargprs.com
,password=CINGULAR1,number=*99***1#"
Successfully created new bearer in modem:
/org/freedesktop/ModemManager1/Bearer/0
priyank at priyank-desktop:/opt/crossbar/site-packages$ mmcli -b 0
Bearer '/org/freedesktop/ModemManager1/Bearer/0'

priyank at priyank-desktop:/opt/crossbar/site-packages$ mmcli -m 0 -c -b
/org/freedesktop/ModemManager1/Bearer/0
successfully connected the bearer
priyank at priyank-desktop:/opt/crossbar/site-packages$ mmcli -b 0
Bearer '/org/freedesktop/ModemManager1/Bearer/0'
  -------------------------
  Status             |   connected: 'yes'
                     |   suspended: 'no'
                     |   interface: 'ttyUSB0'
                     |  IP timeout: '20'
  -------------------------
  Properties         |         apn: 'wap.cingular'
                     |     roaming: 'allowed'
                     |     IP type: 'none'
                     |        user: 'wap at cingulargprs.com'
                     |    password: 'CINGULAR1'
                     |      number: '*99***1#'
                     | Rm protocol: 'unknown'
  -------------------------
  IPv4 configuration |   method: 'ppp'
  -------------------------
  IPv6 configuration |   method: 'unknown'






On Wed, Sep 23, 2015 at 1:16 AM, Aleksander Morgado <
aleksander at aleksander.es> wrote:

> On Wed, Sep 23, 2015 at 9:17 AM, Priyank Kumar <priyank.guddu at gmail.com>
> wrote:
> > I am trying to connect a modem on Ubuntu 14.04.
> > Everything works fine, i.e modem is enabled, I can send and receive SMS
> > through mmcli.
> > The problem I am facing is that once a bearer is created with right APN
> and
> > username and password, I can connect to  modem but dont get any IP.
> >
> > How to get the network interface, couldnt find anything on documentation.
> > Also I see enum to see like PPP/STATIC/DHCP etc, but dont know where to
> feed
> > that field.
> >
> > 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.
> > When to know which port data packet get through (QMI/AT or other) ?
> > Also is there a dbus API to send AT command, i see mmcli has some
> commands.?
> > Also do we have dbus api for libqmi and libqcdm?
> >
> > Thanks.
> >
> >
> > mmcli -m 1
> >
> >
> >
> >  -------------------------
> >   Hardware |   manufacturer: 'QUALCOMM INCORPORATED'
> >            |          model: 'HSUPA'
> >            |       revision: 'WUP_1.10.037'
> >            |      supported: 'gsm-umts'
> >            |        current: 'gsm-umts'
> >            |   equipment id: '359769022304908'
> >   -------------------------
> >   System   |         device:
> > '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.4/1-2.4.3'
> >            |        drivers: 'option1'
> >            |         plugin: 'Generic'
> >            |   primary port: 'ttyUSB0'
> >            |          ports: 'ttyUSB0 (at), ttyUSB1 (qcdm), ttyUSB2 (at)'
> >   -------------------------
> >   Numbers  |           own : '185824xxxx'
> >   -------------------------
> >   Status   |           lock: 'none'
> >            | unlock retries: 'unknown'
> >            |          state: 'connected'
> >            |    power state: 'on'
> >            |    access tech: 'gprs'
> >            | signal quality: '20' (recent)
> >   -------------------------
> >   Modes    |      supported: 'allowed: 2g, 3g; preferred: none'
> >            |        current: 'allowed: 2g, 3g; preferred: none'
> >   -------------------------
> >   Bands    |      supported: 'unknown'
> >            |        current: 'unknown'
> >   -------------------------
> >   IP       |      supported: 'ipv4, ipv6'
> >   -------------------------
> >   3GPP     |           imei: '359769022304908'
> >            |  enabled locks: 'none'
> >            |    operator id: '310410'
> >            |  operator name: 'AT&T'
> >            |   registration: 'home'
> >   -------------------------
> >   SIM      |           path: '/org/freedesktop/ModemManager1/SIM/1'
> >
> > Syslog:
> > ModemManager[701]: message repeated 6 times: [ <info>  Modem
> > /org/freedesktop/ModemManager1/Modem/1: signal quality updated (20)]
> > Sep 23 00:05:42 priyank-desktop ModemManager[701]: <info>  Modem
> > /org/freedesktop/ModemManager1/Modem/1: state changed (registered ->
> > connecting)
> > Sep 23 00:05:42 priyank-desktop NetworkManager[803]: <info> (ttyUSB0)
> modem
> > state changed, 'registered' --> 'connecting' (reason: user-requested)
> > Sep 23 00:05:42 priyank-desktop ModemManager[701]: <info>  Modem
> > /org/freedesktop/ModemManager1/Modem/1: state changed (connecting ->
> > connected)
> > Sep 23 00:05:42 priyank-desktop NetworkManager[803]: <info> (ttyUSB0)
> modem
> > state changed, 'connecting' --> 'connected' (reason: user-requested)
> > Sep 23 00:06:10 priyank-desktop ModemManager[701]: <info>  Modem
> > /org/freedesktop/ModemManager1/Modem/1: signal quality updated (20)
>
>
> You need to check the *bearer* object in DBus to know the connection
> details, once connected.
>
> You can check the list of available bearers with:
> $ mmcli --list-bearers
>
> And once you know which one to check, you can query its info, e.g.:
> $ mmcli -b 0
>
> That will tell you which IP method to use (ppp, dhcp, static) and all
> the other info.
>
> Also, when you run --simple-connect you should get as output which of
> the bearers just got connected.
>
>
> --
> Aleksander
> https://aleksander.es
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/modemmanager-devel/attachments/20150923/c47d7e55/attachment-0001.html>


More information about the ModemManager-devel mailing list