Brief tutorial on how to configure the Alcatel One Touch X060S HSDPA modem in Debian Lenny, and configure Wvdial for the Spanish carrier Masmovil.
The modem, trying to making things easier for the windows user, and cheaper for the provider, identifies itself as a CD-ROM player, and serves that way about 10MB worth of windows drivers. After the driver is installed in windows, some 'mode switching' is done, so the defive appears as a usb modem from them on.
Linux does not make that switching by default, and the device appears as CD-ROM storage always when plugged in, making the modem unusable. Fortunately, Josua Dietze made the usb_modeswitch program that speaks the switching protocol over libusb, "switching" from one mode to the other. For more info, see the usb_modeswitch page
As there is no prepackaged version of usb_modeswitch in Debian Lenny, download, compile and install usb_modeswitch-1.0.6.tar.bz2 (or any later version)
# cd /usr/local/src
# wget http://www.draisberghof.de/usb_modeswitch/usb_modeswitch-1.0.6.tar.bz2
# tar jxpvf usb_modeswitch-1.0.6.tar.bz2
# cd usb_modeswitch-1.0.6
# aptitude install build-essential libusb-dev
# make clean && make
# make install
# cp -r usb_modeswitch.d /etc
Open /etc/usb_modeswitch.conf and uncomment the lines 775,776, 778 and 779, where it says
# Alcatel X200/X060S
;DefaultVendor= 0x1bbb
;DefaultProduct= 0xf000
;TargetVendor= 0x1bbb
;TargetProduct= 0x0000
;MessageContent="55534243123456788000000080000606f504025270000000000000000000"
Remove the leading ; leaving it like this
# Alcatel X200/X060S
DefaultVendor= 0x1bbb
DefaultProduct= 0xf000
TargetVendor= 0x1bbb
TargetProduct= 0x0000
MessageContent="55534243123456788000000080000606f504025270000000000000000000"
Run usb_modeswitch
# usb_modeswitch
After exiting, the output of lsusb should be something like
Bus 001 Device 004: ID 1bbb:0000 T & A Mobile Phones,
note the change from f000 to 0000, thus from the fake CD-ROM storage
(which is flash storage) to the real modem.
The device appears as a serial modem with a USB to serial adapter. Insert the usb serial driver issuing:
# modprobe usbserial vendor=0x1bbb product=0x0000
Three devices, /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2 will
appear. You can use socat or screen to open /dev/ttyUSB2 and
send to it the old AT modem commands. For example, using
socat to send the 'ATI' command, we can see (the first
ATI\n in the first line is inserted by us as input for
socat and for the modem):
# socat /dev/ttyUSB2 -
ATI
ATI
Manufacturer: TCT Mobile International Limited
Model: HSPA Data Card
Revision: C1111400
IMEI: 35207xxxxxxxxxx
+GCAP: +CGSM,+DS,+ES
OK
You can use your favorite PPP dialer to log into the modem.
This is the configuration for the dialer Wvdial, when using the Spanish
provider Masmovil. Replace the XXXX in the line
Init2 = AT+CPIN=XXXX with the PIN of your SIMcard.
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 +FCLASS=0
Modem Type = Analog Modem
Baud = 9600
New PPPD = yes
Modem = /dev/ttyUSB2
ISDN = 0
[Dialer pin]
Dial Command = ATDT
Init = ATZ
Init2 = AT+CPIN=XXXX
[Dialer masmovil]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Init3 =
Init4 = AT+CGDCONT=1,"IP","internetmas","",0,0
Baud = 3600000
Username = off
Password = off
New PPPD = yes
Phone = *99*#
Dial Command = ATDT
Stupid Mode = 1
Compuserve = 0
Force Address =
Idle Seconds = 0
Carrier Check = no
ISDN = 0
Auto DNS = 1
Remote Name = "*"
First send the pin number to the modem issuing:
# wvdial pin
Launch
# wvdial masmovil
It will run in foreground. If you kill it with Ctrl-C
connection will be interrupted.
wvdial creates a ppp0 device and configure it with the
addresses obtained from the server.
Pablo Martin