当前位置: 技术问答>linux和unix
Linux 下USB无线网卡上网设置
来源: 互联网 发布时间:2016-02-23
本文导语: 台式电脑,Linux内核2.6.1.05,USB无线网卡(netgear wg111v2 54Mbps wireless USB 2.0 ),求高人解决如何设置才能上网?分不够再加!!! | jf 安装软件 代码: emerge ppp wvdial 修改用户组...
台式电脑,Linux内核2.6.1.05,USB无线网卡(netgear wg111v2 54Mbps wireless USB 2.0 ),求高人解决如何设置才能上网?分不够再加!!!
|
jf
安装软件
代码:
emerge ppp wvdial
修改用户组
代码:
usermod -aG dialout 用户名
运行配置生成文件
代码:
wvdialconf /etc/wvdial.conf
editing `/etc/wvdial.conf'.
Scanning your serial ports for a modem.
ttyS0: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS0: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS0: ATQ0 V1 E1 -- and failed too at 115200, giving up.
ttyS1: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS1: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS1: ATQ0 V1 E1 -- and failed too at 115200, giving up.
Modem Port Scan: S2 S3
ttyACM0: ATQ0 V1 E1 -- OK
ttyACM0: ATQ0 V1 E1 Z -- OK
ttyACM0: ATQ0 V1 E1 S0=0 -- OK
ttyACM0: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyACM0: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyACM0: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyACM0: Modem Identifier: ATI -- ERROR
ttyACM0: Speed 4800: AT -- OK
ttyACM0: Speed 9600: AT -- OK
ttyACM0: Speed 19200: AT -- OK
ttyACM0: Speed 38400: AT -- OK
ttyACM0: Speed 57600: AT -- OK
ttyACM0: Speed 115200: AT -- OK
ttyACM0: Speed 230400: AT -- OK
ttyACM0: Speed 460800: AT -- OK
ttyACM0: Max speed is 460800; that should be safe.
ttyACM0: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
Found an USB modem on /dev/ttyACM0.
/etc/wvdial.conf: Can't open '/etc/wvdial.conf' for reading: No such file or directory
/etc/wvdial.conf: ...starting with blank configuration.
Modem configuration written to /etc/wvdial.conf.
ttyACM0: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
修改配置文件 nano -w /etc/wvdial.conf
代码:
[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Phone = #777
ISDN = 0
Username = CARD
Init1 = ATZ
Password = CARD
Modem = /dev/ttyACM0
Baud = 460800
使用说明:
运行
代码:
modprob ppp
wvdial
看到的结果如下:
代码:
--> WvDial: Internet dialer version 1.56
--> Cannot open /dev/ttyACM0: Input/output error
--> 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#777
--> Waiting for carrier.
ATDT#777
CONNECT
--> Carrier detected. Waiting for prompt.
~[7f]}#@!}!}!} }=}!}$}%j}"}&} } } } }#}%B#}%}%}&} oOb}'}"}(}"Hn~
--> PPP negotiation detected.
--> Starting pppd at Fri Apr 21 17:34:53 2006
--> Pid of pppd: 11116
--> Using interface ppp0
--> pppd: 5+
--> pppd: 5+
--> pppd: 5+
--> pppd: 5+
--> local IP address 220.205.12.112
--> pppd: 5+
--> remote IP address 220.192.8.6
--> pppd: 5+
--> primary DNS address 220.192.8.58
--> pppd: 5+
--> secondary DNS address 220.192.32.103
--> pppd: 5+
安装软件
代码:
emerge ppp wvdial
修改用户组
代码:
usermod -aG dialout 用户名
运行配置生成文件
代码:
wvdialconf /etc/wvdial.conf
editing `/etc/wvdial.conf'.
Scanning your serial ports for a modem.
ttyS0: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS0: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS0: ATQ0 V1 E1 -- and failed too at 115200, giving up.
ttyS1: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS1: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS1: ATQ0 V1 E1 -- and failed too at 115200, giving up.
Modem Port Scan: S2 S3
ttyACM0: ATQ0 V1 E1 -- OK
ttyACM0: ATQ0 V1 E1 Z -- OK
ttyACM0: ATQ0 V1 E1 S0=0 -- OK
ttyACM0: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyACM0: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyACM0: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyACM0: Modem Identifier: ATI -- ERROR
ttyACM0: Speed 4800: AT -- OK
ttyACM0: Speed 9600: AT -- OK
ttyACM0: Speed 19200: AT -- OK
ttyACM0: Speed 38400: AT -- OK
ttyACM0: Speed 57600: AT -- OK
ttyACM0: Speed 115200: AT -- OK
ttyACM0: Speed 230400: AT -- OK
ttyACM0: Speed 460800: AT -- OK
ttyACM0: Max speed is 460800; that should be safe.
ttyACM0: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
Found an USB modem on /dev/ttyACM0.
/etc/wvdial.conf: Can't open '/etc/wvdial.conf' for reading: No such file or directory
/etc/wvdial.conf: ...starting with blank configuration.
Modem configuration written to /etc/wvdial.conf.
ttyACM0: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
修改配置文件 nano -w /etc/wvdial.conf
代码:
[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Phone = #777
ISDN = 0
Username = CARD
Init1 = ATZ
Password = CARD
Modem = /dev/ttyACM0
Baud = 460800
使用说明:
运行
代码:
modprob ppp
wvdial
看到的结果如下:
代码:
--> WvDial: Internet dialer version 1.56
--> Cannot open /dev/ttyACM0: Input/output error
--> 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#777
--> Waiting for carrier.
ATDT#777
CONNECT
--> Carrier detected. Waiting for prompt.
~[7f]}#@!}!}!} }=}!}$}%j}"}&} } } } }#}%B#}%}%}&} oOb}'}"}(}"Hn~
--> PPP negotiation detected.
--> Starting pppd at Fri Apr 21 17:34:53 2006
--> Pid of pppd: 11116
--> Using interface ppp0
--> pppd: 5+
--> pppd: 5+
--> pppd: 5+
--> pppd: 5+
--> local IP address 220.205.12.112
--> pppd: 5+
--> remote IP address 220.192.8.6
--> pppd: 5+
--> primary DNS address 220.192.8.58
--> pppd: 5+
--> secondary DNS address 220.192.32.103
--> pppd: 5+
|
linux能发现无线网卡吗?本子自带的无线我一般用wpa_applicant来上网,但设置比较麻烦。
|
CDMA的无线网卡(华为)直接使用kppp之类的软件拨号上万就可以了。用户名和密码都是card,拨号是#777