{"id":62,"date":"2016-05-11T12:22:50","date_gmt":"2016-05-11T04:22:50","guid":{"rendered":"http:\/\/www.lnzdl.com\/blog\/?p=62"},"modified":"2016-05-11T21:59:56","modified_gmt":"2016-05-11T13:59:56","slug":"%e6%a0%91%e8%8e%93%e6%b4%be-raspberry-pi-%e8%ae%be%e7%bd%ae%e6%97%a0%e7%ba%bf%e4%b8%8a%e7%bd%91","status":"publish","type":"post","link":"http:\/\/www.lnzdl.com\/blog\/%e6%a0%91%e8%8e%93%e6%b4%be-raspberry-pi-%e8%ae%be%e7%bd%ae%e6%97%a0%e7%ba%bf%e4%b8%8a%e7%bd%91\/","title":{"rendered":"\u6811\u8393\u6d3e Raspberry Pi \u8bbe\u7f6e\u65e0\u7ebf\u4e0a\u7f51"},"content":{"rendered":"<h3>\u4e00\u3001\u67e5\u770b\u7f51\u5361\u72b6\u6001\u662f\u5426\u6b63\u5e38<\/h3>\n<p>\u628a\u65e0\u7ebf\u7f51\u5361\u63d2\u5230\u6811\u8393\u6d3e\u4e0a\uff0c\u8f93\u5165\u547d\u4ee4ifconfig -a\u67e5\u770b\u662f\u5426\u6709wlan0\u7684\u4fe1\u606f\uff0c\u5982\u679c\u6709\u8bf4\u660e\u7f51\u5361\u72b6\u6001\u6b63\u5e38\uff0c\u53ef\u4ee5\u8df3\u8fc7\u7b2c\u4e8c\u6b65\uff0c\u76f4\u63a5\u914d\u7f6e\u65e0\u7ebf\u7f51\u7edc\u3002\u5982\u679c\u67e5\u4e0d\u5230wlan0\u7684\u4fe1\u606f\uff0c\u5219\u9700\u8981\u5b89\u88c5\u65e0\u7ebf\u7f51\u5361\u7684\u9a71\u52a8\u3002<br \/>\u4e8c\u3001\u67e5\u770b\u65e0\u7ebf\u7f51\u5361\u7684\u4fe1\u606f<br \/>\u8f93\u5165\u547d\u4ee4dmesg | grep usb\u67e5\u770b\u65e0\u7ebf\u7f51\u5361\u7684\u4fe1\u606f\uff0c\u4e3b\u8981\u662f\u770b\u5236\u9020\u5382\u5bb6\uff08Manufacturer\uff09\u3002\u6bd4\u5982\uff0c\u6211\u7684\u7f51\u5361\u4fe1\u606f\u662f<br \/>usb 1-1.3: Manufacturer: Realtek<br \/>\u4ee5Realtek\u4e3a\u4f8b\uff0c\u5b89\u88c5\u65e0\u7ebf\u7f51\u5361\u9a71\u52a8\u3002<br \/>\u5982\u679c\u73b0\u5728\u4f60\u7684\u6811\u8393\u6d3e\u80fd\u8054\u7f51\uff0c\u8f93\u5165\u5b89\u88c5\u547d\u4ee4\u5c31\u53ef\u4ee5\u5b89\u88c5Realtek\u7684\u9a71\u52a8\u4e86\u3002<br \/>\u9996\u5148\u641c\u7d22Realtek\u9a71\u52a8\uff1a<br \/>apt-cache search realtek<br \/>\u770b\u5230\u4e0b\u9762\u4fe1\u606f\uff1a<br \/>firmware-realtek &#8211; Binary firmware for Realtek wired and wireless network adapters<br \/>\u5b89\u88c5Realtek\u9a71\u52a8\uff1a<br \/>sudo apt-get install firmware-realtek<br \/>\u5982\u679c\u4f60\u7684\u6811\u8393\u6d3e\u73b0\u5728\u4e0d\u80fd\u4e0a\u7f51\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u53bb\u955c\u50cf\u7ad9\u70b9\u4e2d\u4e0b\u8f7d\u76f8\u5173\u9a71\u52a8\u3002\u6211\u63a8\u8350\u963f\u91cc\u4e91\u7684\u955c\u50cf\u7ad9\u70b9\uff0c\u901f\u5ea6\u6bd4\u8f83\u5feb\u3002<a href=\"http:\/\/mirrors.aliyun.com\/raspbian\/raspbian\/pool\/non-free\/f\/firmware-nonfree\">http:\/\/mirrors.aliyun.com\/raspbian\/raspbian\/pool\/non-free\/f\/firmware-nonfree<\/a><br \/>\u4e0b\u8f7dfirmware-realtek_0.43_all.deb\uff0c\u7528winscp\u4e0a\u4f20\u5230\u6811\u8393\u6d3e\u7684\/tmp\u76ee\u5f55\u4e2d\u3002\u8f93\u5165\u547d\u4ee4\u5b89\u88c5\uff1a<br \/>sudo dpkg -i \/tmp\/firmware-realtek_0.43_all.deb<br \/>\u4e09\u3001\u914d\u7f6e\u65e0\u7ebf\u7f51\u7edc<br \/>\u7528\u7f16\u8f91\u5668nano\u6253\u5f00interfaces\u6587\u4ef6<br \/>sudo nano \/etc\/network\/interfaces<br \/>\u6211\u7684interfaces\u6587\u4ef6\u662f\u8fd9\u6837\u7684\uff1a<br \/>auto lo<br \/>iface lo inet loopback<br \/>iface eth0 inet dhcp<br \/>allow-hotplug wlan0<br \/>iface wlan0 inet manual<br \/>wpa-roam \/etc\/wpa_supplicant\/wpa_supplicant.conf<br \/>iface default inet dhcp<br \/>\u6211\u4eec\u628a\u65e0\u7ebf\u7f51\u5361\u90e8\u5206\u5168\u90e8\u7528#\u6ce8\u91ca\u6389\uff0c\u7136\u540e\u6dfb\u52a0\u81ea\u5df1\u7684\u914d\u7f6e\u4fe1\u606f\uff0c\u6700\u7ec8\u7ed3\u679c\u5982\u4e0b\uff1a<br \/>auto lo<br \/>iface lo inet loopback<br \/>iface eth0 inet dhcp<br \/>auto wlan0<br \/>#allow-hotplug wlan0<br \/>#iface wlan0 inet manual<br \/>iface wlan0 inet dhcp<br \/>wpa-conf \/etc\/wpa.conf<br \/>#wpa-roam \/etc\/wpa_supplicant\/wpa_supplicant.conf<br \/>iface default inet dhcp<br \/>\u4f7f\u7528nano\u7f16\u8f91\u5668\uff0cctrl+o\u4fdd\u5b58\uff0cctrl+x\u9000\u51fa\u3002<br \/>\u7528\u7f16\u8f91\u5668nano\u521b\u5efa \/etc\/wpa.conf \u6587\u4ef6\uff1a<br \/>sudo nano \/etc\/wpa.conf<br \/>\u5982\u679c\u4f60\u7684wifi\u6ca1\u6709\u5bc6\u7801<br \/>network={<br \/>[Tab] ssid=&#8221;\u4f60\u7684\u65e0\u7ebf\u7f51\u7edc\u540d\u79f0\uff08ssid\uff09&#8221;<br \/>[Tab] key_mgmt=NONE<br \/>}<br \/>\u5982\u679c\u4f60\u7684wifi\u4f7f\u7528WEP\u52a0\u5bc6<br \/>network={<br \/>[Tab] ssid=&#8221;\u4f60\u7684\u65e0\u7ebf\u7f51\u7edc\u540d\u79f0\uff08ssid\uff09&#8221;<br \/>[Tab] key_mgmt=NONE<br \/>[Tab] wep_key0=&#8221;\u4f60\u7684wifi\u5bc6\u7801&#8221;<br \/>}<br \/>\u5982\u679c\u4f60\u7684wifi\u4f7f\u7528WPA\/WPA2\u52a0\u5bc6<br \/>network={<br \/>[Tab] ssid=&#8221;\u4f60\u7684\u65e0\u7ebf\u7f51\u7edc\u540d\u79f0\uff08ssid\uff09&#8221;<br \/>[Tab] key_mgmt=WPA-PSK<br \/>[Tab] psk=&#8221;\u4f60\u7684wifi\u5bc6\u7801&#8221;<br \/>}<br \/>\u6ce81\uff1a\u6240\u6709\u7b26\u53f7\u90fd\u662f\u534a\u89d2\u7b26\u53f7\uff08\u82f1\u6587\u72b6\u6001\u4e0b\u7684\u7b26\u53f7\uff09\uff0c\u201c[Tab]\u201d\u8868\u793a\u6309\u4e00\u6b21Tab\u952e<br \/>\u6ce82\uff1a\u5982\u679c\u4f60\u4e0d\u6e05\u695awifi\u7684\u52a0\u5bc6\u6a21\u5f0f\uff0c\u53ef\u4ee5\u5728\u5b89\u5353\u624b\u673a\u4e0a\u7528root explorer\u6253\u5f00 \/data\/misc\/wifi\/wpa\/wpa_supplicant.conf\uff0c\u67e5\u770bwifi\u7684\u4fe1\u606f\u3002<br \/>\u6bd4\u5982\uff0c\u6211\u7684wpa.conf\u6587\u4ef6\u662f\u8fd9\u6837\u7684\uff1a<br \/>network={<br \/>ssid=&#8221;1234&#8243;<br \/>key_mgmt=WPA-PSK<br \/>psk=&#8221;MTIzNA1234&#8243;<br \/>}<br \/>\u6700\u540e\u8f93\u5165\u547d\u4ee4\u542f\u7528\u65e0\u7ebf\u7f51\u5361\uff1a<br \/>sudo ifup wlan0<br \/>\u53ef\u4ee5\u8fde\u65e0\u7ebf\u7f51\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u67e5\u770b\u7f51\u5361\u72b6\u6001\u662f\u5426\u6b63\u5e38 \u628a\u65e0\u7ebf\u7f51\u5361\u63d2\u5230\u6811\u8393\u6d3e\u4e0a\uff0c\u8f93\u5165\u547d\u4ee4ifconfig -a\u67e5\u770b\u662f\u5426\u6709wlan0\u7684\u4fe1\u606f\uff0c\u5982\u679c\u6709\u8bf4\u660e\u7f51\u5361\u72b6\u6001\u6b63\u5e38\uff0c\u53ef\u4ee5\u8df3\u8fc7\u7b2c\u4e8c\u6b65\uff0c\u76f4\u63a5\u914d\u7f6e\u65e0\u7ebf\u7f51\u7edc\u3002\u5982\u679c\u67e5\u4e0d\u5230wlan0\u7684\u4fe1\u606f\uff0c\u5219\u9700\u8981\u5b89\u88c5\u65e0\u7ebf\u7f51\u5361\u7684\u9a71\u52a8\u3002\u4e8c\u3001\u67e5\u770b\u65e0\u7ebf\u7f51\u5361\u7684\u4fe1\u606f\u8f93\u5165\u547d\u4ee4dmesg | grep usb\u67e5\u770b\u65e0\u7ebf\u7f51\u5361\u7684\u4fe1\u606f\uff0c\u4e3b\u8981\u662f\u770b\u5236\u9020\u5382\u5bb6\uff08Manufacturer\uff09\u3002\u6bd4\u5982\uff0c\u6211\u7684\u7f51\u5361\u4fe1\u606f\u662fusb 1-1.3: Manuf [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,8],"tags":[],"_links":{"self":[{"href":"http:\/\/www.lnzdl.com\/blog\/wp-json\/wp\/v2\/posts\/62"}],"collection":[{"href":"http:\/\/www.lnzdl.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.lnzdl.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.lnzdl.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.lnzdl.com\/blog\/wp-json\/wp\/v2\/comments?post=62"}],"version-history":[{"count":1,"href":"http:\/\/www.lnzdl.com\/blog\/wp-json\/wp\/v2\/posts\/62\/revisions"}],"predecessor-version":[{"id":63,"href":"http:\/\/www.lnzdl.com\/blog\/wp-json\/wp\/v2\/posts\/62\/revisions\/63"}],"wp:attachment":[{"href":"http:\/\/www.lnzdl.com\/blog\/wp-json\/wp\/v2\/media?parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.lnzdl.com\/blog\/wp-json\/wp\/v2\/categories?post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.lnzdl.com\/blog\/wp-json\/wp\/v2\/tags?post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}