1

I am trying to use my raspberry pi 3 on the eduroam network. I found quite a few post on how to do this. The first step mentions editing /etc/network/interfaces Mine originally looked like:

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

and I have added the following lines:

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
 pre-up wpa_supplicant -B -Dwext -i wlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
 post-down killall -q wpa_supplicant

Then I added my new network to /etc/wpa_supplicant/wpa_supplicant.conf

network={
  ssid="eduroam"
  priority=1
  proto=RSN
  key_mgmt=WPA-EAP
  pairwise=CCMP
  auth_alg=OPEN
  eap=PEAP
  identity=""
  password=""
  phase1="peaplabel=0"
  phase2="auth=MSCHAPV2"
  }

However I am unable to connect or restart wifi after this modification.

If I run

sudo wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

I get the following error:

Successfully initialized wpa_supplicant
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize control interface 'DIR=/var/run/wpa_supplicant GROUP=netdev'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

nl80211: deinit ifname=wlan0 disabled_11b_rates=0

Is wpa_supplicants not used anymore? What cleanup is required? Is there an easier way to connect to eduroam?

many thanks

Jesse

EDIT:

reading through the link on setting up WIFI it is mentioned:

wpa_supplicant-"$interface".conf in /etc/wpa_supplicant/ e.g. wpa_supplicant-wlan0.conf will only be used by wlan0

so I copied my wpa_supplicant.conf to wpa_supplicant-wlan0.conf and removed my modifications to /etc/network/interfaces and after rebooting am able to automatically connect. This is a much simpler solution.

Jesse RJ
  • 25
  • 1
  • 5
  • In my answer I had suggested to `sudo systemctl disable wpa_supplicant.service`. You asked me: _Does this disable wpa_supplicants completely? or will it still start the service once booting gets to /etc/network/interfaces?_ I have checked that `wpa_supplicant.service` is disabled by default so my answer was wrong in this context. I have deleted it. – Ingo Apr 23 '18 at 05:56

1 Answers1

1

Is wpa_supplicants not used anymore?

It is still used.

What cleanup is required?

There can only be one instance of wpa_supplicant running per wifi interface. First check if there is one:

ps -C wpa_supplicant

If there is anything other than the column headings (PID TTY TIME CMD), take the number from the PID column and:

sudo kill nnnn

Where "nnnn" is the PID number. Then check to see it is gone. If not, try sudo kill -15 nnnn. If it is still running after that, reboot.

However, I do not think there will be much trouble that way; hopefully it isn't running at all. If it is, this is probably because it is being run automatically by the networking service you configured, in which case you will have to disable that.

Once you sort that out:

sudo file /var/run/wpa_supplicant/wlan0

If this says "socket":

sudo rm /var/run/wpa_supplicant/wlan0

That should remove the file.

goldilocks
  • 56,430
  • 17
  • 109
  • 217
  • thank you, killing the wpa_supplicant process, then removing `/var/run/wpa_supplicant/wlan0` does the trick. How do i make this permanent? As in, when I restart I am unable to connect and have to repeat killing the process. I guess there is a startup file somewhere configuring wpa_supplicant before mine – Jesse RJ Apr 13 '18 at 15:30
  • That would be my guess. I don't use the normal networking configuration system so I can't say much about it. – goldilocks Apr 13 '18 at 15:53