免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1760 | 回复: 0
打印 上一主题 下一主题

Debian下驱动bcm43xx无线网卡 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-10-06 00:52 |只看该作者 |倒序浏览

                                偶的本本是Hp 6515b,自带broadcom的无线网卡,使用lspci检查可得到如下结果。
blueice2:/# lspci  -s  30:00.0
30:00.0 Network controller: Broadcom Corporation Dell Wireless 1390 WLAN Mini-PCI Card (rev 02)
blueice2:/# lspci -n -s  30:00.0
30:00.0 0280: 14e4:4311 (rev 02)
我使用ndiswrapper的方式驱动这块网卡。
首先需要安装ndiswrapper,在debian sid中, ndiswrapper包括3个软件包ndiswrapper-common,
ndiswrapper-source,ndiswrapper-utils-1.9,其中ndiswrapper-source是ndiswrapper内核模块的源代码,可以使用module-assistant安装。

module-assistant会根据当前内核的情况生成并安装kernel module软件包, 同时将根据包依赖关系安装ndiswrapper-common,ndiswrapper-utils-1.9两个软件包。 在我的系统中,安装了如下软件包:
blueice2:~# dpkg -l |grep ndis
ii  ndiswrapper-common                                      1.47-2                     Common scripts required to use the utilities
ii  ndiswrapper-modules-2.6.22-2-k7                         1.47-2+2.6.22-4            ndiswrapper Linux kernel module
ii  ndiswrapper-source                                      1.47-2                     Source for the ndiswrapper Linux kernel modu
ii  ndiswrapper-utils-1.9                                   1.47-2                     Userspace utilities for the ndiswrapper Linu
由于kernel中除ndiswrapper外还有一个模块bcm43xx可用来驱动bcm4300系列无线网卡,需要在/etc/modprobe.d/blacklist中增加一行“blacklist bcm43xx”来阻止bcm43xx在启动时被载入,并在/etc/modules中增加行"ndiswrapper"设置系统启动时载入ndiswrapper。重启系统使设置生效。

这里
下载bcm43xx在windows下的驱动,在windows下运行或使用wine运行,生成解压后的目录SP34152A, 这个目录下有个文件bcmwl5.inf。
运行ndiswrapper -i //bcmwl5.inf安装驱动,然后运行ndiswrapper -l查看已安装的驱动,结果如下
blueice2:~# ndiswrapper -l
bcmwl5 : driver installed
        device (14E4:4311) present (alternate driver: bcm43xx)
此时可使用ifconfig -a查到wlan0网络接口,并可使用iwconfig配置该接口.
blueice2:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:1A:4B:61:08:E8
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:20
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:58 errors:0 dropped:0 overruns:0 frame:0
          TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4020 (3.9 KiB)  TX bytes:4020 (3.9 KiB)
wlan0     Link encap:Ethernet  HWaddr 00:1A:73:81:CC:EC
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:21 Memory:c8000000-c8004000
blueice2:~# iwconfig
lo        no wireless extensions.
eth0      no wireless extensions.
wlan0     IEEE 802.11g  ESSID:off/any
          Mode:Managed  Frequency:2.462 GHz  Access Point: Not-Associated
          Bit Rate:54 Mb/s   Tx-Power:32 dBm
          RTS thr:2347 B   Fragment thr:2346 B
          Encryption key:off
          Power Management:off
          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:0   Missed beacon:0
blueice2:~# iwconfig wlan0 key s:1111222233444 [2]
blueice2:~# iwconfig wlan0 key open [2]
blueice2:~# iwconfig
lo        no wireless extensions.
eth0      no wireless extensions.
wlan0     IEEE 802.11g  ESSID:"beijin"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 08:00:2D:13:F4:6A
          Bit Rate=54 Mb/s   Tx-Power:32 dBm
          RTS thr:2347 B   Fragment thr:2346 B
          Encryption key:3039-3657-3235-3433-3223-6154-63 [2]   Security mode:open
          Power Management:off
          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:0   Missed beacon:0
blueice2:~# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:58 errors:0 dropped:0 overruns:0 frame:0
          TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4020 (3.9 KiB)  TX bytes:4020 (3.9 KiB)
blueice2:~# ifconfig wlan0 up
blueice2:~# dhclient wlan0
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/wlan0/00:1a:73:83:cd:ea
Sending on   LPF/wlan0/00:1a:73:83:cd:ea
Sending on   Socket/fallback
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.1
bound to 192.168.0.10 -- renewal in 39594 seconds.
blueice2:~# ping www.chinaunix.net -c 2
PING www.chinaunix.net.fastcdn.com (60.28.166.84) 56(84) bytes of data.
64 bytes from 60.28.166.84: icmp_seq=1 ttl=54 time=34.2 ms
64 bytes from 60.28.166.84: icmp_seq=2 ttl=54 time=33.7 ms
--- www.chinaunix.net.fastcdn.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 5335ms
rtt min/avg/max/mdev = 33.763/33.995/34.227/0.232 ms
在我的环境中只许需要配置好密钥和密钥序号,驱动程序就能够找到essid,无须收工设置。
在设置密钥时要特别注意安全模式, ndiswrapper默认的安全模式是“restricted”,而我的环境中无线路由器的模式安全模式为“open”,为这个问题折腾了一天的时间。
使用ndiswrapper也可以用于别的无线网卡,我还测试了一块tp-link TL-WN321G的usb 无线网卡, 工作正常。
后记:
在使用的过程中发现一个小bug:如果在windows中按“蓝色的无线网络按钮”将无线网卡移出后, 进入Linux, 无论怎么按“蓝色的无线网络按钮”都无法启用无线网络。不过删除/etc/modprobe.d/blacklist中的“blacklist bcm43xx”行, 并运行update-initramfs -u更新initrd,img文件后“蓝色的无线网络按钮”就可以启动无线网络了。
               
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/7667/showart_395332.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP