1

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
Kaumz
  • 11
  • 2
  • Possible like the wpa_supplicant.conf is corrupt. Can you show what you have but do not show the password - please put the text in a code block and make sure nothing changes (esp quotes). –  Sep 10 '20 at 23:22
  • Thank you for your response. I have uploaded the file here https://easyupload.io/kcujht – Kaumz Sep 11 '20 at 16:49
  • 1
    Forgive me but I'm not into downloading strange files from unknown links. It's better to edit the question and put the text in there. –  Sep 11 '20 at 20:38
  • The website issue may be due to not having the correct gateway OR the DNS servers. have you manually set the Pi IP address or do you need to log in to the network on each device as part of the security from the Uni? –  Sep 12 '20 at 02:21
  • Can you `ping 8.8.8.8` and `ping google.com`? Please execute the command `cat /etc/resolv.conf` and add its output to the question. – Ingo Sep 12 '20 at 08:55
  • @Andyroo, Thank you. I did not set the IP address manually. As soon as the pi connected to the wifi, it got an IP address. I have to login for each Pi. BUT, once the pi connects to this particular network, it will remain connected. For my laptop for example, every time it restarts, it connects automatically. I'm not sure if this answers your question. – Kaumz Sep 14 '20 at 15:23
  • The 'From 169.254.14.127' shows you are not getting an IP address from the network unless you have a very very odd network. This address form (169.254) is a link local address https://en.wikipedia.org/wiki/Link-local_address and cannot be routed to another network (e.g. Internet) as is the default range when no DHCP address is issued by the network server. –  Sep 14 '20 at 19:44
  • Thank you. So if I ask the network admin to set a permanent IP address for the pi, will it help? – Kaumz Sep 14 '20 at 20:13
  • A static ip address may help or not. It depends on the network error you have. Anyway it will only fix a symptom but do not give a correct solution. Ask for the ip address of the network router resp. gateway and look why you cannot ping it. – Ingo Sep 15 '20 at 11:39

0 Answers0