Finalmente tive a oportunidade de pegar uma das placas 3G, com chip da Claro. Uma das vantagens da migração do FreeBSD pro Linux é justamente a facilidade no reconhecimento de novos hardwares. A placa foi identificada de imediato pelo meu OpenSuse 11:


usb usb7: configuration #1 chosen from 1 choice hub 7-0:1.0: USB hub found hub 7-0:1.0: 1 port detected 
usb usb7: New USB device found, idVendor=1d6b, idProduct=0001 
usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1 
usb usb7: Product: OHCI Host Controller 
usb usb7: Manufacturer: Linux 2.6.25.20-0.4-default ohci_hcd 
usb usb7: SerialNumber: 0000:03:00.1 
usb 6-1: new full speed USB device using ohci_hcd and address 2 
usb 6-1: configuration #2 chosen from 1 choice 
usb 6-1: New USB device found, idVendor=0fce, idProduct=d0b2 
usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 
usb 6-1: Product: Sony Ericsson PC300 
usb 6-1: Manufacturer: Sony Ericsson 
usb 6-1: SerialNumber: 3579310101884440 
cdc_acm 6-1:2.1: ttyACM0: USB ACM device 
cdc_acm 6-1:2.3: ttyACM1: USB ACM device 
usbcore: registered new interface driver cdc_acm 
drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters 
usb0: register 'cdc_ether' at usb-0000:03:00.0-1, CDC Ethernet Device, 02:80:37:0a:03:00 
usbcore: registered new interface driver cdc_ether 
usb0: no IPv6 routers present

O driver cdc_acm foi carregado automaticamente.

Para fazer a discagem, instalei o aplicativo wvdial, velho companheiro dos tempos de modem discado, à 14400 bps. Utilizando o wvdialconf, a placa 3G é automagicamente identificada:


Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

Modem Port Scan<*1>: S0   S1
ttyS2<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS2<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS2<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
Modem Port Scan<*1>: S3
ttyS4: No such device or address
Modem Port Scan<*1>: S4
ttyS5: No such device or address
Modem Port Scan<*1>: S5
ttyS6: No such device or address
Modem Port Scan<*1>: S6
ttyS7: No such device or address
Modem Port Scan<*1>: S7
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 -- PC300
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 -- PC300
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 an USB modem on /dev/ttyACM0.
Modem configuration written to /etc/wvdial.conf.
ttyACM0: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1; &D2; +FCLASS=0"
ttyACM1: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1; &D2; +FCLASS=0"


Esperava ver mais velocidade, mas 460k já é melhor que nada. Infelizmente a configuração padrão não funcionou de jeito nenhum. Vasculhando google afora, encontrei o link de configuração para outro tipo de modem, o E-226:

 

Adaptei a mesma para o PC300, como mostra meu /etc/wvdial.conf abaixo:


[Dialer Defaults]
Carrier Check = off
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1; &D2; +FCLASS=0
Password = claro
Ask Password = 0
Check Def Route = 1
Phone = *99***1#
Idle Seconds = 0
Modem Type = Analog Modem
Stupid Mode = 1
Compuserve = 0
Baud = 460800
Auto DNS = off
Dial Command = ATDT
Modem = /dev/ttyACM0
ISDN = 0
Username = claro

[Dialer claro3g]
Stupid Mode = on
Password = claro
Auto Reconnect = off
Username = claro
Phone = *99***1#

Também precisei editar o arquivo /etc/ppp/peers/wvdial para desabilitar as opções de compressão:


plugin passwordfd.so
noauth
name wvdial
debug
kdebug 9
record /tmp/pppd.dump
noccp
novj
novjccomp

Com isso consegui a conexão via 3G, bastando digitar wvdial.

--> 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***1#
--> Waiting for carrier.
ATDT*99***1#
~[7f]}#@!}!}!} }9}#}%B#}%}(}"}'}"}"}&} } } } }%}&n;>}/qzY~
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Fri Jul 31 21:34:15 2009
--> Pid of pppd: 14211
--> Using interface ppp0
--> Authentication (CHAP) started
--> Authentication (CHAP) successful
--> local  IP address 189.94.168.217
--> remote IP address 10.64.64.64
--> Script /etc/ppp/ip-up run successful
--> Default route Ok.
--> Nameserver (DNS) Ok.
--> Connected... Press Ctrl-C to disconnect

Não é muito rápido, mas ajuda muito em locais sem opção de Internet, como quando estou dentro do site de clientes.

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.