如何利用小游戏开发框架提升企业小程序的用户体验与运营效率
1009
2022-09-25
FreeBSD 7.1 Release下使用 Intel 4965AGN Intel Wireless WiFi Link 4965AGN的方法[原创分享]
发到CU上的文章地址
参考网址
... ware&id=2730092
介绍iwn使用的文章
trying iwn driver from
... ot/user/benjsc/iwn/
... /iwn&HIDEDEL=NO
iwn代码所在地
... twork-wireless.html
[/url] 官方手册无线网络部分
2. 代码-
首先通过P4fetch.rb-这个ruby脚本
在运行过程中出现找不到 hpricot 模块
[Copy to clipboard]
[ - ]
CODE:[axlrose@mybsd iwn] $ pkgsearch hpricot
/usr/ports/to clipboard]
[ - ]
CODE:function pkg-get() {
#因为习惯于普通用户模式下操作,所以比较常用sudo命令来操作
sudo sh -c "PKGDIR=/usr/mypkgs/ PACKAGEROOT=ftp://ftp2.jp.freebsd.org pkg_add -rvK $@"
}
[Copy to clipboard]
[ - ]
CODE:pkg-get rubygem-hpricot -并保存到 /usr/mypkgs目录
使用正宗方式 pkg_add -r rubygem-hpricot
[Copy to clipboard]
[ - ]
CODE:./P4fetch.rb --depot //depot/user/benjsc/ --repo iwn
3. 代码编译
[Copy to clipboard]
[ - ]
CODE:# cd iwn/iwn
# cd sys/modules/iwnfw
# make
# make install
cd sys/modules/iwn
make
mkae install
4. 安装后的加载与配置
[Copy to clipboard]
[ - ]
CODE:/boot/loader.conf
legal.intel_iwn.license_ack=1
kenv legal.intel_iwn.license_ack=1
kldload if_iwn
安装后的测试
[Copy to clipboard]
[ - ]
CODE:[axlrose@mybsd ~] $ pciconf -lv|grep 4965AGN
device = 'Intel 4965AGN Intel Wireless WiFi Link 4965AGN'
[axlrose@mybsd ~] $ sudo dmesg |grep iwn|head -n 10
iwn0: error, INTR=82000000
iwn0: iwn_config: could not set power mode, error 35
iwn0: link state changed to UP
iwn0: link state changed to DOWN
iwn0: device timeout
iwn0: link state changed to UP
arp: 192.168.1.1 is on em0 but got reply from 00:1c:10:55:0a:c9 on iwn0
arp: 192.168.1.1 is on em0 but got reply from 00:1c:10:55:0a:c9 on iwn0
arp: 192.168.1.1 is on em0 but got reply from 00:1c:10:55:0a:c9 on iwn0
arp: 192.168.1.1 is on em0 but got reply from 00:1c:10:55:0a:c9 on iwn0
[axlrose@mybsd ~] $ sudo ifconfig
em0: flags=8802
options=19b
ether 00:1e:37:d0:d9:5d
inet 192.168.2.10 netmask 0xffffff00 broadcast 192.168.2.255
media: Ethernet autoselect
status: no carrier
iwn0: flags=8843
ether 00:1f:3b:94:50:a9
inet 192.168.1.3 netmask 0xffffff00 broadcast 192.168.1.255
inet 192.168.1.8 netmask 0xffffff00 broadcast 192.168.1.255
media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/54Mbps)
status: associated
ssid home channel 6 (2437 Mhz 11g) bssid 00:1c:10:55:0a:cb
authmode WPA2/802.11i privacy ON deftxkey UNDEF TKIP 3:128-bit
txpower 50 bmiss 10 scanvalid 60 protmode CTS roaming MANUAL
lo0: flags=8049
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
--------------------------------
以下是我的/boot/loader.conf 与无线相关的模块加载配置
[Copy to clipboard]
[ - ]
CODE:if_iwn_load="YES"
legal.intel_iwn.license_ack=1
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"
--------------------------------
5. 使用 wpa_supplicant 的配置方法
以下是我的连接无线网络的脚本, 是跟据以前linux下的脚本修改的,目前路由那块还在改进,以下方法有问题
[Copy to clipboard]
[ - ]
CODE:$ cat connet_home.sh
#!/usr/local/bin/bash
#!/bin/bash
#===============================================================================
WLAN_DEV="iwn0"
LAN_DEV=em0
IP=192.168.1.8
GW=192.168.1.1
ROUTE=192.168.1.1
BASE_DIR="."
CFG_FILE=wpa_supplicant_home_cfg.conf
#${BASE_DIR}/del_eth0_route.sh
sudo ifconfig $LAN_DEV down
#sudo ip r d default dev eth0
sudo route del default
sudo route del 192.168.1.0/24
sudo route flush
sudo ifconfig ${WALN_DEV} down
sudo ifconfig ${WALN_DEV} up
if [ `pidof wpa_supplicant|wc -w` -eq 0 ] ; then
echo "wpa no running"
else
sudo killall -9 wpa_supplicant
fi
sudo wpa_supplicant -dd -i ${WLAN_DEV} -c ${BASE_DIR}/$CFG_FILE -B
sleep 3
#sudo ifconfig wlan0 192.168.1.8
#sudo dhclient $WLAN_DEV
sudo ifconfig $WLAN_DEV $IP
#sudo ifconfig $WLAN_DEV:1 192.168.1.9
#sudo ip r a default via $GW dev $WLAN_DEV
sudo ifconfig $LAN_DEV 192.168.2.2 # <<<< 故意改的ip为另一个网段的地址
sudo route add default $ROUTE
####修改路由还不熟,以前使用的是linux下的iproute2比较方便,现在不会指定设备来添加路由
-----------------------------------------------
以下是配置文件
[Copy to clipboard]
[ - ]
CODE:[axlrose@mybsd iwn] $ cat wpa_supplicant_home_cfg.conf
# This is a network block that connects to any unsecured access point.
# We give it a low priority so any defined blocks are preferred.
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1
eapol_version=1
#ap_scan=1
fast_reauth=1
network={
ssid="home" <<<---- ssid
#psk="密码明码"
psk=b5971ceb09ef6ca002accbfbe9b6742f8716677d2479bc0c8affef5d0b10fdb0 ##加密后的密码数据
}
[Copy to clipboard]
[ - ]
CODE:[axlrose@mybsd iwn] $ uname -a
FreeBSD mybsd.mybsd.org 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan 1 14:37:25 UTC 2009 [email]root@logan.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC i386
最后附上两张FreeBSD桌面截图
的,没多大区别
http://paste.ubuntu.org-/i13157
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~