<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[[实践OK]Raspberry Pi下安装FreeBSD系统并实现无线网络连接无线网卡，及DNS设置。]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[系统架构与硬件]]></category>
<pubDate>Sat, 20 Feb 2016 13:04:56 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	配置FreeBSD下的Wifi主要参考这两篇文章即可，树莓派下的也大体一样一样的没有什么大的区别：<br/>http://www.111cn.net/sys/freebsd/59534.htm<br/>国外有一个文章在后面有写。<br/>总之，按这样来配置连接上了家里的路由器。<br/><br/>Raspberry Pi Model B+ Run FreeBSD11+Apache+PHP+MySQL+Webmin+Wordpress：<br/>http://www.bigsea.com.cn/archives/1393/<br/><br/>ifconfig -a时没有wlan0，是因为没有配置及没有启动服务：service netif start<br/>root@rpi2:~ # ifconfig wlan0<br/>wlan0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ether 3c:46:d8:8e:7d:dc<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inet6 fe80::3e46:d8ff:fe8e:7ddc%wlan0 prefixlen 64 tentative scopeid 0x3 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;groups: wlan <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ssid HiWiFi_256ECA channel 4 (2427 MHz 11g) bssid d4:ee:07:25:6e:ca<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;country US authmode WPA2/802.11i privacy ON deftxkey UNDEF<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AES-CCM 2:128-bit txpower 0 bmiss 7 scanvalid 60 bgscan<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wme roaming MANUAL<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;media: IEEE 802.11 Wireless Ethernet DS/1Mbps mode 11g<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;status: associated<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nd6 options=29&lt;PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL&gt;<br/><br/>其中“status: associated”表示无线网络已经连接，可以上网冲浪了。<br/>固定你的 resolv.conf<br/>如果你用DHCP，有一个问题可能会不断地搔扰你，就是/etc/resolv.conf里所记录的 DNS 会时不时地被修改。当然除了暴力地<br/> 代码如下&nbsp;&nbsp;复制代码<br/>#chflags schg /etc/resolv.conf<br/> <br/>让它不能被修改外，还可以很简单地解决此问题，就是往/etc/dhclient.conf里添加<br/> 代码如下&nbsp;&nbsp;复制代码<br/> <br/>prepend domain-name-servers 8.8.8.8, 8.8.4.4;<br/># See ``man 5 dhclient.conf&#039;&#039; for details.<br/>修改成自己的：<br/>prepend domain-name-servers 114.114.114.114, 123.125.81.6;<br/># See ``man 5 dhclient.conf&#039;&#039; for details.<br/>详细配置WIFI可查看FreeBSD官方文档。<br/><br/>=========================================================================<br/>USB硬件信息：<br/>root@rpi2:~ # dmesg &#124; grep urtwn0<br/>urtwn0: &lt;Realtek 802.11n NIC, class 0/0, rev 2.00/0.00, addr 4&gt; on usbus0<br/>urtwn0: MAC/BB RTL8188EU, RF 6052 1T1R<br/>urtwn0: at uhub1, port 3, addr 4 (disconnected)<br/>urtwn0: &lt;Realtek 802.11n NIC, class 0/0, rev 2.00/0.00, addr 4&gt; on usbus0<br/>urtwn0: MAC/BB RTL8188EU, RF 6052 1T1R<br/><br/>root@rpi2:~ # cat /var/log/messages &#124; grep urtwn0<br/>Feb 17 11:19:16 rpi2 kernel: urtwn0: &lt;Realtek 802.11n NIC, class 0/0, rev 2.00/0.00, addr 4&gt; on usbus0<br/>Feb 17 11:19:16 rpi2 kernel: urtwn0: MAC/BB RTL8188EU, RF 6052 1T1R<br/>Feb 17 11:39:37 rpi2 kernel: urtwn0: &lt;Realtek 802.11n NIC, class 0/0, rev 2.00/0.00, addr 4&gt; on usbus0<br/>Feb 17 11:39:37 rpi2 kernel: urtwn0: MAC/BB RTL8188EU, RF 6052 1T1R<br/>Feb 17 14:15:35 rpi2 kernel: urtwn0: at uhub1, port 3, addr 4 (disconnected)<br/>Feb 17 14:20:14 rpi2 kernel: urtwn0: &lt;Realtek 802.11n NIC, class 0/0, rev 2.00/0.00, addr 4&gt; on usbus0<br/>Feb 17 14:20:14 rpi2 kernel: urtwn0: MAC/BB RTL8188EU, RF 6052 1T1R<br/><br/>启动时信息提示：<br/>root@rpi2:~ # ifconfig wlan create wlandev urtwn0<br/>ieee80211_load_module: load the wlan_amrr module by hand for now.<br/>wlan0: Ethernet address: 3c:46:d8:8e:7d:dc<br/>wlan0<br/><br/><br/>拔下无线Wifi的USB时提示：<br/>root@rpi2:~ # ugen0.4: &lt;Realtek&gt; at usbus0 (disconnected)<br/>urtwn0: at uhub1, port 3, addr 4 (disconnected)<br/><br/><br/>查看网络：<br/>root@rpi2:~ # ifconfig wlan0 up scan<br/>wlan0: ieee80211_new_state_locked: pending INIT -&gt; SCAN transition lost<br/>SSID/MESH ID&nbsp;&nbsp;&nbsp;&nbsp;BSSID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CHAN RATE&nbsp;&nbsp;&nbsp;&nbsp;S:N&nbsp;&nbsp;&nbsp;&nbsp; INT CAPS<br/>123456&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b8:55:10:1a:9d:05&nbsp;&nbsp;&nbsp;&nbsp;6&nbsp;&nbsp; 54M&nbsp;&nbsp;-77:-95&nbsp;&nbsp; 100 EP&nbsp;&nbsp; RSN HTCAP WME<br/>ChinaNet-iYDT&nbsp;&nbsp; fc:e3:3c:54:b8:ec&nbsp;&nbsp; 11&nbsp;&nbsp; 54M&nbsp;&nbsp;-93:-95&nbsp;&nbsp;&nbsp;&nbsp;98 EP&nbsp;&nbsp; HTCAP WPS WPA WME<br/>CALT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;40:16:9f:55:33:2c&nbsp;&nbsp;&nbsp;&nbsp;7&nbsp;&nbsp; 54M&nbsp;&nbsp;-90:-95&nbsp;&nbsp; 100 EPS&nbsp;&nbsp;RSN WPA WME HTCAP ATH WPS<br/>ChinaNet-Kjvz&nbsp;&nbsp; 60:b6:17:79:14:b7&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;&nbsp; 54M&nbsp;&nbsp;-89:-95&nbsp;&nbsp; 100 EP&nbsp;&nbsp; HTCAP WPA WME<br/>CU_VGSU&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 88:cf:98:dd:fa:18&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp; 54M&nbsp;&nbsp;-91:-95&nbsp;&nbsp; 100 EP&nbsp;&nbsp; HTCAP RSN WME<br/>HiWiFi_256ECA&nbsp;&nbsp; d4:ee:07:25:6e:ca&nbsp;&nbsp;&nbsp;&nbsp;4&nbsp;&nbsp; 54M&nbsp;&nbsp;-69:-95&nbsp;&nbsp; 100 EP&nbsp;&nbsp; HTCAP WPA RSN WME<br/>jiaweiyi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8c:be:be:2f:ae:5b&nbsp;&nbsp;&nbsp;&nbsp;8&nbsp;&nbsp; 54M&nbsp;&nbsp;-93:-95&nbsp;&nbsp; 100 EP&nbsp;&nbsp; RSN HTCAP WPS WPA WME<br/>ChinaNet-qePR&nbsp;&nbsp; 60:b6:17:78:89:3e&nbsp;&nbsp; 10&nbsp;&nbsp; 54M&nbsp;&nbsp;-79:-95&nbsp;&nbsp; 100 EP&nbsp;&nbsp; HTCAP WPA WME<br/><br/><br/>service netif start&nbsp;&nbsp;&nbsp;&nbsp; # 这个能自动帮你连接无线获取IP地址，当然如果配置正确的话，开机就可以自动连接上无线了。<br/><br/>实践来源：http://jackxiang.com/post/7492/<br/><br/><br/><br/>—————————————————————————————————————————————————————————————<br/>Setting up USB WiFi under FreeBSD is not a very hard task.<br/>We can use official handbook.<br/>But in my opinion it’s too complex.<br/>Here is a simple guide how to configure USB WiFi.<br/>Our goal is to configure WiFi interface to connect and use available wireless network.<br/>I use Miniature WiFi Module from Adafruit.<br/>This is in reality Realtek RTL8188CUS.<br/>elinux.org says this is a problem adapter.<br/>And I had some problems with it under Raspbian.<br/>There was no driver for this adapter in FreeBSD-10.0-RELEASE.<br/>Driver for this adapter appears in stable images in March.<br/>This is good for us, so we don’t need to adding it into kernel.<br/>During boot we can see our adapter:<br/><a href="https://vzaigrin.files.wordpress.com/2014/04/14.jpg" target="_blank"><img src="https://vzaigrin.files.wordpress.com/2014/04/14.jpg" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>After boot we can see it in interfaces list:<br/><a href="http://www.jackxiang.com/file:///E:/Raspberry%20Pi/%E6%A0%91%E8%8E%93%E6%B4%BEFreeBSD%E8%AE%BE%E7%BD%AEWifi%E8%81%94%E7%BD%91/How%20to%20setup%20USB%20WiFi%20on%20Raspberry%20Pi%20with%20FreeBSD%20_%20Vadim%20Zaigrin_files/15.jpg" target="_blank"><img src="http://www.jackxiang.com/file:///E:/Raspberry%20Pi/%E6%A0%91%E8%8E%93%E6%B4%BEFreeBSD%E8%AE%BE%E7%BD%AEWifi%E8%81%94%E7%BD%91/How%20to%20setup%20USB%20WiFi%20on%20Raspberry%20Pi%20with%20FreeBSD%20_%20Vadim%20Zaigrin_files/15.jpg" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>If we try to up this interface we will see some warning and error messages:<br/>urtwn-rtl8192cfwT: You need to read the LICENSE file in /usr/share/doc/legal/realtek/.<br/>urtwn-rtl8192cfwT: If you agree with the license, set legal.realtek.license_ack=1 in /boot/loader.conf.<br/>module_register_init: MOD_LOAD (urtwn-rtl8192cfwT_fw, 0xc2aa24f0, 0) error 1<br/>urtwn-rtl8192cfwT: could not load firmware image, error 8<br/>urtwn0: failed loadfirmware of file urtwn-rtl8192cfwT<br/><a href="http://www.jackxiang.com/file:///E:/Raspberry%20Pi/%E6%A0%91%E8%8E%93%E6%B4%BEFreeBSD%E8%AE%BE%E7%BD%AEWifi%E8%81%94%E7%BD%91/How%20to%20setup%20USB%20WiFi%20on%20Raspberry%20Pi%20with%20FreeBSD%20_%20Vadim%20Zaigrin_files/18.jpg" target="_blank"><img src="http://www.jackxiang.com/file:///E:/Raspberry%20Pi/%E6%A0%91%E8%8E%93%E6%B4%BEFreeBSD%E8%AE%BE%E7%BD%AEWifi%E8%81%94%E7%BD%91/How%20to%20setup%20USB%20WiFi%20on%20Raspberry%20Pi%20with%20FreeBSD%20_%20Vadim%20Zaigrin_files/18.jpg" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>We need to add this two strings to file /boot/loader.conf:<br/>legal.realtek.license_ack=1<br/>if_urtwn_load=&quot;YES&quot;<br/><a href="http://www.jackxiang.com/file:///E:/Raspberry%20Pi/%E6%A0%91%E8%8E%93%E6%B4%BEFreeBSD%E8%AE%BE%E7%BD%AEWifi%E8%81%94%E7%BD%91/How%20to%20setup%20USB%20WiFi%20on%20Raspberry%20Pi%20with%20FreeBSD%20_%20Vadim%20Zaigrin_files/19.jpg" target="_blank"><img src="http://www.jackxiang.com/file:///E:/Raspberry%20Pi/%E6%A0%91%E8%8E%93%E6%B4%BEFreeBSD%E8%AE%BE%E7%BD%AEWifi%E8%81%94%E7%BD%91/How%20to%20setup%20USB%20WiFi%20on%20Raspberry%20Pi%20with%20FreeBSD%20_%20Vadim%20Zaigrin_files/19.jpg" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>After reboot we can continue.<br/>Next step is creating wlan interface:<br/>ifconfig wlan0 create wlandev urtwn0<br/>Then we can to up this wlan interface and scan available wireless networks:<br/>ifconfig wlan0 up scan<br/><a href="http://www.jackxiang.com/file:///E:/Raspberry%20Pi/%E6%A0%91%E8%8E%93%E6%B4%BEFreeBSD%E8%AE%BE%E7%BD%AEWifi%E8%81%94%E7%BD%91/How%20to%20setup%20USB%20WiFi%20on%20Raspberry%20Pi%20with%20FreeBSD%20_%20Vadim%20Zaigrin_files/21.jpg" target="_blank"><img src="http://www.jackxiang.com/file:///E:/Raspberry%20Pi/%E6%A0%91%E8%8E%93%E6%B4%BEFreeBSD%E8%AE%BE%E7%BD%AEWifi%E8%81%94%E7%BD%91/How%20to%20setup%20USB%20WiFi%20on%20Raspberry%20Pi%20with%20FreeBSD%20_%20Vadim%20Zaigrin_files/21.jpg" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>For permanent use WiFi connection we need to add this two strings to file /etc/rc.conf:<br/>wlans_urtwn0=&quot;wlan0&quot;<br/>ifconfig_wlan0=&quot;WPA DHCP&quot;<br/><a href="http://www.jackxiang.com/file:///E:/Raspberry%20Pi/%E6%A0%91%E8%8E%93%E6%B4%BEFreeBSD%E8%AE%BE%E7%BD%AEWifi%E8%81%94%E7%BD%91/How%20to%20setup%20USB%20WiFi%20on%20Raspberry%20Pi%20with%20FreeBSD%20_%20Vadim%20Zaigrin_files/22.jpg" target="_blank"><img src="http://www.jackxiang.com/file:///E:/Raspberry%20Pi/%E6%A0%91%E8%8E%93%E6%B4%BEFreeBSD%E8%AE%BE%E7%BD%AEWifi%E8%81%94%E7%BD%91/How%20to%20setup%20USB%20WiFi%20on%20Raspberry%20Pi%20with%20FreeBSD%20_%20Vadim%20Zaigrin_files/22.jpg" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>And we need to configure authentication in file /etc/wpa_supplicant.conf<br/><a href="http://www.jackxiang.com/file:///E:/Raspberry%20Pi/%E6%A0%91%E8%8E%93%E6%B4%BEFreeBSD%E8%AE%BE%E7%BD%AEWifi%E8%81%94%E7%BD%91/How%20to%20setup%20USB%20WiFi%20on%20Raspberry%20Pi%20with%20FreeBSD%20_%20Vadim%20Zaigrin_files/23.jpg" target="_blank"><img src="http://www.jackxiang.com/file:///E:/Raspberry%20Pi/%E6%A0%91%E8%8E%93%E6%B4%BEFreeBSD%E8%AE%BE%E7%BD%AEWifi%E8%81%94%E7%BD%91/How%20to%20setup%20USB%20WiFi%20on%20Raspberry%20Pi%20with%20FreeBSD%20_%20Vadim%20Zaigrin_files/23.jpg" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>After reboot we can check network connection:<br/><a href="http://www.jackxiang.com/file:///E:/Raspberry%20Pi/%E6%A0%91%E8%8E%93%E6%B4%BEFreeBSD%E8%AE%BE%E7%BD%AEWifi%E8%81%94%E7%BD%91/How%20to%20setup%20USB%20WiFi%20on%20Raspberry%20Pi%20with%20FreeBSD%20_%20Vadim%20Zaigrin_files/25.jpg" target="_blank"><img src="http://www.jackxiang.com/file:///E:/Raspberry%20Pi/%E6%A0%91%E8%8E%93%E6%B4%BEFreeBSD%E8%AE%BE%E7%BD%AEWifi%E8%81%94%E7%BD%91/How%20to%20setup%20USB%20WiFi%20on%20Raspberry%20Pi%20with%20FreeBSD%20_%20Vadim%20Zaigrin_files/25.jpg" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>It works!<br/><br/><br/>
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [实践OK]Raspberry Pi下安装FreeBSD系统并实现无线网络连接无线网卡，及DNS设置。]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>