Hot answers tagged

30

wpa-roaming is a method with which you can browse and connect to wireless networks. The result of the following setup is that if an ethernet cable is not attached, wlan0 takes precedence and connects you to your desired wireless network or to an available open wireless network or a predetermined wireless network. If you connect an ethernet cable, the cabled ...


10

The only way I as able to resolve this issue was to write a shell script that is run every minute by a cron job. It checks if the network is down, if so, reconnects it. It has worked very well for the last week. #!/bin/bash MY_PATH="`dirname \"$0\"`" # relative LOG_PATH="`( cd \"$MY_PATH\" && cd .. && pwd )`/log/network.log" ...


9

You have to specify explicitly the location of the control interface in the /etc/wpa_supplicant/wpa_supplicant-wlan0.conf file. ctrl_interface=/run/wpa_supplicant update_config=1 This adds a wpa_supplicant directory in two volatile directories: /run /var/run. For a description of /run and /var/run, see https://unix.stackexchange.com/a/175349/33386. Don't ...


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

The package that provides the Wi-Fi firmware is called firmware-brcm80211. To downgrade this package to a version that works: sudo apt-get install firmware-brcm80211=0.43+rpi5 To prevent this package from being upgraded (either before an upgrade to stretch, or after downgrading the firmware): sudo apt-mark hold firmware-brcm80211


6

This is expected behaviour; WiFi can not be guaranteed 100% of the time. This applies to Raspbian Wheezy prior to 2015-05-05 for later (and Jessie) See How do I set up networking/WiFi/Static IP If you want it to reconnect automatically after loss of connectivity use wpa-roam in conjunction with wpa_supplicant.conf) PS It is not sensible to publish your ...


6

Unfortunately, there isn't a really convenient way of doing this - that is why I would recommend to always have a backup of a .conf-files original content. Instead of deleting and re-writing the content of the file, you could just swap it altogether and than restart just the networking service: sudo cp /etc/wpa_supplicant/wpa_supplicant.backup /etc/...


6

To get the WiFi working on a Pi Zero W only requires minimal config for Raspbian Stretch. The only file you need to modify is /etc/wpa_supplicant/wpa_supplicant.conf and this file needs to contain your WiFi network's SSID and password - which you add after the initial lines (the first 3 lines) that are already there so the file should look like something ...


5

Problem solved!!! I will explain here the steps I took: I bought a good 2A charger, which at the beginning helped to see the blue light of the dongle. However it didn't yet connect. So googling and googling I came across this page https://amalgjose.wordpress.com/tag/raspbian/ he gives a solution so that the dongle gets detected always. If you do exactly ...


5

I found my answer here: https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=31238 Basically, it suggests you try this to "see where the internet connections stops": traceroute www.raspberrypi.org or to check if it is the DNS that fails traceroute 93.93.128.176 For me, the first command failed but the second succeeded, so I added this to my /etc/...


4

One can also find a full explanation of the two modes of operation (Managed and Roaming) for wpa_supplicant in it's locally installed documentation file - which can be viewed (an [older?] online version is here): zless /usr/share/doc/wpa_supplicant/README.modes.gz It explains that whilst the Managed mode just allows for connection to single configured WiFi ...


4

So I found the solution for anyone who's encountering the same frustrating problem. If your router uses WEP encryption be sure to upgrade it to WPA/WPA2. Most Wifi USB adapters for pi do not work with WEP any longer.


4

Found a working Solution: You need to run the wpa_supplicant with differnt settings (drivers) for WPS and for later connection after the use of WPS. The Github of Max2Play Webinterface offers a working example. For WPS on Raspberry Pi 3 you need to start wpa_supplicant -B w -i wlan0 -c /opt/max2play/wpa_supplicant.conf and for later connection and use ...


4

The correct syntax is iface wlan0 inet manual. The network details are supplied by wpa_supplicant then the iface default net dhcp gets IP address from dhcp. Using wpa-roam rather than wpa-conf enables the interface to change from one to another. I don't know Alpine Linux, but this no longer works reliably on Raspbian.


4

You're most of the way there, I'll include full steps from a fresh install to my answer to help out other users. But this appears to be a bug in Stretch. Make sure your wpa_supplicant.conf is in place then do sudo nano /etc/network/interfaces and add allow-hotplug wlan0 iface wlan0 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf to the ...


4

OK...I realized the issue...As I was just testing the move from /boot/ to /etc/wpa_supplicant.I added a dummy new network but the password was less than 8 characters and so that made wpa_supplicant to silently fail. The way I discover this was by running: sudo wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf And there it clearly said ...


3

Just a suggestion, but I recently discovered wicd-curses, which I've found to be more intuitive to work with than editing the various config files. It's kind of nicely in between a desktop GUI and editing config files. http://blog.ubidots.com/setup-wifi-on-raspberry-pi-using-wicd


3

The command to restart networking entirely, including wpa_supplicant, is this: sudo systemctl restart networking.service As a side note, you should be able to hit the <tab> key after you start typing the name of a service and your shell will autocomplete the name of the service, assuming you've typed in enough to make it unique. That saves you from ...


3

Can be a power issue! (Although may not be because you are using the hub) I had the same issue, and usually it is due to power. So check that the power supply is at least 1 amp (Prefer 2), and if it is and you have lots of devices connected to the USB/GPIO that can also be the case. For an example: My raspberry pi runs on 1.8 amp and I had a keyboard, ...


3

As suggested you can use wpa-roam, though I would recommend to use wicd or network manager. They take care of all the settings, they also deal with multiple networks and are more user friendly. For instance wicd has a curses gui that you can install with: sudo apt-get install wicd-curses And run with: wicd-curses


3

I had a look into how wpa_supplicant parses the configuration file, and it seems like it extracts the exact bytes between ssid=" and the last ". Escaped unicode (\u) and escaped non-ascii characters (\x) will not work. In your case, you would have to specify your SSID like this: ssid="My Name’s iPhone" Which would look like this in a hex editor: 09 ...


3

Same problem here. Upgraded raspbian jessie to raspbian stretch and lost wifi (due to the upgrading of firmware-brcm80211 package). Just copied the contents of /lib/firmware/brcm from raspbian jessie (from another pi) and rebooted. Now wifi works on raspbian stretch.


3

I think your idea is fine. Just copy the credentials from the USB to the Pi with a script, and then you can remove the USB. One way to do it would be to Check if there is an USB mounted If so, copy the WiFi credentials from the USB Put this in your crontab under the directive @reboot, and you should be fine. You edit your crontab with the command sudo ...


3

Be aware that wpa supplicant is no exception to Linux rules: it is case sensitive! In your wpa_supplicant.conf file, network={ is written with a capital N That is already enough to make the parsing process fail...


3

If you have apt-listchanges installed, any NEWS file included in a new or upgraded package will be displayed. That message detailed significant changes made in the maintainer's view. Unless you are developing software or waiting for a bleeding edge change to be announced in the packaging, no action is required on your part normally.


2

Try installing and using wicd: sudo apt-get install wicd-curses Now, you are ready to start: sudo wicd-curses You will get a list of wireless networks, found by RPi, and your wired network. Then, you can select your wifi network. Just highlight it with arrow keys and press right arrow key to edit its properties. When you’re done, just press F10 to save ...


2

In Debian, there is a WiFi utility icon on the desktop and in the menu on the latest version. I don't know about Raspbmc. To get to it go to the menu > Internet > wpa_gui and select your device and then your network. I had to play around with the settings but it eventually connected. Then I did sudo apt-get install firmware-ralink for security and ...


2

It seems possible that if you have been having problems with the B+ as well that the problem is related. From my own experiences, I have found that the key to a reliable WiFi connection is using a dongle that 'just works'. Since you are using one from ThePiHut, then I will assume that it should be ok. To test this, include the dmesg command at the end of the ...


2

The iPhone prompt includes the Unicode character U+2019 "single right quotation mark". This is valid (if very inconvenient). It is easy enough to include Unicode characters in strings. The following would echo this at the bash command prompt. echo $'My Name\u2019s iPhone' echo $'My Name\xE2\x80\x99s iPhone' The (very sketchy) documentation of man ...


2

You can take the ssid, in this case "My Name’s iPhone" (without the quotes), and convert to hex using https://www.browserling.com/tools/text-to-hex. Take the result, in this case 4d 79 20 4e 61 6d 65 e2 80 99 73 20 69 50 68 6f 6e 65 and remove the spaces. Or in bash $ echo -n $'My Name\xE2\x80\x99s iPhone' | od -t x1 -A n -w100000 | tr -d ' ' ...


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