目录

Raspberry PI B+ debian + wifi 网络设置

目录
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# file /etc/network/interfaces
auto lo
iface lo inet loopback

#auto eth0
#allow-hotplug eth0
#iface eth0 inet manual

auto wlan0
allow-hotplug wlan0

# 动态自动分配 IP
#iface wlan0 inet dhcp
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

# 静态 IP 地址
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet static
address 192.168.1.151
netmask 255.255.255.0
gateway 192.168.1.1
network 192.168.1.1
1
2
3
4
5
6
7
8
9
# file /etc/wpa_supplicant/wpa_supplicant.conf
network={
        ssid="ChinaNet-***" # 接入点名称
        scan_ssid=1 # 如果无线接入点是隐藏的,加上
        key_mgmt=WPA-PSK # 认证密钥管理协议
        psk="password" # wifi密码
        proto=RSN  # WPA2 加密方式
}
~

官方参考文档