2

I have a USB Wi-Pi stick which is supposed to enable my Pi to connect to WiFi. I have opened up 'WiFi Configuration' and when trying to connect, the status will show '4-Way Handshake' for about 10 seconds, then scanning and repeats. The IP address is also missing. The Wi-Pi LED flashes throughout.

Here is the /etc/network/interfaces:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

And the /etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
       ssid="CORRECT SSID"
       psk="CORRECT PASSWORD"
       proto=RSN
       key_mgmt=WPA-PSK
       pairwise=CCMP
       auth_alg=OPEN
}

I have tried looking at many other questions asked here but none have helped. Could it be a problem due to lack of power?

Any help is greatly appreciated and please ask if any other information is required.

Mahclark
  • 21
  • 1
  • 1
    That's weird. If it's reported it is starting that then you would think it should report why it did not complete because some piece of software in the stack does know. You might try [what I describe in the accepted answer here](http://raspberrypi.stackexchange.com/q/37594/5538) to run `wpa_supplicant` in the foreground manually; use the commands in parentheses after "If you are using a wifi adapter..." – goldilocks Jan 03 '16 at 18:13
  • 1
    ...but don't do it in parentheses and *don't use -B with the wpa_supplicant command*. This will keep it in the foreground so you can see what it says. You do have to do the preliminary stuff to disable autoconfiguration, unfortunately, but as explained there it is not hard to do and restore if you pay attention. I have been meaning to write a Q&A about debugging wifi this way for a while now but have not gotten around to it. – goldilocks Jan 03 '16 at 18:14
  • 1
    **Also see here:** http://raspberrypi.stackexchange.com/q/37920/5538 In fact read that one first, it may solve your problems and save you the time of getting under the hood. – goldilocks Jan 03 '16 at 18:15
  • Thank you for your reply. I have tried changing the `/etc/network/interfaces` and setting up a static IP address. These made no difference. I then attempted to do what you said to run `wpa_supplicant` in the foreground. Using the `wpa_supplicant` command gave me a long-ish response about why it failed, let me know if you need to see this. This, as well, made no difference to connecting to wifi. – Mahclark Jan 03 '16 at 22:22
  • Definitely edit that in! – goldilocks Jan 03 '16 at 22:24
  • `ioctl[SIOCSIWENCODEEXT]: Invalid argument ioctl[SIOCSIWENCODEEXT]: Invalid argument 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.` – Mahclark Jan 03 '16 at 22:56
  • Well, that's pretty clear. You're trying to start `wpa_supplicant` when it is already running. That means you did not disable the network autoconfiguration and reboot as described in that other post (the point of which is not to solve the problem, it is to gather information to help solve the problem). If you can't manage to do that, then you are stuck. You could try `sudo killall wpa_supplicant` first. This will help if the one that's running was started manually by you. Otherwise, if it is because you did not disable the autoconfig, something will just restart it again. – goldilocks Jan 04 '16 at 13:04
  • I will try disabling it again. Does it re-enable itself after a reboot? – Mahclark Jan 04 '16 at 14:13
  • Not if you've left *only* those two lines in `/etc/network/interfaces` -- nothing else. The point is to stop the system from trying to manage the wifi interface by removing it from that list. – goldilocks Jan 04 '16 at 14:16

0 Answers0