[Raspberry Pi] Raspberry Pi 3 Wifi設定

  • 2989
  • 0
  • 2018-05-01

Raspberry Pi 3 Wifi設定

專題筆記--

1.安裝wpa client

sudo apt-get install wireless-tools wpasupplicant

2.掃描無線網路

sudo iwlist wlan0 scan

3.記錄ESSID名稱

 

 

4.將無線網路新增至 /etc/network/interfaces

sudo nano /etc/network/interfaces

5. /etc/network/interfaces 修改為

 

 

 

           ....一.....
           
....些.....

           ....註.....

           ....解.....

source-directory /etc/network/interface.d 
auto loiface lo inet loopback 
auto eth0iface eth0 inet dhcp 
auto wlan0allow-hotplug wlan0iface wlan0 inet dhcp wpa-ssid WIFI_NAME wpa-psk WIFI_PASSWORD

Ctrl+X儲存離開

 

6.重新啟動wlan0

sudo ifdown wlan0

message:

               ifdown: interface wlan0 not configured

 

sudo ifup wlan0

message:

               Internet Systems Consortium DHCP Client 4.3.1

               Copyright 2004-2014 Internet Systems Consortium.

               All rights reserved. 

               For info, please visit https://www.isc.org/software/dhcp/ 

               Listening on LPF/wlan0/.....

               Sending on LPF/wlan0/....... 

               Sending on Socket/fallback 

               DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7 

               DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8 

               DHCPREQUEST on wlan0 to 255.255.255.255 port 67 

               DHCPOFFER from 192.168.0.1 

               DHCPACK from 192.168.0.1

               bound to ...... -- renewal in 3561 seconds.

 

在各個網站查完資料後整理的資訊,若有侵權,請告知謝謝!