On Wed, Sep 23, 2015 at 9:17 AM, Priyank Kumar <priyank.gu...@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 _______________________________________________ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel