Debian无线网卡配置(wireless tools) |
您所在的位置:网站首页 › debian配置无线网络 › Debian无线网卡配置(wireless tools) |
当前linux内核自带的无线网卡驱动不多,主要是笔记本电脑使用的 ”Intersil Prism“芯片(著名的“ Intel Pro/Wireless 2100”)。另外还有”Atheros”芯片似乎是比较多linuxer使用。那么国内接PCI插槽的网卡,有哪些是可以被我使用的呢?搜索后发现,TP-LINK的无线网卡,我发现它是使用Atheros芯片,这样的话,就可以使用 http://madwifi.org 站点上的驱动程序(madwifi是一个开源项目,专门用于Atheros芯片无线局域网网卡的Linux驱动程序)。 TP-LINK的TP-WN550G, 54M速率,支持IEEE 802.11 b/g协议. 另外列一下madwifi可用的tp-link无线网卡型号: TL-WN551G,TL-WN650G(150-180元左右),TL-WN651G 开始安装 安装硬件就不用说了,操作系统还是在debian下,因为debian实在是太方便了: 1、grep CONFIG_NET_RADIO /boot/config-`uname -r`看内核是否支持无线。 CONFIG_NET_RADIO=y2、lspci看是否找到硬件,没有lspci命令的话需安装pciutils包。 3、安装madwifi相关的包: aptitude search madwifi i madwifi-doc - documentation for the Multiband Atheros Driver for WiFi i madwifi-source - source for the Multiband Atheros Driver for WiFi i madwifi-tools - tools for the Multiband Atheros Driver for WiFi将三个包都安装了。其中madwifi-source包安装后会在/usr/src/目录中产生madwifi.tar.bz2文件,解压后的目 录名为"modules", cd /usr/src/modules/madwifi make make install后完成modwifi的安装。 debian的话,先安装linux-header: aptitude install linux-headers-2.6.18-3-686否则可能会出现下面的错误: /bin/sh: line 0: cd: /lib/modules/2.6.18-3-686/build: no such file or dir Makefile.inc:69: *** /lib/modules/2.6.18-3-686/build is missing, please set KERNELPATH. stop.之后重启系统或者用modprobe ath_pci来加载模块。 如果成功,则使用"ifconfig"会看到新的网卡,网卡名是“ath0”。 安装软件 aptitude install wireless-tools这个package包括iwconfig、iwlist等有用的工具。 我的ap使用的加密协议是比较简单的WPA-PSK,该协议xsupplicant不能使用,所以改为使用wpasupplicant 来进行配置。 aptitude install wpasupplicant使用 iwlist ath0 scanning命令可以查看当前能找到的接入点。 WPA配置 使用wpa_passphrase命令产生PSK:用法:wpa_passphrase [passphrase]比如:wpa_passphrase my_ssid abcd1234 network={ ssid="my_ssid" #psk="abce1234" psk=xxxxxxxxxxxxxxxxxxxxx}完整的配置文件/etc/wpa_supplicant.conf: ctrl_interface=/var/run/wpa_supplicantctrl_interface_group=0ap_scan=1network={ ssid="my_ssid" pairwise=CCMP TKIP group=CCMP TKIP WEP104 WEP40 proto=WPA key_mgmt=WPA-PSK priority=5 psk=xxxxxxxxxxxxxxxxxxxx}手工启动: wpa_supplicant -D madwifi -i ath0 -c /etc/wpa_supplicant.conf使用命令 iwconfig ath0可以查看,Access Poin是否连接成功了。如果是使用dncp的话,使用dhclient ath0来自动获取IP,如果使用静态的IP的话,直接使用ifconfig配置IP。 不过,有时候有些AP和无线网卡芯片不太兼容的话,有可能用不了WPA协议进行连接。比如我的笔记本就是这样,所以也可以使用WEP协议进行连接,安全性方面,我想使用128位的加密以及隐藏接入点,应该是没太大的问题的。 使用WEP协议的话,除了在AP上面要配置好之外,在debian上面只需要使用“iwconfig”命令,就可以进行实现连接,也可以写成一个启动脚本,在开机的时候自动进行链接。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |