Io sono riuscito a far funzionare la Huawei E270 su Slackware 12.1 senza ricompilare assolutamente niente

perdipiù è una procedura universale che funziona su tutte le distro (testata su Ubuntu 8.04, Zenwalk 5, Debian Lenny, Sabayon, Gentoo, Fedora 9 e Mandriva).
Detto questo, assicuratevi di avere il modulo airprime e cominciamo (fate tutto in root, mi raccomando).
Create un file di regole per udev chiamato 99-huawei-e220.rules con il seguente comando:
Al suo interno scriveteci queste righe:
Codice: Seleziona tutto
SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1003", RUN+="/sbin/rmmod airprime; /sbin/rmmod usbserial; sbin/rmmod usb_storage; /sbin/usb_modeswitch"
SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1003", RUN+="/sbin/modprobe airprime"
Vi consiglio però di non fare copia e incolla, in quanto l'HTML potrebbe modificare alcuni caratteri, quindi facendo copia e incolla potrebbe darvi caratteri sbagliati….
A questo punto bisogna creare il file di configurazione per la connessione ppp. Io ho usato wvdial. Dove quindi modificare il file /etc/wvdial.conf inserendoci ESATTAMENTE le righe qui sotto:
Codice: Seleziona tutto
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=16,"IP","web.omnitel.it"
#Init4 = ATS0=0
#Init5 = AT+CGATT?
Modem = /dev/ttyUSB0
Phone = *99***16#
Username = vodafone
Password = none
Modem Type = Analog Modem
Stupid Mode = 1
Compuserve = 0
Baud = 912600
Check Carrier = no
Auto DNS = 80.85.96.131
Auto DNS = 80.85.97.70
ISDN = 0
#Idle Seconds = 10000
#Dial Command = ATDT
Ask Password = 0
Ottimo, siamo quasi alla fine. Ora prelevate
http://www.draisberghof.de/usb_modeswit ... .4.tar.bz2 e scompattatelo. Dall’interno della directory appena scompattata lanciate il seguente comando:
Copiate il file “usb_modeswitch.conf†all’interno della directory /etc
e modificatelo con le righe seguenti (in pratica dovete togliere tutti quello che riguarda i modem differenti dal vostro).
Codice: Seleziona tutto
# /etc/usb_modeswitch.conf
#
# Last modified: 2008-03-09
#
# Configuration for usb_modeswitch, a mode switching tool for controlling
# flip flop (multiple device) USB gear
#
# Triggers the switching of several known UMTS modems from storage device mode
# ("ZeroCD" under MS Windows) to modem (serial) device mode
#
# Detailed instructions and a friendly forum on the homepage:
# http://www.draisberghof.de/usb_modeswitch
# Note: Timing of execution might be an issue. See homepage!
# What it all means:
#
# * DefaultVendor
# * DefaultProduct
#
# This is the ID the USB device shows after having been plugged in.
# The tool looks for this; if not found -> no action.
#
# * TargetVendor
# * TargetProduct
#
# This is the ID the USB device after successful mode switching.
# The tool looks for this; if found -> no action.
# If not found, further options are required: you need
# one out of TargetClass, DetachStorageOnly, HuaweiMode.
#
# * TargetClass
#
# Newer Option devices don't change IDs but switch device class. If
# the device has the target class -> no action.
#
# * MessageEndpoint
#
# A kind of address inside the interface to which the "message"
# (the sequence that does the actual switching) is directed
#
# * MessageContent
#
# A hex string containing the "message" sequence; it will be
# sent as a USB bulk transfer.
#
# * ResponseEndpoint
# * NeedResponse
#
# Some devices need to receive the response of the bulk
# transfer to do the switching properly
#
# * DetachStorageOnly
#
# Some devices just need to be detached from the usb-storage
# driver to initiate the mode switching
#
# * HuaweiMode
#
# Some Huawei devices can be switched by a special control
# message.
#
# All other entries are just ignored ...
#
#
# For filling in all this information for an unknown device,
# note its Vendor and Product ID after plugging in (usb-storage)
# from /proc/bus/usb/devices (or from the output of "lsusb"), then
# try spying on the USB communication to this device inside a
# Micro$oft OS. Recommended tool: "SniffUSB"
#
# If you find working codes and configurations, please contribute
# them!
########################################################
# Huawei E220 (aka "Vodafone EasyBox II", aka "T-Mobile wnw Box Micro")
#
# Two options now: 1. removal of "usb-storage" 2. the special control
# message found by Miroslav Bobovsky
#
# Contributor: Hans Kurent, Denis Sutter
DefaultVendor= 0x12d1
DefaultProduct= 0x1003
# choose one of these:
DetachStorageOnly=1
HuaweiMode=1
Perfetto, abbiamo finito

Per far funzionare la chiavetta dovete collegarla al computer, digitare da root “usb_modeswitch†e poi semplicemente avviare il “wvdialâ€. Complimenti, siete connessi

Ovviamente invece di wvdial potete usare gnome-ppp o kppp, semplicemente usando gli stessi parametri nella configurazione, oppure creare un vostro script che unisca usb_modeswitch e wvdial…sta a voi!
Buona navigazione a tutta banda a tutti!