login|Register
Forum > Beginners
Post|
看36218|回1|Favorite
Snake 看全部
2016-12-9 05:53:02
Hello, I have an Orange Pi Zero with raspbian installed and I'm trying to setup the wifi connection but I got stuck.

I managed to create wpa_supplicant.conf with my SSID and PSK but when I try to connect typing "wpa_supplicant -D nl80211 -i wlan0 -c wpa_supplicant.conf" or "wpa_supplicant -D wext -i wlan0 -c wpa_supplicant.conf" it always get stuck.
My psk has special characters, so I generated wpa_supplicant.conf with this command: wpa_passphrase MySSID < ~/MyPSK.txt > /etc/wpa_supplicant.conf

Can someone help me?
m12lrpv 看全部
2017-2-26 19:15:52
I was having no success setting up the wifi until I hit this thread (http://raspberrypi.stackexchange.com/questions/11631/how-to-setup-multiple-wifi-networks/11738#11738)
Here's my working config...

the critical component was pairing up id_str="mywifi" with iface mywifi inet dhcp. Until I did that it would connect but wouldn't obtain an ip address.

/etc/wpa_supplicant/wpa_supplicant.conf

code:


  1. network={
  2.    ssid="myssid"
  3.    scan_ssid=1
  4.    mode=0
  5.    proto=WPA2
  6.    auth_alg=OPEN
  7.    pairwise=CCMP
  8.    group=CCMP
  9.    key_mgmt=WPA-PSK
  10.    psk="mypassword"
  11.    id_str="mywifi"
  12.    priority=1
  13. }


/etc/network/interfaces

code:


  1. # Local loopback
  2. auto lo
  3. iface lo inet loopback

  4. allow-hotplug wlan0
  5. iface wlan0 inet manual
  6.   wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
  7. iface mywifi inet dhcp

  8. allow-hotplug eth0
  9. iface eth0 inet static
  10. address 192.168.1.14
  11. netmask 255.255.255.0
  12. gateway 192.168.1.1
  13. dns-nameservers 192.168.1.1

OrangePi En

Powered by Discuz! X3.4

homepage|Simple edition|Touch edition|PC