How to do mobile broadband from command line
Eric Johnson
eric at minutekey.com
Mon Mar 24 10:00:23 PDT 2014
>>> 2. "Modem not responding" error, it happens pretty often, maybe 30-40%
of
>>> the time. If I retry 2-4 times it usually connects.
>>Does this happen the first time after you plug the modem in? Or does it
>>happen after you've disconnected a data session, and you're reconnecting
>>PPP?
>Unfortunately, I sometimes do see it after a fresh reboot, and putting
modem in for first time. Just in the last hour, I did that and it >took 3
wvdial's before it worked. But I'm more likely to see it if I'm plugging
modems in and out, or connecting/disconnecting >sessions.
Just curious if you guys have seen this "Modem not responding" issue
before using wvdial, and recommend a different AT cmd string or using
something other than wvdial for PPP connections...thanks!
Eric
On Thu, Mar 20, 2014 at 5:21 PM, Eric Johnson <eric at minutekey.com> wrote:
> Hi Dan,
> Correct, the AC250U is on Sprint. I'm using a MC760 for Verizon (data
> dumped below).
>
>
>
> >> 2. "Modem not responding" error, it happens pretty often, maybe 30-40%
> of
> >> the time. If I retry 2-4 times it usually connects.
>
> >Does this happen the first time after you plug the modem in? Or does it
> >happen after you've disconnected a data session, and you're reconnecting
> >PPP?
>
> Unfortunately, I sometimes do see it after a fresh reboot, and putting
> modem in for first time. Just in the last hour, I did that and it took 3
> wvdial's before it worked. But I'm more likely to see it if I'm plugging
> modems in and out, or connecting/disconnecting sessions.
>
> Thanks,
> Eric
>
> [eric at linux-vn1z ~]$ mmcli -m 0
>
> /org/freedesktop/ModemManager1/Modem/0 (device id
> '44289f46556e25bffc33b5be4ab79b404063ecca')
> -------------------------
> Hardware | manufacturer: 'NOVATEL WIRELESS INCORPORATED'
> | model: 'MC760 VERIZON'
> | revision: 'Q6085BDRAGONFLY_V167 [2010-10-01 15:49:01]'
> | supported: 'cdma-evdo'
> | current: 'cdma-evdo'
> | equipment id: '5B0DDD05'
> -------------------------
> System | device:
> '/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4'
> | drivers: 'option1'
> | plugin: 'Novatel'
> | primary port: 'ttyUSB0'
> | ports: 'ttyUSB0 (at), ttyUSB1 (qcdm), ttyUSB2 (qcdm)'
> -------------------------
> Numbers | own : '9193095513'
>
> -------------------------
> Status | lock: 'none'
> | unlock retries: 'unknown'
> | state: 'disabled'
> | power state: 'on'
> | access tech: 'unknown'
> | signal quality: '0' (cached)
> -------------------------
> Modes | supported: 'allowed: 2g; preferred: none
> | allowed: 3g; preferred: none
>
> | allowed: 2g, 3g; preferred: none
> | allowed: 2g, 3g; preferred: 2g
> | allowed: 2g, 3g; preferred: 3g'
> | current: 'allowed: any; preferred: none'
>
> -------------------------
> Bands | supported: 'unknown'
> | current: 'unknown'
> -------------------------
> IP | supported: 'ipv4'
> -------------------------
> CDMA | meid: 'unknown'
> | esn: '5B0DDD05'
>
> | sid: 'unknown'
> | nid: 'unknown'
> | registration: CDMA1x 'unknown'
> | EV-DO 'unknown'
> | activation: 'unknown'
> -------------------------
> SIM | path: 'none'
>
>
> On Thu, Mar 20, 2014 at 4:08 PM, Dan Williams <dcbw at redhat.com> wrote:
>
>> On Thu, 2014-03-20 at 15:17 -0600, Eric Johnson wrote:
>> > So I was able to connect to both Verizon and Sprint using PPP and
>> wvDial.
>> > I did this using Sprint's instructions from
>> >
>> http://www4.sprint.com/pcsbusiness/downloads/Sprint_Mobile_Broadband_Setup_Guide.pdf
>> ,
>> > which boiled down to
>> > changing /etc/wvdial.conf to:
>>
>> Which devices are you using? I'll assume the AC250U is on Sprint, since
>> that was never made for Verizon. What's the Verizon device?
>>
>> > [Dialer Defaults]
>> > Modem = /dev/ttyUSB0
>> > Baud = 460800
>> > Init1 = ATZ
>> > Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
>> > ISDN = 0
>> > Modem Type = USB Modem
>> > Phone = #777
>> > Username = ''
>> > Password = ''
>> > Carrier Check = no
>> > Stupid Mode = 1
>> >
>> > and then wvDialing....
>> >
>> > [eric at linux-vn1z ~/modem]$ sudo wvdial
>> > --> WvDial: Internet dialer version 1.61
>> > --> Cannot get information for serial port.
>> > --> Initializing modem.
>> > --> Sending: ATZ
>> > OK
>> > --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
>> > ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
>> > OK
>> > --> Modem initialized.
>> > --> Sending: ATDT#777
>> > --> Waiting for carrier.
>> > ATDT#777
>> > CONNECT
>> > --> Carrier detected. Starting PPP immediately.
>> > --> Starting pppd at Thu Mar 13 17:37:02 2014
>> > --> Pid of pppd: 28332
>> > --> Using interface ppp0
>> > --> pppd: �[7f]
>> > --> pppd: �[7f]
>> > --> pppd: �[7f]
>> > --> local IP address 184.232.199.246
>> > --> pppd: �[7f]
>> > --> remote IP address 66.1.12.193
>> > --> pppd: �[7f]
>> > --> primary DNS address 66.1.13.7
>> > --> pppd: �[7f]
>> > --> secondary DNS address 68.29.1.7
>> > --> pppd: �[7f]
>> > --> Script /etc/ppp/ip-up run successful
>> > --> Default route Ok.
>> > --> Nameserver (DNS) Ok.
>> > --> Connected... Press Ctrl-C to disconnect
>> > --> pppd: �[7f]
>> >
>> > I am seeing 2 occasional issues, 1 minor, the other major:
>> >
>> > 1. Sometimes the DNS fails on PPP connection. I've set
>> > /etc/sysconfig/network/config
>> > setting NETCONFIG_DNS_STATIC_SERVERS="8.8.8.8 4.4.4.4", to fall back on
>> > Google's DNS.
>>
>> Correct; sometimes with pppd and modem firmware, you'll get bogus DNS
>> addresses. Usually they'll end up as 10.64.64.64 I think, and in that
>> case, you just have to use something you know, like 8.8.8.8 or 4.2.2.1
>> (Level3 in Chicago).
>>
>> > 2. "Modem not responding" error, it happens pretty often, maybe 30-40%
>> of
>> > the time. If I retry 2-4 times it usually connects.
>>
>> Does this happen the first time after you plug the modem in? Or does it
>> happen after you've disconnected a data session, and you're reconnecting
>> PPP?
>>
>> Dan
>>
>> > [eric at linux-vn1z ~]$ sudo wvdial
>> > --> WvDial: Internet dialer version 1.61
>> > --> Initializing modem.
>> > --> Sending: ATZ
>> > --> Sending: ATQ0
>> > --> Re-Sending: ATZ
>> > *--> Modem not responding.*
>> >
>> > The "Modem not responding" error is much more important to me to fix,
>> as I
>> > can always work around the DNS issue. Any insights are appreciated.
>> Or if
>> > this is normal on these networks, that would be good to know too.
>> > Thanks!
>> >
>> >
>> >
>> >
>> > On Thu, Mar 13, 2014 at 5:14 PM, Eric Johnson <eric at minutekey.com>
>> wrote:
>> >
>> > > Hi Aleksander,
>> > > Wow, that python script sounds awesome, if you have a chance to finish
>> > > it.
>> > >
>> > > I'm going to try to get pppd going, next. Then Verizon and DHCP or
>> static
>> > > IP I'm guessing.
>> > > Thank!
>> > > Eric
>> > >
>> > >
>> > > On Thu, Mar 13, 2014 at 4:31 PM, Aleksander Morgado <
>> > > aleksander at aleksander.es> wrote:
>> > >
>> > >> Hey!
>> > >>
>> > >> On Thu, Mar 13, 2014 at 6:28 PM, Eric Johnson <eric at minutekey.com>
>> wrote:
>> > >> > [eric at linux-vn1z ~]$ mmcli -b 0
>> > >> > Bearer '/org/freedesktop/ModemManager1/Bearer/0'
>> > >> > -------------------------
>> > >> > Status | connected: 'yes'
>> > >> > | suspended: 'no'
>> > >> > | interface: 'ttyUSB0'
>> > >> > | IP timeout: '20'
>> > >> > -------------------------
>> > >> > Properties | apn: 'none'
>> > >> > | roaming: 'allowed'
>> > >> > | IP type: 'none'
>> > >> > | user: 'none'
>> > >> > | password: 'none'
>> > >> > | number: '#777'
>> > >> > | Rm protocol: 'unknown'
>> > >> > -------------------------
>> > >> > IPv4 configuration | method: 'ppp'
>> > >> > -------------------------
>> > >> > IPv6 configuration | method: 'unknown'
>> > >> >
>> > >> > [eric at linux-vn1z ~]$ mmcli -m 0 --list-bearers
>> > >> >
>> > >> > Found 1 bearers:
>> > >> >
>> > >> > /org/freedesktop/ModemManager1/Bearer/0
>> > >> >
>> > >> > [eric at linux-vn1z ~]$ wvdialconf
>> > >> > Editing `/etc/wvdial.conf'.
>> > >> >
>> > >> > Scanning your serial ports for a modem.
>> > >>
>> > >> Everything went ok until this point. So, mmcli lets you get the port
>> > >> in connected state; that's how far ModemManager goes. Still, there is
>> > >> another step that needs to be done, which is the IP setup in the data
>> > >> port (which would usually be done by e.g. NetworkManager). There
>> > >> currently are three main cases, and what you need to look at is the
>> > >> Bearer properties that you get when MM tells you you're connected
>> > >> (i.e. the "mmcli -b 0" output):
>> > >>
>> > >> Case 1) tty port
>> > >> If the bearer tells you to use a tty as data port and use PPP, you
>> > >> need to launch pppd on that tty, passing APN auth details among other
>> > >> things.
>> > >>
>> > >> Case 2) net port, dhcp
>> > >> If the bearer tells you to use a net port as data port and use DHCP,
>> > >> you need to bring the interface up and launch a DHCP client in that
>> > >> interface.
>> > >>
>> > >> Case 3) net port, static
>> > >> If the bearer tells you to use a net port as data port and 'static'
>> > >> config, it will also give you what IP address configuration (IP,
>> > >> netmask..) you need to configure in the net port. So you'll need to
>> > >> bring the interface up, and then setup those details in the
>> interface.
>> > >>
>> > >> Interestingly, I was bored last Monday and started to write a python
>> > >> app (called it 'mm-online', I'm no good inventing new names) which
>> > >> will do exactly all that (just not using mmcli); it will use
>> > >> libmm-glib via GObject-introspection to call SimpleConnect() and then
>> > >> (this not yet done) prepare the connection following the steps I said
>> > >> earlier. This would allow a 'standalone' operation of ModemManager
>> > >> (i.e. without a higher level connection manager like NetworkManager).
>> > >>
>> > >>
>> > >> --
>> > >> Aleksander
>> > >> https://aleksander.es
>> > >>
>> > >
>> > >
>> > _______________________________________________
>> > ModemManager-devel mailing list
>> > ModemManager-devel at lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/modemmanager-devel/attachments/20140324/d0c5e5f8/attachment-0001.html>
More information about the ModemManager-devel
mailing list