220

There are some great answers here, but many are out of date. Since May 2016, Raspbian has been able to copy wifi details from /boot/wpa_supplicant.conf into /etc/wpa_supplicant/wpa_supplicant.conf to automatically configure wireless network access: If a wpa_supplicant.conf file is placed into the /boot/ directory, this will be moved to the /etc/...


68

Well, there is a very simple solution: Go to /etc/ifplugd/action.d/ and rename the ifupdown file to ifupdown.original Then do: cp /etc/wpa_supplicant/ifupdown.sh ./ifupdown Finally: sudo reboot That's all. Test this by turning off/on your AP; you should see that your Raspberry Pi properly reconnects.


58

Problem solved! It seems that even though I added the gateway information into the interfaces file, wlan0 didn't really have a default gateway. When I ran sudo route -n it yielded Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 ...


31

I prefer to disable most of the network auto configuration and connection management daemon stuff and deal with it myself. Here's a (bash) script that will keep the connection up as long as the network is there and you do not have a glitchy wifi driver or power issues; the idea is to ping the router every N seconds, and if that fails, re-connect: #!/bin/...


25

This applies to Raspbian Wheezy prior to 2015-05-05 for later (and Jessie/Stretch) See How do I set up networking/WiFi/Static IP As suggested by the community, my answer extracted from the question. I got it working right now so I'll share all my configuration files with the community. Firstly lets look at the wpa_supplicant.conf file: pi@raspberrypi ~ $ ...


24

The default Raspbian /etc/network/interfaces configuration does not connect to WiFi on boot. The key lines of the interfaces man-page are: Lines beginning with the word "auto" are used to identify the physical interfaces to be brought up when ifup is run with the -a option. (This option is used by the system boot scripts.) ... Lines ...


23

Some specific Instructions: Contents of /etc/network/interfaces: auto lo iface lo inet loopback allow-hotplug eth0 iface eth0 inet dhcp allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf post-up ifdown eth0 iface default inet dhcp Contents of /etc/wpa_supplicant/wpa_supplicant.conf: ctrl_interface=DIR=/...


20

I recently stumbled across a console application that sorts all the wireless configuration hell out. You can also use this tool to configure the LAN interface. sudo apt-get install wicd-curses It will install quite a few other packages and run its own daemon in the background but it sure makes configuring everything a whole lot easier. Run it with sudo ...


19

In principle, yes. You can follow any tutorial for setting up a Linux PC as a router. Useful Tutorials Building an Arch Linux Router Building a Linux Router


17

Default behavior seems to consist in storing wifi settings in /etc/wpa_supplicant/wpa_supplicant.conf, just like @lucaslink mentionned. I'd like to provide a bit more details however. Here is how the wpa_supplicant.conf file is supposed to look like: $ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf ctrl_interface=DIR=/Var/run/wpa_supplicant GROUP=...


16

I changed auto to allow-hotplug for wlan0 in my /etc/network/interfaces, see below: pi@raspbmc:~$ cat /etc/network/interfaces #auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf That worked for me! I'm really not sure why this worked. The Debian documentation at this link is confusing to me because ...


15

I changed wpa-ssid ="network-essid" to wireless-essid my_essid_without_quote and, now, it works fine. auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wireless-essid my_essid_without_quote


14

The script mentioned in the darrenjw's answer downloads a pre-compiled module based on your kernel version. It's quite likely that one of these modules will work for you though you might have to search through the script to find the right module. The lastest one worked for me, I'd start by downloading and trying that. wget http://dl.dropbox.com/u/80256631/...


13

This can be solved with no extra scripts. In /etc/network/interfaces put: allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp The roaming allows the interface to self-heal.


13

For me, the recommended solutions above were unsatisfactory. For one, I have a blank in my SSID, so I needed to specify it in quotes. Secondly, I have several SSIDs here, and I want to connect to one specifically. I used this in the file /etc/wpa_supplicant/wpa_supplicant.conf and it worked: network={ ssid="my ssid with spaces" key_mgmt=NONE }


12

Instructions for cross-compiling Downloaded the driver sources from the Edimax website. Clone the kernel sources from GitHub. cd into your kernel source and cd into include/linux. Run ln -s smp.h smp_lock.h`. unzip the Edimax download and tar -xzf the driver package. cd into the driver/rtl... subdirectory. Edit include/rtw_xmit.h and add #include <...


12

This is caused by inadequate power. Use a good power supply and a good power cable. Some cheap cables that work with a cell phone, cannot fully power the R-Pi. Some USB devices require a lot of power: most will have a label showing the voltage and mA requirements. They should be 5v 100mA each max, any more than this they must be used with a powered ...


12

This happens a lot with one of my Raspberry Pis. I have a script which checks for an Internet connection and runs ifup wlan0 when a connection is not present. Some of the things you could try: Rebooting the Raspberry Pi Checking that you have a valid IP address using ifconfig Ensuring that you have power-saving features disabled on the dongle by adding ...


11

This sounds like a power problem. The Raspberry Pi can only supply a limited amount of current to the USB peripherals. Try connecting the peripherals through a USB powered hub.


10

Good power supply is not enough. USB ports on RaspberryPi are behind polyfuses which limits current that can drawn from it to about 140mA (in practice, it should be even smaller). So no matter how good your power supply is, if your USB device wants more than say 120mA of power, it will fail. Note that USB specification says that enumerated device can take up ...


10

Since November 2016 SSH has been disabled by default in standard Raspbian images for security reasons. To re-enable it, create a blank file called either ssh or ssh.txt on the sd card boot folder ( fat32 partition accessible from windows) To preconfigure the wifi settings, you also create a file called wpa_supplicant.conf there containing: ctrl_interface=...


10

Add the following to the end of /etc/wpa_supplicant/wpa_supplicant.conf : network={ key_mgmt=NONE priority=-999 } That'll connect to any open / unsecured wifi in range. The priority line just means it'll connect to any of your other named networks in preference.


9

I used simple steps and it perfectly worked for me: Open a root terminal in raspberry Pi. Now you need to edit your script that's starting X. In the default build with lightdm. Open "lightdm.conf" file located in, /etc/lightdm/lightdm.conf Add below line in to SeatDefault (or Seat:* in newer LightDM versions) section. [SeatDefaults] xserver-command=X -...


9

You might have multiple instances of wpa_supplicant running. try ps ax | grep "wpa_supplicant -B" | grep -v grep kill {pid of wpa_supplicant} if that works then you can try this sudo kill $(pgrep -f "wpa_supplicant -B") sudo ifconfig wlan0 down sudo ifconfig wlan0 up sudo rm -r /var/run/wpa_supplicant/* sudo wpa_supplicant -B -iwlan0 -f/var/log/...


9

This setup is DEPRECATED and no longer maintained! Look at Access point as WiFi repeater, optional with bridge for a more flexible setup. It is possible to use the wifi device on a Raspberry Pi as an access point and at the same time connect as client to another already established wlan. I have heard this is possible for RPi-0W, RPi-3B and RPi-3B+. But ...


8

Something is wrong. The pi does not have a "sleep mode". I've only had my pi a few weeks and have not left it on the whole time, but I intend to eventually and I have left it on for some long stretches. I'm running raspbian, and I have a personal dislike for NetworkManager, lol, so that is disabled. To keep the wifi up, I run a script which pings the ...


8

If a device does not have internet access or other access outside the local subnet, then you should eliminate the gateway. Listing a gateway on both interfaces is likely the culprit. If the ethernet is for the local subnet only remove that gateway.


8

If you want to use the PI exclusively as a HTPC or media center, you could use a distribution geared towards such applications. OpenELEC/XBMC /RasBMC seem to be the obvious choice. I did try OpenELEC at one time, but getting WiFi to work reliably on it seemed to be a pain. Here's how I went about using Raspbian (since I use the RPi for tasks other than ...


7

I'll show steps for Arch Linux because that's the distro I'm familiar with, but instructions for Raspbian shouldn't be very different. Note that not all wlan0 interfaces support AP mode. The setup would be (eth0)<---RPI--->(wlan0) where the RPI is the router (and AP) providing wireless internet from ethernet. Install needed software and drivers. ...


7

AR6001G PDF - Full WiFi Chip S6-LAK05 - Flash Memory Controller and Controller SoC A peculiar little device. You cannot really find anywhere how it works internally but what i can tell you is that its a normal flash drive. No setting files are stores on the flash memory it self! The special part it that the S6 chip also acts as a MCU and and communicates ...


Only top voted, non community-wiki answers of a minimum length are eligible