How to configure wpa_supplicant.conf to get wifi work?

Hi,

I’m using BeagleBone Black with Wifi dongle plugged-in (TL-WN722N), and trying to configure BeagleBone black to get wifi work with my office’s wifi network. In general, username and password are necessary for my phone, but it’s more complicated to configure BeagleBone black. I did following:

(1) configure /etc/network/interfaces:

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

(2) configure /etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
network={
ssid=“officewave”
proto=WPA2
pairwise=CCMP
group=CCMP
key_mgmt=WPA-EAP
eap=PEAP
identity=“myemailaddress”
password=“12345678”
}

And after that, I reboot and run the following command:
wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -f /var/log/wpa_supplicant.log

And got the error below:
wlan0: failed to initiate ap scan

I’m a beginner. Could anyone please tell me how to do with this issue, or any suggestions?

Thanks a lot.

If your using Jessie, just use connmanctl:

##connman: WiFi