Unable to connect Raspberry to WiFi network

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
Bofur
Posts: 6
Joined: 07 Sep 2017 22:14

Unable to connect Raspberry to WiFi network

Post by Bofur »

I recently bought a Raspberry Pi 3 together with Razberry 2 Z-Wave controller to get started with some home automation. My first issue is that I'm unable to connect my Pi to my WiFi network (and I'm not much of a Linux guy, which probably explains that problem...).

Setting up my Pi, I used the complete SD Card image including Z-Wave control software as found here. I connected my Pi using a cable to my router, and I'm using PuTTY to SSH into the box. Next I looked at this documentation on how to set up wifi from the command line, and my /etc/wpa_supplicant/wpa_supplicant.conf is according to the example. But without any luck, still unable to connect the Pi to my wifi network.

When I type ifconfig I see both my eth0 and wlan0 adapters, but I notice that the inet address of the wlan0 adapter is on a different subnet than the eth0 adapter. Which I assume is because the wlan0 adapter is working as an access point, to allow Local IP WIFI access as described in chapter 3.3 in the ZWay manual.

Next, I'm therefore trying to find out how to disable the wifi access point on the Pi (e.g. as described here, but is not working for me), so at this point I'm stuck. I can't seem to get to disable the AP mode...

So if somebody could point me to some useful documentation, or provide a short and concise description, on how to disable the AP mode to allow connecting my Pi to my wifi network, that would be much appreciated!
spangsberg
Posts: 2
Joined: 16 Sep 2017 14:37

Re: Unable to connect Raspberry to WiFi network

Post by spangsberg »

Hi

I am facing the exact same issue.

I have Razberry running and configured on the LAN cable, but I want to move the berry to the center of the house, where I have no LAN cables, so I need to have the Razberry connected to my WiFi network.

How do I do that?
Bofur
Posts: 6
Joined: 07 Sep 2017 22:14

Re: Unable to connect Raspberry to WiFi network

Post by Bofur »

I'm glad to at least see that I'm not the only one facing this issue...

Just as a small update to what else I've tried since the initial post:

I ran sudo update-rc.d hostapd disable to try disable the hostapd service at startup. But after a reboot I still see wlan0 (from ifconfig) with an ip address from a different subnet then my eth0 adapter, which indicates that it still acts in AP mode in some way (or at least doesn't properly connect to my wifi network).

If this whole issue doesn't belong in this forum (due to the lack of answers..?), I would also appreciate if somebody could tell me so. And even better: perhaps point me in the right direction for a better place to ask the question :)
brianaker
Posts: 55
Joined: 11 Nov 2016 16:57

Re: Unable to connect Raspberry to WiFi network

Post by brianaker »

You can always do this:
dtoverlay=pi3-disable-wifi

Disable wifi on the pi via /boot/config.txt
Bofur
Posts: 6
Joined: 07 Sep 2017 22:14

Re: Unable to connect Raspberry to WiFi network

Post by Bofur »

brianaker wrote:
16 Sep 2017 23:11
Disable wifi on the pi via /boot/config.txt
Than you for your suggestion, brianaker. But I fail to see how this will be of any help. I'm not interested disabling my wifi interface completely, but how to stop it act lice a wireless access point, and instead have it work like a "normal" wifi interface to connect to my home wifi network.
sploff
Posts: 21
Joined: 12 Feb 2015 00:33

Re: Unable to connect Raspberry to WiFi network

Post by sploff »

I used this guide for some time ago.

https://www.raspberrypi.org/documentati ... /wireless/
Bofur
Posts: 6
Joined: 07 Sep 2017 22:14

Re: Unable to connect Raspberry to WiFi network

Post by Bofur »

Thank you, sploff, that link was helpful. I had only stumbled upon the part about setting up wireless networking from the command line when googling, so the other one about setting up the Pi as an access point contained some useful information. I was partially able to "reverse engineer" the documentation of the AP configuration, to instead disable it. Although not exactly as described, as it seems like the Z-Way for RaZberry SD Card image is set up in a slightly different way.

The documentation mention two pieces of software: dnsmasq and hostapd. I therefore tried the following:

Code: Select all

sudo systemctl stop dnsmasq
sudo systemctl stop hostapd
The first one failed ("Failed to stop dnsmasq.service: Unit dnsmasq.service not loaded."), but the last one succeeded. So even though I had stopped the hostadp service, I still got a static IP (on the wrong subnet). Further down the documentation the /etc/dhcpcd.conf configuration file was mentioned. I looked into this, and at the bottom commented out the two last lines:

Code: Select all

#static ip_address=192.168.115.1/24
#static routers=192.168.115.1
Just resetting the interface (ifdown/ifup) wasn't sufficient, but after a reboot the wlan0 interface was finally connected to my wifi network and was dynamically assigned an IP from my router. The documentation also mentioned the /etc/network/interfaces file, but I didn't touch that one.

So in summary, the steps that solved the issue:
Stop the hostapd service, comment out the relevant lines from /etc/dhcpcd.conf, and finally reboot.
spangsberg
Posts: 2
Joined: 16 Sep 2017 14:37

Re: Unable to connect Raspberry to WiFi network

Post by spangsberg »

Thank you Bofur

I finally managed to get it working too :-)

The steps I took:

sudo apt-get purge hostapd #To remove the AP functionality completely from the Pi
edit the /etc/wpa_supplicant/wpa_supplicant.conf file

That seemed to work, but the Pi would occasionally come up, after reboots, with the static 192.168.115.1 IP address, but your last hint on editing the dhcpcd.conf file removed that annoyance :-)

Thank you again, you can now find me surfing the Z-waves :-)
Post Reply