xybydy
Posts: 6
Joined: Fri Mar 03, 2017 10:52 am

[SOLVED] Pi Zero W wifi issues on Raspbian in headless mode

Fri Mar 03, 2017 10:57 am

Hi,

I've received my Zero W yesterday, installed Raspbian Jessie Lite 2016-11-25 version on headless mode. I could not see wifi interface when I type "ifconfig" command. Then I installed the latest 2017-02-16 version of Raspbian Lite. But then the device blinked twice didn't boot up at all. Thought it was a faulty sd card but I'm using it now on my Rpi2 recalbox installed with no issues.

Am I missing something obvious? :(
Last edited by xybydy on Sun Mar 05, 2017 5:01 pm, edited 1 time in total.

User avatar
DougieLawson
Posts: 34166
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Pi Zero W wifi issues on Raspbian

Fri Mar 03, 2017 11:26 am

You MUST use 2017-02-16 Raspbian or NOOBS 2.2.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5371
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Pi Zero W wifi issues on Raspbian

Fri Mar 03, 2017 11:26 am

Could you provide more information about how you've determined it's not booting? The current firmware/kernel have an issue where the ACT LED doesn't work, but the device still boots correctly and I see the wlan0 device showing up.

fruitoftheloom
Posts: 17838
Joined: Tue Mar 25, 2014 12:40 pm

Re: Pi Zero W wifi issues on Raspbian

Fri Mar 03, 2017 11:30 am

ShiftPlusOne wrote:Could you provide more information about how you've determined it's not booting? There current firmware/kernel have an issue where the ACT LED doesn't work, but the device still boots correctly and I see the wlan0 device showing up.
viewtopic.php?f=28&t=175982
Adieu

xybydy
Posts: 6
Joined: Fri Mar 03, 2017 10:52 am

Re: Pi Zero W wifi issues on Raspbian

Fri Mar 03, 2017 2:03 pm

ShiftPlusOne wrote:Could you provide more information about how you've determined it's not booting? There current firmware/kernel have an issue where the ACT LED doesn't work, but the device still boots correctly and I see the wlan0 device showing up.
I have performed headless installation; added ssh file to boot partition. "modules-load=dwc2,g_ether" into cmdline.txt and "dtoverlay=dwc2" to config.txt.

I could not reach the device through ssh tunneling using [email protected] which I did from previous version I've mentioned. This is how I determined that the device was not booting.
All I've got now is a micro usb cable. Although I've configured wpa_supplicant.conf file, the device is not able to connect to network. So the only way to connect to device is through usb cable from my mac with the settings above.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5371
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Pi Zero W wifi issues on Raspbian

Fri Mar 03, 2017 3:33 pm

I can only say that the image boots, since I've re-tested it after seeing this post.

There should be another update soon (today or tomorrow) which will fix the LED issue.

mjvanmierlo
Posts: 3
Joined: Fri Mar 03, 2017 5:56 pm

Re: Pi Zero W wifi issues on Raspbian

Fri Mar 03, 2017 6:01 pm

I have exactly the same issue
used https://davidmaitland.me/2015/12/raspbe ... ess-setup/ to do a headless installation, but my WiFi interface is not recognised / connecting.

I have no mini HDMI to HDMI converter / cable so not able to check the output.

I am using the Release date:2017-02-16 Raspbian, funny thing is .. that when I try the SD card on my Pi3 it does boot but also does not recognize the Wireless adapter (which is fully operational when I use my SD card with OpenElec on it) .

Might this be rather a Raspbian issue than a hardware one ?
My guess is that this releas (Release date:2017-02-16) has an issue with the kernell / modules and the Pi's wifi interface.

[update]
After posting this the Release date:2017-02-16 version was replaces by the Release date:2017-03-02 version. (within 30 minutes or so)
So currently downloading and will upgrade a.s.a.p. and post my findings here.

TheBalvenie21yo
Posts: 4
Joined: Fri Mar 03, 2017 6:22 am

Re: Pi Zero W wifi issues on Raspbian

Fri Mar 03, 2017 7:11 pm

I don't think it's just Pi Zero. There are a great number of people who have issues with wifi on their Pi3. For example, last night I made this post in the most recent wifi thread about the issues I'm having.

mjvanmierlo
Posts: 3
Joined: Fri Mar 03, 2017 5:56 pm

Re: Pi Zero W wifi issues on Raspbian

Fri Mar 03, 2017 7:24 pm

As mentioned in my previous post, installed the Release date:2017-03-02 version, edited the :
etc/wpa_supplicant/wpa_supplicant.conf.

and added the ssh file in /boot :

touch boot/ssh

Solved my issue .. i just successfully ssh'd in my brand new headless wifi connected pi zero w

TheBalvenie21yo
Posts: 4
Joined: Fri Mar 03, 2017 6:22 am

Re: Pi Zero W wifi issues on Raspbian

Fri Mar 03, 2017 8:30 pm

mjvanmierlo wrote:As mentioned in my previous post, installed the Release date:2017-03-02 version, edited the :
etc/wpa_supplicant/wpa_supplicant.conf.

and added the ssh file in /boot :

touch boot/ssh

Solved my issue .. i just successfully ssh'd in my brand new headless wifi connected pi zero w
What did you do to the wpa_supplicant.conf file and what was the ssh file you added to /boot?

redpola
Posts: 4
Joined: Sun Mar 05, 2017 2:21 pm

Re: Pi Zero W wifi issues on Raspbian

Sun Mar 05, 2017 2:36 pm

I'm just adding a "me too".

I followed the instructions to have wlan0 connect to my wifi, enabled ssh and nothing. Green LED stays on without flashing, and that's it. Using Raspbian Light 2017-03-02-raspbian-jessie-lite.zip.

Relevant bit of /etc/network/interfaces

Code: Select all

#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

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
    address 192.168.1.106 # IP for the Zero
    netmask 255.255.255.0
    gateway 192.168.1.1 # Your router IP
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Relevant bit of /etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

network={
  ssid="myssid"
  psk="mypassword"
  proto=RSN
  key_mgmt=WPA-PSK
  pairwise=CCMP
  auth_alg=OPEN
}

xybydy
Posts: 6
Joined: Fri Mar 03, 2017 10:52 am

Re: Pi Zero W wifi issues on Raspbian in headless mode

Sun Mar 05, 2017 2:53 pm

The new version of raspbian didn't solve my problem either. Now I can't even SSH to the device through USB cable even though I see the zero pi on network settings. No response to either [email protected] or the IP address of pi zero.

redpola
Posts: 4
Joined: Sun Mar 05, 2017 2:21 pm

Re: Pi Zero W wifi issues on Raspbian in headless mode

Sun Mar 05, 2017 3:20 pm

Ok, I made some progress on this.

Apparently I had not correctly written the microSD card and several files were full of garbage. Basically, dd was unreliable for me on my Mac using several variants of bs and output device. What worked for me was dd if=imagefile of=/dev/rdisk1 bs=8m (run as root). This quickly wrote the full image correctly.

Then I booted the zero w and the LED flashed as it booted. Success. Still no luck with the wifi though...

Next for me is to try wlan1 rather than wlan0.

Another update: Wifi is working over wlan0 and connecting but the device is grabbing a DHCP-assigned IP address. SSHD is NOT running.

xybydy
Posts: 6
Joined: Fri Mar 03, 2017 10:52 am

Re: Pi Zero W wifi issues on Raspbian in headless mode

Sun Mar 05, 2017 3:24 pm

redpola wrote:Ok, I made some progress on this.

Apparently I had not correctly written the microSD card and several files were full of garbage. Basically, dd was unreliable for me on my Mac using several variants of bs and output device. What worked for me was dd if=imagefile of=/dev/rdisk1 bs=8m (run as root). This quickly wrote the full image correctly.

Then I booted the zero w and the LED flashed as it booted. Success. Still no luck with the wifi though...

Next for me is to try wlan1 rather than wlan0.

Another update: Wifi is working over wlan0 and connecting but the device is grabbing a DHCP-assigned IP address. SSHD is NOT running.
How did you notice that dd command didn't write the image properly?

Please update me with the configurations you've done when you got zero worked.

redpola
Posts: 4
Joined: Sun Mar 05, 2017 2:21 pm

Re: Pi Zero W wifi issues on Raspbian in headless mode

Sun Mar 05, 2017 4:42 pm

Ok, so I'm finally where I want to be. I won't go into too much detail as this may be off topic re the original poster's problem.

My difficulties:
  • I didn't write the SD card correctly because OS X gave me mixed messages
  • I wasn't sure wlan0 was the correct interface, but in fact it was and this was configured correctly (at least the radio part)
  • The instructions for setting a static IP address are wrong mostly everywhere. Some process dhcpcd was ignoring /etc/network/interfaces and just using its own config file. Editing the config file for dhcpcd to assign a static IP address worked.
Why this ships with a running service which breaks all the instructions on the internet for static IP, I've no idea.

Anyway, my Zero W is not dead, my wlan0 config was correct, and now I have a happy headless Zero W with the correct static IP sitting on my network.

This was a lot more work than I expected and required considerable knowledge of how networking works to get there. If you've any ideas how I can help other people with this beyond summarising my efforts in this post then please let me know.

xybydy
Posts: 6
Joined: Fri Mar 03, 2017 10:52 am

Re: Pi Zero W wifi issues on Raspbian in headless mode

Sun Mar 05, 2017 4:58 pm

I'm finally at home. Tried the settings on your post viewtopic.php?p=1124702#p1124702 and it solved the issue. Although my settings was pretty closer to yours. Maybe my problem was the "dd" problem you've mentioned. Since I want my dhcp to set the IP, I preferred it not static though.

Here's my interfaces config file if someone needs it.
auto lo
iface lo inet loopback

iface eth0 inet manual

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

allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Thank you @redpola.

User avatar
DougieLawson
Posts: 34166
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: [SOLVED] Pi Zero W wifi issues on Raspbian in headless m

Sun Mar 05, 2017 5:06 pm

Undo all of your changes to /etc/network/interfaces. It's not done that way with Jessie.

Add

Code: Select all

#interface eth0
#static ip_address=192.168.1.107/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1 8.8.8.8
#
interface wlan0
static ip_address=192.168.1.106/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1 8.8.8.8

as appropriate
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

User avatar
rpdom
Posts: 12948
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: Pi Zero W wifi issues on Raspbian in headless mode

Sun Mar 05, 2017 6:38 pm

redpola wrote:Why this ships with a running service which breaks all the instructions on the internet for static IP, I've no idea.
Because the instructions on the internet are old and out of date. It seems nobody bothered to update them all.

redpola
Posts: 4
Joined: Sun Mar 05, 2017 2:21 pm

Re: Pi Zero W wifi issues on Raspbian in headless mode

Sun Mar 05, 2017 10:44 pm

rpdom wrote:
redpola wrote:Why this ships with a running service which breaks all the instructions on the internet for static IP, I've no idea.
Because the instructions on the internet are old and out of date. It seems nobody bothered to update them all.
I found the answer on http://raspberrypi.stackexchange.com/qu ... interfaces

And I totally agree with the first comment on that question:
Great question and something I was about to ask on #raspbian. As a Un*x admin of many years, I find this fundamental change baffling compounded by an absolute dearth of documentation. I happened to find this question after spending an hour of trial and error. I wish I'd found raspberrypi.stackexchange.com/questions/37920/… earlier – Alastair McCormack Jan 16 '16 at 14:06

Killertechno
Posts: 151
Joined: Wed Jan 02, 2013 8:28 am

Re: [SOLVED] Pi Zero W wifi issues on Raspbian in headless m

Wed Mar 15, 2017 9:49 am

Are images for Zero different from Zero W?
My Zero + external USB WiFi was correctly working, while same uSD on Zero W doesn't show me any wireless interface...

rumpu-jussi
Posts: 1
Joined: Wed Mar 22, 2017 5:18 pm

Re: [SOLVED] Pi Zero W wifi issues on Raspbian in headless m

Wed Mar 22, 2017 5:24 pm

Just my 2 cents on this:

The plain wpa_supplicant.conf didn't work for me. You know the one (also presented in one of the posts above); the one that contains only ssid and psk fields.

Only after I replicated my Pi 2's wpa_supplicant.conf into my Zero W, things started working.

Here's the file as it stands now:

Code: Select all

country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
   ssid="my-wifi-ssid"
   psk="super-secret-password"
}

xybydy
Posts: 6
Joined: Fri Mar 03, 2017 10:52 am

Re: [SOLVED] Pi Zero W wifi issues on Raspbian in headless m

Thu Mar 23, 2017 8:44 am

Killertechno wrote:Are images for Zero different from Zero W?
My Zero + external USB WiFi was correctly working, while same uSD on Zero W doesn't show me any wireless interface...
Images are the same but maybe on the first initial boot the OS sets itself up according to the device.

trosar
Posts: 2
Joined: Sun Apr 09, 2017 5:48 am

Re: [SOLVED] Pi Zero W wifi issues on Raspbian in headless m

Sun Apr 09, 2017 6:04 am

I'm stuck with no wifi connection. I downloaded and installed the latest Jessie Lite today. Connected the Pi Zero W via USB to my laptop. Opened an SSH connection and ran the below...

1. cat /sys/firmware/devicetree/base/model
Raspberry Pi Zero W Rev 1.1

2. sudo cat /etc/wpa_supplicant/wpa_supplicant.conf
country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="myNetwork"
psk="myPassword"
}

3. ifconfig -a
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:328 errors:0 dropped:0 overruns:0 frame:0
TX packets:328 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:26976 (26.3 KiB) TX bytes:26976 (26.3 KiB)

usb0 Link encap:Ethernet HWaddr c6:24:7a:dd:b2:46
inet addr:169.254.205.15 Bcast:169.254.255.255 Mask:255.255.0.0
inet6 addr: fe80::82ed:20a7:bf67:8040/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1184 errors:0 dropped:3 overruns:0 frame:0
TX packets:727 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:145826 (142.4 KiB) TX bytes:167907 (163.9 KiB)

wlan0 Link encap:Ethernet HWaddr b8:27:eb:5f:95:7e
inet6 addr: fe80::d37a:1b75:d42b:8284/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:134 errors:0 dropped:134 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:47950 (46.8 KiB) TX bytes:0 (0.0 B)


I don't seem to get an IP address. I'm using DHCP and have not updated any other files except cmdLine.txt to add the modules-load=dwc2,g_ether after rootwait.

I've rebooted a couple of times and have the same issue. No IP assigned. Am I missing something?

S0litaire
Posts: 215
Joined: Thu Dec 29, 2011 4:24 pm
Location: Ayrshire, Scotland
Contact: ICQ

Re: [SOLVED] Pi Zero W wifi issues on Raspbian in headless m

Sun Apr 09, 2017 11:35 am

Instead of :

Code: Select all

network={
ssid="myNetwork"
psk="myPassword"
}
Try this:

Code: Select all

wpa_passphrase <SSID> <SSID password>
you'll get a formatted result

Code: Select all

network={
	ssid="<SSID>"
	#psk="<SSID password>"
	psk=<a-very-long-string-of-alpha-numeric-characters-willl-be-here>
}
copy/paste it into the wpa_supplicant.conf file then stick it where required and restart the device.

That's the only way I've got it working 100% on my Pi3 and rPi0w. Good thing is you can keep the wpa-supplicant (and delete the commented-out line for security!) file and use it on other machines that require wifi access to your network using wpa. ^__^
--
Laters

Bill "Solitaire" C

Anáil nathrach, ortha bhas betha, do cheol déanta

trosar
Posts: 2
Joined: Sun Apr 09, 2017 5:48 am

Re: [SOLVED] Pi Zero W wifi issues on Raspbian in headless m

Sun Apr 09, 2017 12:58 pm

Thanks Solitaire. I solved the problem by getting some insight from your post.

The REAL issue I was having was that my network was using WEP and not WPA security. You can see the security type when you hover over the network name in windows or on the iPhone.

To solve it I ran the following
- sudo nano etc/wpa_supplicant/wpa_supplicant.conf
and replaced the network configs with
network={
ssid="myNetwork"
key_mgmt=NONE
wep_key0=myPassword
wep_tx_keyidx=0
priority=1
}

Note that the ssid needs double quotes and password is without them.

I rebooted and ifconfig shows that I'm connected now.
wlan0 Link encap:Ethernet HWaddr b8:27:eb:5f:95:7e
inet addr:192.168.1.17 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::d37a:1b75:d42b:8284/64 Scope:Link


I'm delighted with the results and hope this helps anyone else with WEP security networks. Cheers!!!

Return to “Troubleshooting”