最简单的RASPBERRY PI wifi配置

This tutorial works best if your router is broadcasting the SSID. Make sure you have "Broadcast SSID" set up on your router! This may not work with "private" SSID setups

Setting up WiFi in Occidentalis, is also pretty straight forward. You just need to add the name of your wireless network (its SSID) and your password to a configuration file.

 

Step 1.

Boot the Raspberry Pi without the WiFi adapter plugged in.

Step 2.

Open a Terminal session by clicking on the LXTerminal icon, and enter the following command into it:

 

Copy Code
 
  1. sudo nano /etc/network/interfaces
learn_raspberry_pi_occ_1.png
Copy Code
 
  1. auto lo
  2.  
  3. iface lo inet loopback
  4. iface eth0 inet dhcp
  5.  
  6. allow-hotplug wlan0
  7. auto wlan0
  8.  
  9.  
  10. iface wlan0 inet dhcp
  11. wpa-ssid "ssid"
  12. wpa-psk "password"
If you are using a 'hidden' SSID, try the following (hat-tip to http://www.dafinga.net/2013/01/how-to-setup-raspberry-pi-with-hidden.html)

Copy Code
 
  1. auto lo
  2.  
  3. iface lo inet loopback
  4. iface eth0 inet dhcp
  5.  
  6. auto wlan0
  7. allow-hotplug wlan0
  8. iface wlan0 inet dhcp
  9. wpa-scan-ssid 1
  10. wpa-ap-scan 1
  11. wpa-key-mgmt WPA-PSK
  12. wpa-proto RSN WPA
  13. wpa-pairwise CCMP TKIP
  14. wpa-group CCMP TKIP
  15. wpa-ssid "My Secret SSID"
  16. wpa-psk "My SSID PSK"
  17.  
  18. iface default inet dhcp

Step 3.

This opens an editor screen of the wifi configuration file you need to change.

learn_raspberry_pi_occ_2.png

The two places where you need to make a change are on the last two lines. Change the file so that it looks like this:

learn_raspberry_pi_occ_3.png

Of course, you should put in your network and password! Note that you need to keep the double-quote characters around your wireless network name and password.

This kind of editor does not let you use the mouse. Instead, use the cursor keys to move around the file.

 

Step 4.

When you have finished press [ctrl]x. This will ask if you want to save the modified files.

learn_raspberry_pi_occ_4.png

Press 'Y' and then Return to save the file with the same name.

 

Step 5.

Shut down your Raspberry Pi, plug the WiFi adapter in and start it up again. You should find that the Raspberry Pi connects using the WiFi adapter as it boots up.

转载于:https://www.cnblogs.com/rfnets/p/3822255.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值