I have a Raspberry Pi3 Model B. I was using it with wired internet and it worked well. But now, due to a move, I can't use a wired network anymore. I would like to use the university's secure wifi. But that option was grayed out.
I found this thread and tried both solutions (just replacing the ssid, identity and password). Neither of the two solutions worked for me. After trying each, I re-booted my Pi and the Pi wouldn't even connect the open wifi network that it used to connect to, before. It said "No wireless interfaces found". eth0: Link is down and wlan0: Not associated. From here, I tried to do
sudo ifdown wlan0
, but it said unknown interface wlan0.
I ran
grep dhcpcd /var/log/daemon.log/
and here was the error message:
Sep 10 14:49:59 raspberrypi dhcpcd-run-hooks[445]: wlan0: Successfully initialized wpa_supplicant#012Line 6: unknown global field 'network= {'.#012Line 6: Invalid configuration line 'network= {'.#012Line 7: unknown global field 'ssid =""'.#012Line 7: Invalid configuration line 'ssid =""'.#012Line 8: unknown global field 'key_mgmt=WPA-EAP'.#012Line 8: Invalid configuration line 'key_mgmt=WPA-EAP'.#012Line 9: unknown global field 'eap=PEAP'.#012Line 9: Invalid configuration line 'eap=PEAP'.#012Line 10: unknown global field 'identity=""'.#012Line 10: Invalid configuration line 'identity=""'.#012Line 11: unknown global field 'password=""'.#012Line 11: Invalid configuration line 'password=""'.#012Line 12: unknown global field 'phase2="auth=MSCHAPv2"'.#012Line 12: Invalid configuration line 'phase2="auth=MSCHAPv2"'.#012Line 13: unknown global field '}'.#012Line 13: Invalid configuration line '}'.#012Failed to read or parse configuration '/etc/wpa_supplicant/wpa_supplicant.conf'.
I also tried to do sudo raspi-config
and looked at Localisation Options -> Change Wi-fi Country. I got the error message that said it couldn't access the wpa_supplicant file.
Now I deleted the newly added lines, and now it detects the wireless networks on the GUI again. But I still can't connect to the secure network. Any help is greatly appreciated!
EDIT: Here is the file:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid=""
priority=1
proto=RSN
key_mgmt=WPA-EAP
pairwise=CCMP
auth_alg=OPEN
eap=PEAP
identity=""
password=""
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
}
EDIT2: I un-indented the last bracket }, and now it is connected to the wifi but I can't open any website.
EDIT3: Result of ping 8.8.8.8
:
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 169.254.14.127 icmp_seq=1 Destination Host Unreachable
Result of ping google.com
:
ping: google.com: Temporary failure in name resolution
Result of cat /etc/resolv.conf
nameserver 8.8.8.8