ifconfig 查看无线网卡名
配置 wlan0:
$vi /etc/network/interfaces
动态获取 IP 配置如下:
#auto lo eth0
#iface lo inet loopback
#iface eth0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
pre-up ip link set wlan0 up
pre-up iwconfig wlan0 essid waveshareNet
深圳市微雪电子有限公司 www.waveshare.net 27
wpa-ssid waveshareNet
wpa-psk 123456
静态获取 IP 配置如下:
#auto lo eth0
#iface lo inet loopback
#iface eth0 inet dhcp
auto wlan0
iface wlan0 inet static
address 192.168.1.121
netmask 255.255.255.0
gateway 192.168.1.1
pre-up ip link set wlan0 up
pre-up iwconfig wlan0 essid waveshareNet
wpa-ssid waveshareNet
wpa-psk 123456
保存后退出。
说明:根据扫描的情况正确配置 ESSID 和 PSK。
6) 重启网络:
$/etc/init.d/networking restart
深圳市微雪电子有限公司 www.waveshare.net 28
7) 网络测试:
$ ping www.baidu.com
配置 wlan0:
$vi /etc/network/interfaces
动态获取 IP 配置如下:
#auto lo eth0
#iface lo inet loopback
#iface eth0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
pre-up ip link set wlan0 up
pre-up iwconfig wlan0 essid waveshareNet
深圳市微雪电子有限公司 www.waveshare.net 27
wpa-ssid waveshareNet
wpa-psk 123456
静态获取 IP 配置如下:
#auto lo eth0
#iface lo inet loopback
#iface eth0 inet dhcp
auto wlan0
iface wlan0 inet static
address 192.168.1.121
netmask 255.255.255.0
gateway 192.168.1.1
pre-up ip link set wlan0 up
pre-up iwconfig wlan0 essid waveshareNet
wpa-ssid waveshareNet
wpa-psk 123456
保存后退出。
说明:根据扫描的情况正确配置 ESSID 和 PSK。
6) 重启网络:
$/etc/init.d/networking restart
深圳市微雪电子有限公司 www.waveshare.net 28
7) 网络测试:
$ ping www.baidu.com