LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 5096|回复: 11

无线网卡的设置,实在没办法,请大家帮忙了。

[复制链接]
发表于 2007-11-6 10:43:52 | 显示全部楼层 |阅读模式
#iwlist scanning
eth0      Interface doesn't support scanning.

lo        Interface doesn't support scanning.

eth1      Scan completed :
          Cell 01 - Address: 00:1B:11:91:20:4E
                    ESSID:"dlink"
                    Protocol:IEEE 802.11bg
                    Mode:Master
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Encryption keyn
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
                              11 Mb/s; 12 Mb/s; 48 Mb/s; 18 Mb/s; 24 Mb/s
                              36 Mb/s; 54 Mb/s
                    Quality=97/100  Signal level=-28 dBm  Noise level=-28 dBm
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra: Last beacon: 232ms ago
          Cell 02 - Address: 00:14:78:E05:28
                    ESSID:"TP-LINK"
                    Protocol:IEEE 802.11bg
                    Mode:Master
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Encryption keyn
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 9 Mb/s; 11 Mb/s
                              6 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                              48 Mb/s; 54 Mb/s
                    Quality=69/100  Signal level=-64 dBm  Noise level=-64 dBm
                    Extra: Last beacon: 246ms ago


#iwconfig
eth0      no wireless extensions.

lo        no wireless extensions.

eth1      unassociated  ESSID:"dlink"  
          Mode:Managed  Frequency=nan kHz  Access Point: Not-Associated   
          Bit Rate:0 kb/s   Tx-Power:14 dBm   
          Retry limit:15   RTS thrff   Fragment thrff
          Encryption keyff
          Power Managementff
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:294   Missed beacon:0

我需要连接的是dlink,有密码。
我在/etc/conf.d/net中设置了
preferred_aps=( "dlink" )
key_dlink="1980***3"
然后建立net.eth1,rc-update -a
可是启动时候好像没有eth1的启动信息。

用手动命令:
#iwconfig eth1 essid dlink key s:1980***3
提示
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device eth1 ; Operation not supported.

到底无线网络应该怎么搞,有点郁闷了。
发表于 2007-11-6 12:35:39 | 显示全部楼层
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK

You are using WPA wireless network, "wireless-tools" can not deal with WPA, you should turn to wpa_supplicant, and just follow the guideline.

http://www.gentoo.org/doc/en/han ... l?part=4&chap=4
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-6 14:59:06 | 显示全部楼层
完全按照上面的做了一遍,问题依旧...
回复 支持 反对

使用道具 举报

发表于 2007-11-6 18:56:18 | 显示全部楼层
建议使用wpa_supplicant.
方法如下:

#emerge -av wpa_supplicant
#cat /etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=0
fast_reauth=1
network={
       ssid="TP-LINK"
       psk="123456your password"
       pairwise=TKIP
       group=TKIP
       priority=5
}
#cat /etc/conf.d/net

modules=( "wpa_supplicant" )
wpa_supplicant_eth1="-Dwext"
#config_eth1=( "dhcp" )
#dhcp_eth1="nodns nontp nonis"
config_eth1=( "192.168.1.101 netmask 255.255.255.0 brd 192.168.1.255" )
routes_eth1=( "default via 192.168.1.1" )
depend_eth1() {
        need ipw3945d
}
回复 支持 反对

使用道具 举报

发表于 2007-11-6 22:24:06 | 显示全部楼层
th ~ # lsmod
Module                     Size     Used by
wlan_wep                  5888       1
vboxdrv                    34148      0
wlan_scan_sta            10112     1
ath_rate_sample        10368     1
ath_pci                     75552     0
wlan                         155040   5 wlan_wep,wlan_scan_sta,ath_rate_sample,ath_pci
ath_hal                    189136    3 ath_rate_sample,ath_pci
pcmcia                    35988     0
yenta_socket            24844     4
rsrc_nonstatic          11008      1 yenta_socket
pcmcia_core            36368     3 pcmcia,yenta_socket,rsrc_nonstatic

注:确保如上wlan ,ath_hal等模块是否工作。
# lspci
00:00.0 Host bridge: Intel Corporation 82830 830 Chipset Host Bridge (rev 02)
00:01.0 PCI bridge: Intel Corporation 82830 830 Chipset AGP Bridge (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801CA/CAM USB Controller #1 (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 41)
00:1f.0 ISA bridge: Intel Corporation 82801CAM ISA Bridge (LPC) (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801CAM IDE U100 Controller (rev 01)
00:1f.5 Multimedia audio controller: Intel Corporation 82801CA/CAM AC'97 Audio Controller (rev 01)
00:1f.6 Modem: Intel Corporation 82801CA/CAM AC'97 Modem Controller (rev 01)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M6 LY
02:00.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78)
02:01.0 CardBus bridge: Texas Instruments PCI1420 PC card Cardbus Controller
02:01.1 CardBus bridge: Texas Instruments PCI1420 PC card Cardbus Controller
03:00.0 Ethernet controller: Atheros Communications, Inc. AR5005G 802.11abg NIC (rev 01)
07:00.0 USB Controller: NEC Corporation USB (rev 43)
07:00.1 USB Controller: NEC Corporation USB (rev 43)
07:00.2 USB Controller: NEC Corporation USB 2.0 (rev 04)

注:我是TP510G无线网卡,兼容 AR5005G 802.11abg
# emerge  wireless-tools
# cat /etc/conf.d/net
config_eth0=( "192.168.1.52 netmask 255.255.255.0 brd 192.168.1.255" )
routes_eth0=( "default via 192.168.1.1" )

modules=( "iwconfig" )
mode_ath0="managed"
essid_ath0="THLAN"
channel_ath0="6"
key_THLAN="[1] s:88888 key [1] enc open"
config_THLAN=( "dhcp" )
dhcpd_THLAN="-t 5"
routes_THLAN=()
#fallback_route_THLAN=( "default via 192.168.1.1" )


注:本人路由用开放模式(非共享模式),WEP加密,密码88888,频道默认为6,无线路由器SSID为THLAN
iwconfig
eth0      no wireless extensions.

lo        no wireless extensions.

sit0      no wireless extensions.

wifi0     no wireless extensions.

ath0      IEEE 802.11g  ESSID:"THLAN"  Nickname:""
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:14:78:AA:34:38   
          Bit Rate:36 Mb/s   Tx-Power:18 dBm   Sensitivity=1/1  
          Retryff   RTS thrff   Fragment thrff
          Encryption key:3838-3838-38   Security modepen
          Power Managementff
          Link Quality=26/70  Signal level=-69 dBm  Noise level=-95 dBm
          Rx invalid nwid:29005  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


注:将ath0设为开机引导。
回复 支持 反对

使用道具 举报

发表于 2007-11-7 00:44:20 | 显示全部楼层
wpa还是用wpa_supplicant好点,以前我用NetworkManager,很方便,图形化的管理方式,但是最近升级后它能发现网络但是分配不了地址(dhcp),上官网说是要降dhcpcd(大概叫这个)的版本,但是wpa_supplicant就没问题,只不过要敲命令^^
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-7 09:07:15 | 显示全部楼层
用wpa_supplicant配置了一次,还是不能联网。
似乎是密码设置这里有问题。

#wpa_supplicant -Dwext -ieth1 -c/etc/wpa_supplicant/wpa_supplicant.conf

Trying to associate with 00:1b:11:91:20:4e (SSID='dlink' freq=2437 MHz)
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Associated with 00:1b:11:91:20:4e
WPA: Invalid EAPOL-Key MIC when using TPTK - ignoring TPTK
WPA: Could not verify EAPOL-Key MIC - dropping packet
WPA: 4-Way Handshake failed - pre-shared key may be incorrect
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Authentication with 00:00:00:00:00:00 timed out.

用NetworkManager的话,可以显示我这边的无线网络,dlink和TP-LINK,dlink是我要连接的网络,路由器设置成了wpa1.0 TPTK,密码是19800603,在windows下使用完全正常。
可是我在NetworkManager下,它总是输入密码,然后连不上,要求输入密码,密码显示的也是wpa TPTK,哪里出问题了?
/etc/wpa_supplicant/wpa_supplicant.conf
network={
  ssid="dlink"
  #proto=WPA
  #key_mgmt=WPA-PSK
  pairwise=TKIP
  group=TKIP
  psk="19800603"
  priority=5
}
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-7 16:16:12 | 显示全部楼层
再顶一下,看看能不能有解决的方法。
回复 支持 反对

使用道具 举报

发表于 2007-11-7 17:31:29 | 显示全部楼层
内核中的加密部分一定要编译进内核才能在无线驱动中使用,编译成模块会出错
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-7 21:51:15 | 显示全部楼层
X99 ~ # /etc/init.d/net.eth1 start
* Caching service dependencies ...                                       [ ok ]
* Starting eth1
*   Wireless radio has been killed for interface eth1
*   wpa_supplicant will launch, but not associate until
*   wireles radio is re-enabled for interface eth1
*   Starting wpa_supplicant on eth1 ...
ioctl[SIOCSIWMODE]: Resource temporarily unavailable
Could not configure driver to use managed mode
ioctl[SIOCGIWRANGE]: Resource temporarily unavailable
ioctl[SIOCSIWAUTH]: Resource temporarily unavailable

这个:Could not configure driver to use managed mode是不是说驱动不能被配置为managed mode?
按照手册的说法:Note: If you're using the host-ap driver you will need to put the card in Managed mode before it can be used with wpa_supplicant correctly. You can use iwconfig_eth0="mode managed" to achieve this in /etc/conf.d/net.
是不是要在net文件中加入iwconfig_eth0="mode managed"?
可是我加入以后,提示

/etc/init.d/net.eth1 start
* Starting eth1
Error for wireless request "Set Mode" (8B06) :
    SET failed on device eth1 ; Resource temporarily unavailable.
*   eth1 does not support the following configuration commands
*     mode managed
*   Wireless radio has been killed for interface eth1
*   wpa_supplicant will launch, but not associate until
*   wireles radio is re-enabled for interface eth1
*   Starting wpa_supplicant on eth1 ...
ioctl[SIOCSIWMODE]: Resource temporarily unavailable
Could not configure driver to use managed mode
ioctl[SIOCGIWRANGE]: Resource temporarily unavailable
ioctl[SIOCSIWAUTH]: Resource temporarily unavailable
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表