9

With the great help in WLAN using Netgear WNA1000M fails - what am I doing wrong? I managed to get my wireless network working on Raspbian running on my RPi.

But - I need to manually run the wpa_supplicant command

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

in order to connect to the wireless network. Once I run this command, an IP address is automatically received via DHCP and everything is fine.

It's just not working automatically when I boot.

How do I change this?

My /etc/network/interfaces file looks like this:

auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

Am I missing something in here?

asked Dec 5, 2012 at 11:30

4 Answers 4

8

I got it.

I had to replace wpa-roam by wpa-conf.

If anyone could explain why, I'd be happy ;-)

answered Dec 5, 2012 at 12:03
1
  • 2
    wpa-roam uses a different config file which is used for WiFi roaming. You can define sever SSID in there and if one dies it connects to the other. It also means that if you only have 1 then it will reconnect to that one if it disconnects for what ever reason. Using wpa conf you need to restart the interface manually for it to reconnect. Commented Feb 4, 2014 at 19:58
2

I found this "outdated" tutorial on the Ubuntu forums: How To: set up wpa_supplicant roaming mode and automatically start at boot, and it works just fine. The id_str is optional, but allows you to use different /etc/network/interfaces entries with different wireless networks.

network={
ssid="MyNetwork"
#psk="text passphrase"
psk=(a huge long number here)
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
id_str="home"
}

and then match that up with a corresponding entry in /etc/network/interfaces:

# This entry is used for any wireless networks without an id_str property
iface default inet dhcp
# This is for wireless networks with an id_str="home"
iface home inet dhcp

and that will cause the wireless network to connect at boot time. My testing didn't work at first, but it turned out that my router wasn't answering the DCHPDISCOVER requests. Editing /etc/network/interfaces to look like this:

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
wpa-debug-level 3

and then running

ifup wlan0 && tail -f /var/log/syslog

allowed me to watch the loading process and find the issue with DHCP.

answered Aug 18, 2014 at 15:24
1

I am not sure why you needed to replace wpa-roam with wpa-conf. I have a wireless lan adapter (as I assume you do too -- wlan0 implies as much).

My setup checks for and connects to a configured network when booting. I am attaching the file below for your consideration.

auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
answered Dec 8, 2012 at 4:55
5
  • As far as I found out so far roam does not work with DHCP, only with manual IP assignment. And this is exactly where our configurations differ. Commented Dec 8, 2012 at 8:25
  • An easier (and more straight forward configuration would be Commented Dec 21, 2012 at 14:21
  • This [linux-magazine.com/Online/Blogs/Productivity-Sauce/… provides a much more straight forward configuration. Commented Dec 21, 2012 at 15:13
  • @JeremyHarrison Your link appears to be broken. Commented Apr 8, 2014 at 14:29
  • this link worked for me: linux-magazine.com/Online/Blogs/Productivity-Sauce/… Commented Mar 7, 2015 at 5:07
0

As per this advice, I've installed wicd and configured my wifi connection through wicd-curses. And never looked back since.

sudo apt-get install wicd
sudo apt-get install wicd-curses

And then setup by running:

wicd-curses
answered Nov 22, 2014 at 21:39
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.