you can try to use "wpa_passphrase" command , that generate the network profile for you Acces Point, copy into wpa_supplicant.conf and reboot the device. works for me, when a trie to connect a AP with WPA encryption .
ej:
wpa_passphrase AP_id password :
that generate -->
network={
ssid="AP_id"
#psk="password"
psk=993142399374b6d582da81a6d4887ef7a9283a0e00dd4678681aac5e0a2478e9
}
copy into wpa_supplicant.conf.