WIFI does not work at Raspberry Pi 3

Platform information:
Hardware: RPI3 Model B Rev 1.2 with 32 GB SD Card
OS: OpenHABian 2.2.
Java Runtime Environment: Version 8 Update 161
openHAB version: 1.4
Issue of the topic:

Hi,

I´m totally desperate.

I was able to flash my SD card, could install openhabian and could visit the confing menu directly on my Pi and with Putty as well. During the whole time the Pi was connected to LAN and everything worked fine.

Then I tried to switch to WIFI. Therefore I have entered the SSID and my password in the confing menu. I got the message that everything is set up successfully but after a reboot it does not worked anymore. Even with the LAN cable it does not worked.

I formated the SD and tried this procedure twice but it does not work either.

I also tried to change the openhabian.conf before the installation but still no WIFI connection.

Do you have any solution for me?

Thank you in advance!

Thomas

I will second Thomas’s problem, I have exactly the same set-up and exactly the same results. Everthing works as it should until I add my ssid and password- after the reboot, I can no longer get in to the Pi. The only thing that works is to re-image the card and start again. I have tried adding the ssid and password directly to the config file before fiirst boot, and using the config gui, same results either way.

like Thomas, I would really appreciate an answer to this- on my network, going wired is not an option except for initial set-up.

Thanks, Ken.

Hi guys,

Copy a configuration file to the SD card root and set your Wi-Fi access details in the file. Just Google for wpa_supplicant.conf to get the configuration as in not able to access my files to show you.

1 Like

Thanks Chris, but I already tried putting the relevant details in the openhabian.conf file after flashing it and before putting it in the Pi for first boot. I got no response from the Pi after that, until I reflashed the card.

Did you read this?

Thanks Jurgen, yes that was the page I used as a reference to make the changes. I had another attempt by not making those changes before first boot, and using the openhabian config gui- same result. When I set the wireless config via system settings- wireless, the Pi didn’t come back from the reboot- had to reflash the card yet again.

As a check, I have just flashed a copy of raspbian-stretch on to another card and can access the pi by wireless with no problems, so the wireless hardware is fine.

So it sounds as if it is related to the openhabian setup. I suggest to report that either in this forum Thread or as an issue in here.

I’ve had similar issues with openHABian - it would not reconnect to the network or did not want to change from ethernet to wifi or vice versa. I ended up installing ifmetric and ifplugd and now it works like a charm.

The actual work is done by ifplugd. It monitors the connections and dynamically brings the interfaces down when connection gets lost but also brngs them up when a connection gets available.

With ifmetric you can define which connection type to prefer when both are available.

This is how my /etc/default/ifplugd looks:

INTERFACES="auto"
HOTPLUG_INTERFACES="all"
ARGS="-q -f -u0 -d10 -w -I"
SUSPEND_ACTION="stop"

This is my /etc/network/interfaces:

source-directory /etc/network/interfaces.d
 
auto lo
iface lo inet loopback
 
allow-hotplug eth0
auto eth0
iface eth0 inet dhcp
#    up ifmetric eth0 10
 
allow-hotplug wlan0
iface wlan0 inet manual
#    up ifmetric wlan0 20
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

HTH!

1 Like

Thanks Metin, I will give this a try when I get back from my run this morning and report back.

After a few false starts caused by my typing, I now have wired or wireless working, depending on whether the cable is plugged in or not- thanks very much Metin, your information did the trick.
The problem is solved, now I can get on with learning how to actually drive OpenHabian.

I`m sorry but I´m a total newbie … where do I find ifmetric and ifplugd and how could I install it?

If the installation is ready how could I set it up?

This helped in my case. Reminder for anyone else looking here… You will need to do a fresh install of Openhabian / ssh into your rPi (via your IP) / install both packages (ifmetric and ifplugd) / Apply Metin’s fix.

You will also need to update the openhabian.conf file with your WiFi password info.

Reboot and away you go. Now it works like a charm!

I vote that this fix gets added to the OS! Without it and you access one or the other network adapter and your board is bricked…

Thanks Metin for posting this fix!

1 Like

Hi Mountbaldy

I´m so glad to hear there is a chance to solve this problem.

Is there a chance to write down a detailed step by step instruction? I´m a new user and not very familiar with it.

Thank you so much.

Hi @Thomase004,

You will need to start with a fresh install of OpenHAB2. Download the latest version from Git Hub. Depending on your OS you will need to download the appropriate program to install the image onto your SD card. DO THIS STEP NO MATTER IF YOU HAD THIS WORKING BEFORE.

Plug in your network cable to your switch or plug in a cross over network cable directly to your computer. (This is the easiest method to set this up.) You can set up the wifi later.

Next you will need to identify the IP Address of your RPi. The easiest method here is to look on your router or use “arp -a” and use the process of elimination.

Open a command prompt window (linux) or open a Putty window (windows). In Linux, type “sudo ssh openhab@RPiIpaddress”. Enter root password for your computer. Next, when prompted, type the SSH password of the Openhab server. The default is “openhab”. For Windows you will have to put the IP of the Openhab server into the IP address field and set Putty to SSH. Google Putty Wiki for more info there.

Next you will need to install the ifmetric and ifplugd packages.

Before we install these packages, you should update your libraries. To do this type “sudo apt-get update”. Enter sudo password for Openhab. Default is “openhab”.

To install ifmetric, type “sudo apt-get install ifmeteric”. Enter the sudo password. You will be prompted about the package install, press enter or type Y to continue.

To install ifplugd, type “sudo apt-get install ifplugd”. Enter sudo password. You will be prompted about the package install, press enter or type Y to continue.

Next follow @metin’s post…

Type “sudo nano /etc/default/ifplugd”. Enter sudo password.

Copy the following into ifplud file…

INTERFACES="auto"
HOTPLUG_INTERFACES="all"
ARGS="-q -f -u0 -d10 -w -I"
SUSPEND_ACTION="stop"

Press Ctrl X to save changes and exit nano.

Type “sudo nano /etc/network/interfaces”. Enter sudo password.

Replace your interfaces file with the following:

source-directory /etc/network/interfaces.d
 
auto lo
iface lo inet loopback
 
allow-hotplug eth0
auto eth0
iface eth0 inet dhcp
#    up ifmetric eth0 10
 
allow-hotplug wlan0
iface wlan0 inet manual
#    up ifmetric wlan0 20
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

Press Ctrl X to save changes and exit nano.

Next update your openhab.conf file…

To do this type “sudo nano /openhabian.conf”. (I may have the file location here wrong as I am not in front of my Openhab server at the moment to check…)

Add your wifi SSID and password here.

Press Ctrl X to exit here.

To test to see if things are working, unplug your network cable to your RPi. You should be able to see your RPi on your wireless network. This does take a second. So be patient. If not, reboot your RPi. You can do this by typing “sudo reboot” on your SSH command prompt.

You might also have to add your wireless into the wpa_supplicant directory. To do so CD into /etc/wpa_supplicant/ and edit wpa_supplicant.conf in nano.

Once you get this far, you should be able to either wireless or wifi.

Good luck!

Cheers!

Sorry for my english (my spanish is much more better).

I start right now whith openhabian and I have had the same isue than Thomas & Ken.
After a good number of reinstallations with the same problem, I stopped to read the first screen that appears after login with ssh.
It says that to make WIFI works right, the information of ‘LOCALE’ must be filled in, using ‘sudo raspi-config’. Well, I’ve done it and everything has started to work correctly.
If you notice, when it fails, at the boot of the system (viewing with a monitor pluged in de raspberry) this line appears:
FAILED to start DHCPCD on all interfaces.

I hope it helps you.

@virhonestum

For me all the above did not work, as it could not find the package ifmeteric .

As explained in @mountbaldy’s post, ifmetric and ifpludg can be installed via sudo apt-get install, but note that the correct spelling is ifmetric, and not ifmeteric.

@mountbaldy, maybe you can edit your post to remove the typo?!