Configure Alcatel One Touch X060S HSDPA USB modem in Debian

Last updated 2009-12-23


Brief tutorial on how to configure the Alcatel One Touch X060S HSDPA modem in Debian Lenny, and configure Wvdial for the Spanish carrier Masmovil.

USB modeswitch

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
      # 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

Remove the leading ; leaving it like this
	# Alcatel X200/X060S
	DefaultVendor=  0x1bbb
	DefaultProduct= 0xf000

	TargetVendor=   0x1bbb
	TargetProduct=  0x0000


Getting the ttyUSB devices

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 -

        Manufacturer: TCT Mobile International Limited
        Model: HSPA Data Card
        Revision: C1111400
        IMEI: 35207xxxxxxxxxx
        +GCAP: +CGSM,+DS,+ES


Wvdial configuration for

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

	[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 = "*"	

Connecting and disconnecting

First send the pin number to the modem issuing:

	# wvdial pin


	# 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