树莓派 WIFI 多连接热点 设置

修改   /etc/network/interface 文件:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
#    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
post-down killall -q wpa_supplicant

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    


修改  /etc/wpa_supplicant/wpa_supplicant.conf   文件:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=CN

network={
    ssid="basic"
    psk="xxxx"
}

network={
    ssid="Tenda_4DE678"
    psk="xxxx"
}

sudo ifdown wlan0  #关闭wlan0 
sudo ifup wlan0  #启用wlan0 

 

posted @ 2016-12-05 10:39  青松梧桐  阅读(3176)  评论(0编辑  收藏  举报