287

There are some great answers here, but many are out of date. Even this one has aged somewhat. There are now (at least) two ways of doing this: 1: Raspberry Pi Imager The Raspberry Pi Foundation's Raspberry Pi Imager now has an advanced options menu which is accessed by the keyboard shortcut Ctrl+Shift+X: You can set hostname, allow SSH (including changing ...


63

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 ...


26

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 ~ $ ...


26

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=/...


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 ...


21

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 ...


21

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=...


17

I know this is an old question, but it was the first result that came up in my search when I had essentially the same problem on my freshly installed Pi Zero. I found the key to my answer on this other question, among other sources. So basically, though the Pi itself apparently doesn't have a sleep mode, individual devices in Linux (including the network ...


17

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 }


17

I have developed lazycast that is designed to work on Raspberry Pi 3. lazycast follows (most of) the wifi display specification (commercially known as Miracast) and uses wifi p2p (commercially known as WiFi Direct) to set up a connection. I have tested it with Windows 8.1 and 10 sources. It requires no modification (using the built-in wifi) to the hardware ...


16

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

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.


14

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 ...


13

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=...


11

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/...


11

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.


11

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 ...


9

sudo systemctl stop dhcpcd.service will stop (deactivate) dhcpcd sudo systemctl disable dhcpcd.service will prevent it from restarting. Having said the above, I think this is a bad idea. There are a few different network managers in use on Pi under Linux. dhcpcd performs well, and has been chosen by the Foundation for good reasons. On another point, you ...


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 ...


8

First we need to change over completely to systemd (which might be the future anyway), as Ingo has explained here: # deinstall classic networking sudo -Es # if not already done apt --autoremove purge ifupdown dhcpcd5 isc-dhcp-client isc-dhcp-common rsyslog apt-mark hold ifupdown dhcpcd5 isc-dhcp-client isc-dhcp-common rsyslog raspberrypi-net-mods ...


7

Your original config was ok, except for the comma's in your first line. So use auto lo eth0 wlan0 instead... My config: auto lo wlan0 iface lo inet loopback iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet static address 10.0.0.81 network 10.0.0.0 netmask 255.255.254.0 gateway 10.0....


7

It seems to be a known problem. From what I've found, all we can do is: # disable power management (may need to be done periodically?) iwconfig wlan0 power off and disable hw encryption (so it will be done in the software). Edit or create /etc/modprobe.d/rt2800usb.conf : options rt2800usb nohwcrypt=1 Also don't forget to update /lib/firmware/rt2870.bin ...


7

One of the things that I have read a hundred times in dealing with anything attached to the USB on any model of RPi is to make sure that you have a decent Power Supply (2 or more Amps) or use a quality powered USB hub. Could it be possible that your WiFi dongle isn't getting enough power now because the HDMI screen is too greedy?


7

English is not my native language so please be patient. When I don't know how to configure something, sometimes I let the system do it for me, mostly of the times, things works with default values. In this case, if you don't know the function of the pairwise and group parameters. You could check this Page or read below: pairwise: list of accepted ...


7

I assume you are using Raspbian and you have setup the access point with hostapd. To switch the access point this commands should do: rpi ~$ sudo systemctl stop hostapd.service rpi ~$ sudo systemctl start hostapd.service It is difficult to say much more about start/stop hostapd because I don't know anything about your setup. Do you use a stand alone access ...


6

For "Raspbian GNU/Linux 8 (jessie)" (cat /etc/os-release), "Raspberry Pi reference 2017-06-21" (cat /etc/rpi-issue) (maybe also 2017-07-05) (thanks @Heinrich Ulbricht) and earlier see my answer here. For "Raspbian GNU/Linux 9 (stretch)" (cat /etc/os-release), "Raspberry Pi reference 2017-08-16" (cat /etc/rpi-issue) (maybe also 2017-07-05) and later things ...


6

I found out myself...it is actually very easy: I just have to add rules to the udev system to assign explicit names to the usb dongles (depending on their mac address). Then interfaces can be set up accordingly. /etc/udev/rules.d/70-persistent-net.rules SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="address:one", NAME="wlan0" SUBSYSTEM=="net", ACTION=="...


6

The Edimax EW-7811UN does not work in 5GHz networks, it is only caable for 2.4GHz (see http://www.cnet.com/products/edimax-ew-7811un-network-adapter/specs/).


6

Stuff like this can be really tedious to peg down, since unless you have a keyboard and monitor you can plug in, there's no way, if ssh doesn't work, to check what's gone wrong on the live system. Here's a simple starting point: #!/bin/bash # Set these to whatever you want. router_ip=192.168.0.1 log_file=/tmp/mystery.log # Make sure we can write to the ...


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