Saturday, August 18, 2012

sudo wvdialconf to detect a modem

The modem does not show up as ttyUSB but ttyACM0-ttyACM6
tovantran@Satellite:~/bin$ ls /dev/ttyACM*
/dev/ttyACM0  /dev/ttyACM1  /dev/ttyACM2  /dev/ttyACM3  /dev/ttyACM4  /dev/ttyACM5  /dev/ttyACM6
Get wvdial from by issue command:

tovantran@Satellite:~/bin$ sudo wvdialconf
Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

Modem Port Scan<*1>: S0   S1   S2   S3   S4   S5   S6   S7  
Modem Port Scan<*1>: S8   S9   S10  S11  S12  S13  S14  S15 
Modem Port Scan<*1>: S16  S17  S18  S19  S20  S21  S22  S23 
Modem Port Scan<*1>: S24  S25  S26  S27  S28  S29  S30  S31 
WvModem<*1>: Cannot get information for serial port.
ttyACM0<*1>: ATQ0 V1 E1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 Z -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyACM0<*1>: Modem Identifier: ATI -- LISA-U200-01S-00
ttyACM0<*1>: Speed 4800: AT -- OK
ttyACM0<*1>: Speed 9600: AT -- OK
ttyACM0<*1>: Speed 19200: AT -- OK
ttyACM0<*1>: Speed 38400: AT -- OK
ttyACM0<*1>: Speed 57600: AT -- OK
ttyACM0<*1>: Speed 115200: AT -- OK
ttyACM0<*1>: Speed 230400: AT -- OK
ttyACM0<*1>: Speed 460800: AT -- OK
ttyACM0<*1>: Max speed is 460800; that should be safe.
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
WvModem<*1>: Cannot get information for serial port.
ttyACM1<*1>: ATQ0 V1 E1 -- OK
ttyACM1<*1>: ATQ0 V1 E1 Z -- OK
ttyACM1<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyACM1<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyACM1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyACM1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyACM1<*1>: Modem Identifier: ATI -- LISA-U200-01S-00
ttyACM1<*1>: Speed 4800: AT -- OK
ttyACM1<*1>: Speed 9600: AT -- OK
ttyACM1<*1>: Speed 19200: AT -- OK
ttyACM1<*1>: Speed 38400: AT -- OK
ttyACM1<*1>: Speed 57600: AT -- OK
ttyACM1<*1>: Speed 115200: AT -- OK
ttyACM1<*1>: Speed 230400: AT -- OK
ttyACM1<*1>: Speed 460800: AT -- OK
ttyACM1<*1>: Max speed is 460800; that should be safe.
ttyACM1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
WvModem<*1>: Cannot get information for serial port.
ttyACM2<*1>: ATQ0 V1 E1 -- OK
ttyACM2<*1>: ATQ0 V1 E1 Z -- OK
ttyACM2<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyACM2<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyACM2<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyACM2<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyACM2<*1>: Modem Identifier: ATI -- LISA-U200-01S-00
ttyACM2<*1>: Speed 4800: AT -- OK
ttyACM2<*1>: Speed 9600: AT -- OK
ttyACM2<*1>: Speed 19200: AT -- OK
ttyACM2<*1>: Speed 38400: AT -- OK
ttyACM2<*1>: Speed 57600: AT -- OK
ttyACM2<*1>: Speed 115200: AT -- OK
ttyACM2<*1>: Speed 230400: AT -- OK
ttyACM2<*1>: Speed 460800: AT -- OK
ttyACM2<*1>: Max speed is 460800; that should be safe.
ttyACM2<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
WvModem<*1>: Cannot get information for serial port.
ttyACM3<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyACM3<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyACM3<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
WvModem<*1>: Cannot get information for serial port.
ttyACM4<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyACM4<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyACM4<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
WvModem<*1>: Cannot get information for serial port.
ttyACM5<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyACM5<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyACM5<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
WvModem<*1>: Cannot get information for serial port.
ttyACM6<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyACM6<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyACM6<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.

Found an USB modem on /dev/ttyACM0.
Modem configuration written to /etc/wvdial.conf.
ttyACM0<Info>: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
ttyACM1<Info>: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
ttyACM2<Info>: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
tovantran@Satellite:~/bin$ cat /etc/wvdial.conf

[Dialer ROGERS_ttyACM2]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","internet.com"
Modem Type = USB Modem
ISDN = 0
New PPPD = yes
Phone = *99#
Modem = /dev/ttyACM2
Username = wapuser1
Password = wapuser
Baud = 460800

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
; Phone = <Target Phone Number>
ISDN = 0
; Password = <Your Password>
New PPPD = yes
; Username = <Your Login Name>
Modem = /dev/ttyACM0
Baud = 460800

[Dialer ROGERS_ttyACM1]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","internet.com"
Modem Type = USB Modem
ISDN = 0
New PPPD = yes
Phone = *99#
Modem = /dev/ttyACM1
Username = wapuser1
Password = wapuser
Baud = 460800

[Dialer ROGERS_ttyACM0]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","internet.com"
Modem Type = USB Modem
ISDN = 0
New PPPD = yes
Phone = *99***1#
Modem = /dev/ttyACM0
Username = wapuser1
Password = wapuser
Baud = 460800
To run
$ wvdial ROGERS_ttyACM0

If the modem does not show up some debugs:
USB Serial device does not register a /dev/ttyUSBX

CONNECT MODEM
# wvdial ROGERS_ttyACM0
--> WvDial: Internet dialer version 1.61
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","internet.com"
AT+CGDCONT=1,"IP","internet.com"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Waiting for prompt.
~[7f]}#@!}!}!} }4}"}&} } } } }%}&[16]"J$}'}"}(}"*"~
--> PPP negotiation detected.
--> Starting pppd at Thu Jan  1 13:05:33 1970
--> Pid of pppd: 840
--> Disconnecting at Thu Jan  1 13:05:34 1970
--> The PPP daemon has died: pppd options error (exit code = 2)
--> man pppd explains pppd error codes in more detail.
--> I guess that's it for now, exiting
--> The PPP daemon has died. (exit code = 2)
[72344.116711] digsig_runtime_verify_elf:00008000-00029000 r-xp 00000000 00:01 ino:1237 len:00021000 task: wvdial[839] path: /bin/wvdial
[72344.129714] digsig_elf_verify: Warning! wvdial: Has No spak section! Will be added when signer ready!



No comments:

Post a Comment