Howto install and use usb modem, as example “mts connect”, in debian linux

AnyData ADU-510A
In my company is very common to use “fast” internet from MTS under the brand “MTS Connect”. Probably the most stable 3G internet in Ukraine. This is not a PR for the MTS, it is a personal experience.

# uname -r
2.6.32-5-amd64

STEP1
Connect USB modem to pc and check dmesg:

# dmesg  | grep usb
[ 8864.076082] usb 5-2: new full speed USB device using uhci_hcd and address 5
[ 8864.239181] usb 5-2: New USB device found, idVendor=16d5, idProduct=6502
[ 8864.239192] usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 8864.239199] usb 5-2: Product: AnyDATA CDMA Products
[ 8864.239204] usb 5-2: Manufacturer: AnyDATA Corporation
[ 8864.239557] usb 5-2: configuration #1 chosen from 1 choice
[ 8864.245438] usb 5-2: GSM modem (1-port) converter now attached to ttyUSB0
[ 8864.247357] usb 5-2: GSM modem (1-port) converter now attached to ttyUSB1
[ 8864.249343] usb 5-2: GSM modem (1-port) converter now attached to ttyUSB2

If modem was found, go to STEP2.

If there are nothing found, try to check option module in the Linux Kernel:

# modprobe -l | grep option
kernel/drivers/usb/serial/option.ko

If you do not find it, try to load module:

# modprobe option

(If you get an error, you need to build the kernel with this module. cd /usr/src/linux; make menuconfig; etc..)

STEP2
Next, I use wvdial (PPP dialer with built-in intelligence):

# apt-get install wvdial

Configuration for MTS connect (/etc/wvdial.conf):

[Dialer MTS]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Phone = *99#
Stupid Mode = 1
Baud = 460800
Modem = /dev/ttyUSB0
ISDN = 0
Username = mts
Password = mts
Auto Reconnect = 1
Carrier Check = 0

Try to connect:

# wvdial MTS
--> WvDial: Internet dialer version 1.60
--> 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
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
~[7f]}#@!}!}!} }5}"}&} } } } }#}%B#}%}%}&m+}+}%rP~
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Mon Sep 13 20:47:45 2010
--> Pid of pppd: 12841
--> Using interface ppp0
--> pppd: [1e][7f]
--> pppd: [1e][7f]
--> pppd: [1e][7f]
--> pppd: [1e][7f]
--> pppd: [1e][7f]
--> pppd: [1e][7f]
--> local  IP address 77.52.41.249
--> pppd: [1e][7f]
--> remote IP address 80.255.77.17
--> pppd: [1e][7f]
--> primary   DNS address 80.255.64.23
--> pppd: [1e][7f]
--> secondary DNS address 80.255.64.24
--> pppd: [1e][7f]
^CCaught signal 2:  Attempting to exit gracefully...
--> Terminating on signal 15
--> pppd: [1e][7f]
--> Connect time 0.3 minutes.
--> pppd: [1e][7f]
--> pppd: [1e][7f]
--> Disconnecting at Mon Sep 13 20:48:04 2010

Tested on AnyData ADU-510A and ZTE AC5710




coded by nessus