linux配置电信天翼3G上网

1.首先安装包,确定3G网卡能否被识别

pacman -S usbutils

查看USB设备

[kevin@kevin-laptop ~]$ lsusb

  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

  Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

  Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub

  Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub

  Bus 001 Device 003: ID 045e:077a Microsoft Corp.

  Bus 002 Device 003: ID 0402:9665 ALi Corp. Gateway Webcam

  Bus 002 Device 005: ID 12d1:1001 Huawei Technologies Co., Ltd. <span style="color: rgb(255, 0, 0);">E169/E620/E800</span> HSDPA Modem</span></span>

 

2.安装驱动

电信并没有提供网卡的驱动,我们需要安装usb_modeswitch自己设置下

pacman -S usb_modeswitch

然后编辑/etc/modeswitch.conf,里面已有各型号的配置,选择性的注释掉就好了,比如我的

# Huawei E169 and others

  #

  # Contributor: Dale Lane</span></span>

DefaultVendor=  0x12d1

  DefaultProduct= 0x1001</span></span>

TargetClass=    0xff

# choose one of these:

  DetachStorageOnly=1

  HuaweiMode=1</span></span>

  &nbsp;

 

3.设置拨号

拨号我们需要安装两个软件

pacman -S modemmanager wvdial

生成wvdial的配置

# wvdialconf

注意要用root权限,生成的配置如下

[Dialer Defaults]

  Init1 = ATZ

  Init2 = ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0

  Modem Type = Analog Modem

  ISDN = 0

  Phone = #777

  Modem = /dev/ttyUSB0

  Username = card;ctnet@mycdma.cn

  Password = card;vnet.mobi

  Baud = 9600</span></span>

  &nbsp;

到这里已经配置成功,之后插上网卡执行

#wvdial

如果喜欢图形界面的拨号,可以安装一个前端

yaourt -S pywvdial