5

I am setting up a new pi zero w but I can't get the wifi adaptor to work. I have set up a zero w before and have setup pi 3s quite a few times.

I usually just edit the /etc/network/interfaces and the /etc/wpa_supplicant/wpa_supplicant to specify the network settings and it usually just connects.

This time no such luck.

I have edited both these files to match the ones on my other Pis. When I do ifconfig -a I only get the lo loopback interface listed. no sign of any wlan interfaces.

What is my next step to try and get this working?

Interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

wpa_supplicant:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="myNetworkName"
        psk="myNetworkPassword"
        key_mgmt=WPA-PSK
}

Thanks

  • your next step is to give us enough info to help answer your question. You can start by including the contents of the config files you mentioned. Please add them to your question, not the comments. I have seen a typo in one of these files cause the no interfaces found error. – Steve Robillard May 4 '17 at 19:42
  • Ok, yes that would be useful but as I have no network connection to the pi it's going to be difficult to get them unless I take a photo and attach that... Can I even attach pictures to SO posts? – Roaders May 5 '17 at 6:58
  • 1
    Yes you can attach a photo but please don't. You can copy the file to a flash drive or to the /boot directory then insert the SD card into another PC and read that partition. – Steve Robillard May 5 '17 at 7:01
  • OK, I have added the contents of those 2 files – Roaders May 6 '17 at 9:57
  • "When I do ifconfig -a I only get the lo loopback interface listed. no sign of any wlan interfaces." -> Not good. This means the kernel has not recognized the hardware. Pursing userland configurations in that context is a red herring (possibly a sour one, since your configuration may in fact be fine). I'll differ a bit w/ @SteveRobillard in that I'm dubious they could cause the interface to disappear, unless the mechanism intentionally unloads drivers. Edit in the output from lsmod. – goldilocks May 6 '17 at 14:07
2

Try changing

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

to

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

in your network interfaces file (Note change from manual to dhcp).

Also change your network profile to:

network={
  ssid="my network name"
  psk="my network password"
  proto=RSN
  key_mgmt=WPA-PSK
  pairwise=CCMP
  auth_alg=OPEN
}

If you're going fully headless you can then use nmap to then find the pi on your network. I set up a Pi Zero W two days ago and this worked perfectly.

| improve this answer | |
  • 2
    This won't work because "When I do ifconfig -a I only get the lo loopback interface listed. no sign of any wlan interfaces". You cannot configure an interface that does not exist. – goldilocks May 6 '17 at 14:05
  • 2
    On the pi zero, I think bluetooth and wifi are on the same chip. To make sure it's not a hardware problem, can you try hcitool dev? Also try dmesg|less and type /wlan + ENTER. Use n to jump from each found entry to the next. On my pi i can see IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready – Camp bell May 6 '17 at 14:19
  • I think that's the root of the issue @goldilocks. I have tried various different configurations of these files and the interface never appeared. I have never had any of the other settings in the wpa_config file and it has worked previously. It is not a hardware issue as when I try a different SD card the wifi works fine. – Roaders May 8 '17 at 6:15
  • Then it is almost certainly a problem with your installation. If you make another one it should solve the problem. You might also want to check the SHA-1 of the disk image you downloaded for your pi, as it may have been corrupted. Trying to manually fix files may prove to be a very time consuming task. – Camp bell May 9 '17 at 8:43
2

I faced the same issue and used all the recommendations. However nothing worked and i struggled for 2 weeks. Same issue with another pi zero W

I then installed the previous version ~ Raspbian Jessie 2017-03-02. Then did four additional things:

  1. added ssh file
  2. created wpa_supplicant.conf which has the wifi configuration
  3. added dtoverlay=dwc2 into config.txt
  4. added modules-load=dwc2,g_ether into cmdline.txt

Then I started the Pi. I can now see wlan when I run the command ifconfig

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.