免费注册 查看新帖 |

Chinaunix

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

Intel® PRO/Wireless for *BSD [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-12-10 14:22 |只看该作者 |倒序浏览
原文地址:http://damien.bergamini.free.fr/ipw/iwi-freebsd.html

Installing firmware binary images
The firmware is a program executed by the adapter itself (not by the host CPU!). The adapter can't do anything before it has received its firmware. For licensing reasons, the firmware images are not shipped with the iwi driver. They are made available in ports and binary packages. The port was created by Florent Thoumie.
# pkg_add http://damien.bergamini.free.fr/iwifw/FreeBSD/iwi-firmware-1.3.tbz-->Ports:
# cd /usr/ports/net/iwi-firmware/
# make install clean
Pre-compiled binary package:
# pkg_add -r iwi-firmware-2.3_1
Configuring the adapter
Firstly, load the if_iwi module:
# kldload -v if_iwi
Then, make sure that your card is correctly recognized:
# dmesg | grep iwi
iwi0:  mem 0xe0206000-0xe0206fff irq 11 at device 4.0 on pci2
iwi0: Ethernet address: xx:xx:xx:xx:xx:xx
Note that the output may vary slightly depending on your system configuration.
Now, you must download the firmware binary image to the adapter.
For instance, to download firmware for BSS mode:
# iwicontrol -i iwi0 -d /usr/local/libdata/if_iwi -m bss
At this point, check that everything is correct:
# ifconfig iwi0
iwi0: flags=8806 mtu 1500
        ether xx:xx:xx:xx:xx:xx
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        ssid ""
        channel -1 authmode OPEN powersavemode OFF powersavesleep 100
        rtsthreshold 2312 protmode CTS txpower 100
        wepmode OFF weptxkey 0
Enabling the radio transmitter
All Centrino® laptops have the ability to enable/disable the radio transmitter via a button or a switch. The radio transmitter is usually off by default. To know if your radio transmitter is enabled or not, use the iwicontrol tool with the -r option:
# sysctl dev.iwi.0.radio
dev.iwi.0.radio: 1
If your adapter radio transmitter is off (=0), use your laptop switch to turn it on and re-run the above command to see if it has some effect. If your radio transmitter is still off, it is likely that your laptop uses a software switch that requires additionnal drivers to work. Unfortunately, not all those laptops are supported at this time. Post a message in the
forum
to indicate your laptop model/brand and we will see if we can do something to make it work.
On some laptops, turning the interface up with ifconfig or dhclient can automatically switch the radio ON.
Associating to an Access Point
If your radio transmitter is on, you can start scanning for an access point:
# ifconfig iwi0 inet 192.168.0.20 netmask 255.255.255.0
Replace 192.168.0.20 and 255.255.255.0 with a valid IP address and netmask on your wired network. Once you have done that, you should be able to ping hosts on the network. If you are experiencing problems with you wireless connection, make sure that you are associated to an access point:
# ifconfig iwi0
should return some information, and you should see:
status: associated
If not, you may be out of range of the access point or have a configuration problem. It may also be the case that your adapter radio transmitter is off.
Advanced configuration
To enable debugging:
# sysctl debug.iwi=10
If you are running FreeBSD 5.4:
# sysctl debug.net80211=10
If you are running FreeBSD 6:
# sysctl net.wlan.debug=-1
# sysctl net.wlan.0.debug=-1
To join a specific BSS network with network name my_net, use ifconfig with the ssid option:
# ifconfig iwi0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net
To join a specific BSS network with 40bits WEP encryption enabled:
# ifconfig iwi0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net \
        wepkey 0x1234567890 weptxkey 1 wepmode on
To join a specific BSS network with 104bits WEP encryption enabled:
# ifconfig iwi0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net \
        wepkey 0x01020304050607080910111213 weptxkey 1 wepmode on
The configuration of the iwi interface through DHCP is the same as for any ethernet adapter. You can use the following command to configure it via DHCP:
# dhclient iwi0
To kill the firmware and reset the adapter:
# iwicontrol -i iwi0 -k
To get adapter internal statistics:
# iwicontrol -i iwi0
Current transmission rate                                   [110]
Fragmentation threshold                                     [0]
RTS threshold                                               [2312]
Number of frames submitted for transfer                     [30257]
Number of frames transmitted                                [30256]
Number of unicast frames transmitted                        [30082]
Number of unicast 802.11b frames transmitted at 1Mb/s       [0]
Number of unicast 802.11b frames transmitted at 2Mb/s       [0]
Number of unicast 802.11b frames transmitted at 5.5Mb/s     [0]
Number of unicast 802.11b frames transmitted at 11Mb/s      [0]
Number of unicast 802.11g frames transmitted at 1Mb/s       [1806]
Number of unicast 802.11g frames transmitted at 2Mb/s       [248]
Number of unicast 802.11g frames transmitted at 5.5Mb/s     [1931]
Number of unicast 802.11g frames transmitted at 6Mb/s       [0]
Number of unicast 802.11g frames transmitted at 9Mb/s       [0]
Number of unicast 802.11g frames transmitted at 11Mb/s      [26097]
Number of unicast 802.11g frames transmitted at 12Mb/s      [0]
Number of unicast 802.11g frames transmitted at 18Mb/s      [0]
Number of unicast 802.11g frames transmitted at 24Mb/s      [0]
Number of unicast 802.11g frames transmitted at 36Mb/s      [0]
Number of unicast 802.11g frames transmitted at 48Mb/s      [0]
Number of unicast 802.11g frames transmitted at 54Mb/s      [0]
Number of multicast frames transmitted                      [3]
Number of multicast 802.11b frames transmitted at 1Mb/s     [0]
Number of multicast 802.11b frames transmitted at 2Mb/s     [0]
Number of multicast 802.11b frames transmitted at 5.5Mb/s   [0]
Number of multicast 802.11b frames transmitted at 11Mb/s    [0]
Number of multicast 802.11g frames transmitted at 1Mb/s     [2]
Number of multicast 802.11g frames transmitted at 2Mb/s     [0]
Number of multicast 802.11g frames transmitted at 5.5Mb/s   [0]
Number of multicast 802.11g frames transmitted at 6Mb/s     [0]
Number of multicast 802.11g frames transmitted at 9Mb/s     [0]
Number of multicast 802.11g frames transmitted at 11Mb/s    [1]
Number of multicast 802.11g frames transmitted at 12Mb/s    [0]
Number of multicast 802.11g frames transmitted at 18Mb/s    [0]
Number of multicast 802.11g frames transmitted at 24Mb/s    [0]
Number of multicast 802.11g frames transmitted at 36Mb/s    [0]
Number of multicast 802.11g frames transmitted at 48Mb/s    [0]
Number of multicast 802.11g frames transmitted at 54Mb/s    [0]
Number of transmission retries                              [2402]
Number of transmission failures                             [171]
Number of frames with a bad CRC received                    [396]
Number of full scans                                        [14]
Number of partial scans                                     [0]
Number of bytes transmitted                                 [2124356]
Current RSSI                                                [84]
Number of beacons received                                  [4519]
Number of beacons missed                                    [0]
WPA (802.11i)
This section is dedicated to users of FreeBSD 6 connecting to a WPA-capable access point. FreeBSD 5 does not support WPA. To know how to activate WPA in your access point, please refer to its documentation.
Now we will see how to setup WPA-PSK (pre-shared key) for your network. This authentication method does not require a radius server. For other authentication methods, refer to wpa_supplicant.conf(5).
First, create a file named /etc/wpa_supplicant.conf:
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
        ssid="my_ssid"
        key_mgmt=WPA-PSK
        psk="my_passphrase"
}
You'll probably need to load the following kernel modules by hand before things work:
# kldload -v wlan_acl wlan_wep wlan_ccmp wlan_tkip
Then, run wpa_supplicant with the following options:
# wpa_supplicant -i iwi0 -c /etc/wpa_supplicant.conf [-d]
The -d option can be used to enable debugging and to help fixing potential issues.


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

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP