Potersi connettere alla rete durante dei viaggi, mentre si è in un cantiere, mentre si lavora fuori ufficio è certamente molto comodo, ed oggi è veramente alla portata di tutti.
Gli ingredienti per fare ciò sono veramente pochi e di facile reperimento:
- Sottoscrizione di una opzione/contratto con un fornitore di telefonia mobile
- Telefono cellulare o scheda UMTS
- Un notebook/netbook
A seguire una rapida descrizione di come ho fatto io usando
- L’opzione della “TRE” per navigare in rete, con ricarica mensiel
- Telefono LG U8360
- Vecchio portatile con sistema operativo Ubuntu Linux
Quindi cominciamo subito.
Aprite una shell e lanciate il comando:
:~$ tail -f /var/log/messages
Questo vi permetterà di leggere i messaggi del kernel, a questo punto collegate il cavo USB del cellulare.
Se il cellulare viene riconosciuto dal Kernel vedrete apparire delle righe del tipo:
Jan 1 17:58:53 ice kernel: [16661.056099] usb 2-1: USB disconnect, address 4
Jan 1 17:58:56 ice kernel: [16663.888095] usb 2-1: new full speed USB device using ohci_hcd and address 5
Jan 1 17:58:56 ice kernel: [16664.148436] usb 2-1: configuration #1 chosen from 1 choice
Jan 1 17:58:56 ice kernel: [16664.161253] cdc_acm 2-1:1.1: ttyACM0: USB ACM device
Jan 1 17:58:56 ice kernel: [16664.177253] cdc_acm 2-1:1.3: ttyACM1: USB ACM device
Jan 1 17:58:56 ice kernel: [16664.222851] scsi6 : SCSI emulation for USB Mass Storage devices
Jan 1 17:59:01 ice kernel: [16669.231683] scsi 6:0:0:0: Direct-Access EMP Demo MMC Flash Card 0000 PQ: 0 ANSI: 0
Jan 1 17:59:01 ice kernel: [16669.319857] sd 6:0:0:0: [sdc] Attached SCSI removable disk
Jan 1 17:59:01 ice kernel: [16669.320573] sd 6:0:0:0: Attached scsi generic sg3 type 0
A questo puntofacciamo la prova del nove, da shell lanciamo:
$ sudo wvdialconf /etc/wvdial.conf
L’output sarà del tipo:
Editing `/tmp/schifo.conf’.
Scanning your serial ports for a modem.
ttyS0<*1>: ATQ0 V1 E1 — failed with 2400 baud, next try: 9600 baud
ttyS0<*1>: ATQ0 V1 E1 — failed with 9600 baud, next try: 115200 baud
ttyS0<*1>: ATQ0 V1 E1 — and failed too at 115200, giving up.
Modem Port Scan<*1>: S1 S2 S3
WvModem<*1>: Cannot get information for serial port.
ttySL0<*1>: ATQ0 V1 E1 — failed with 2400 baud, next try: 9600 baud
ttySL0<*1>: ATQ0 V1 E1 — OK
ttySL0<*1>: ATQ0 V1 E1 Z — OK
ttySL0<*1>: ATQ0 V1 E1 S0=0 — OK
ttySL0<*1>: ATQ0 V1 E1 S0=0 &C1 — OK
ttySL0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 — OK
ttySL0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — OK
ttySL0<*1>: Modem Identifier: ATI — SmartLink Soft Modem
ttySL0<*1>: Speed 19200: AT — OK
ttySL0<*1>: Speed 38400: AT — OK
ttySL0<*1>: Speed 57600: AT — OK
ttySL0<*1>: Speed 115200: AT — OK
ttySL0<*1>: Speed 230400: AT — OK
ttySL0<*1>: Speed 460800: AT — OK
ttySL0<*1>: Max speed is 460800; that should be safe.
ttySL0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — OK
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 — LGE U8xxx
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 — LGE U8xxx
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
Found a modem on /dev/ttySL0.
/etc/wvdial.conf
Modem configuration written to /etc/wvdial.conf.
ttySL0
ttyACM0
ttyACM1
Come vede il modem del cellulare è visto eccome
Adesso manca la configurazione per l’accesso remoto.
Siete liberi di usate il metodo che più preferite:
- script personale
- gppp
- kppp
- wvdial
Nel caso che necessitiate l’istallazione di uno dei software, sapete come fare.. apt-get install
Se usate wvdial, come me, dovete editare il file: $ vim /etc/wvdial.conf
Ed inserite i segue parametri di connessione:
Modem = /dev/ttyACM0
Baud = 460800
Init1 = ATZ
Init2 = AT+CGDCONT=1,”IP”,”naviga.tre.it”,,0,0
ISDN = 0
Modem Type = Analog Modem
Phone = *99#
In alternativa provate anche la seguente versione:
Modem = /dev/ttyACM0
Baud = 460800
Init1 = ATZ
Init2 = AT+CGDCONT=1,”IP”,”naviga.tre.it”,,0,0
ISDN = 0
Modem Type = Analog Modem
Carrier Check = no
Phone = *99#
Username = a
Password = ”
Nel mio caso il modem UMTS è visto come il device /dev/ttyACM0, assicuratevi di dare la giusta configurazione per il vostro.
La procedura è valida per qualsiati cellulare che connettete via USB e per qualsiasi distribuzione Linux.
Addesso date un bel:
$sudo wvdial
e se tutto va bene vedrete:
–> Ignoring malformed input line: “; configurazione per TRE”
–> WvDial: Internet dialer version 1.60
–> Cannot get information for serial port.
–> Initializing modem.
–> Sending: ATZ
ATZ
OK
–> Sending: AT+CGDCONT=1,”IP”,”naviga.tre.it”,,0,0
AT+CGDCONT=1,”IP”,”naviga.tre.it”,,0,0
OK
–> Modem initialized.
–> Sending: ATDT*99#
–> Waiting for carrier.
ATDT*99#
CONNECT
~[7f]}#@!}!}!} }9}#}%B#}%}(}”}’}”}”}&} } } } }%}&L}=[Wg{~
--> Carrier detected. Waiting for prompt.
~[7f]}#@!}!}”} }9}#}%B#}%}(}”}’}”}”}&} } } } }%}&L}=[W+[16]~
–> PPP negotiation detected.
–> Starting pppd at Sat Jan 3 11:27:39 2009
–> Pid of pppd: 20414
–> Using interface ppp0
–> local IP address xxx
–> remote IP address xxx
–> primary DNS address xxx
–> secondary DNS address xxx
Buon divertimento lavoro.
Nessun commento:
Posta un commento