Problem: nothing passes through the wlan0 (wifi) connection:

  • from my PC, no VNC, no ssh working either (works on eth0)
  • I cannot ping the router from the RPI shell either
  • I cannot go to the internet
  • I have setup a static IP lease on the wlan0 & eth0 MAC address
  • I even tried setting my router to 2.4GHz only, it does not work

The default gateway points to the router ip:

pi@raspberrypi:~ $ cat /etc/resolv.conf
# Generated by resolvconf
domain sitecom.router

route :

pi@raspberrypi:~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    302    0        0 wlan0   U     302    0        0 wlan0

netstat :

pi@raspberrypi:~ $ netstat -r | grep default
default         UG        0 0          0 wlan0

pinging router :

pi@raspberrypi:~ $ ping
PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Host Unreachable
From icmp_seq=2 Destination Host Unreachable

checked wlan0 :

pi@raspberrypi:~ $ iw dev wlan0 info
Interface wlan0
    ifindex 2
    wdev 0x1
    addr b8:27:eb:4a:33:33
    ssid MyRouterSSID
    type managed
    wiphy 0
    channel 13 (2472 MHz), width: 20 MHz, center1: 2472 MHz
    txpower 31.00 dBm

pi@raspberrypi:~ $ iw dev wlan0 link
Connected to 64:d1:a3:4a:5a:79 (on wlan0)
    SSID: MyRouterSSID
    freq: 2472
    RX: 14784 bytes (136 packets)
    TX: 77120 bytes (672 packets)
    signal: -29 dBm
    rx bitrate: 1.0 MBit/s
    tx bitrate: 5.5 MBit/s

    bss flags:  short-slot-time
    dtim period:    1
    beacon int: 100

checked wpa conf :

pi@raspberrypi:~ $ cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev



pi@raspberrypi:~ $ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet  netmask
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 36448  bytes 125276811 (119.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 36448  bytes 125276811 (119.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 fe80::6b29:3275:cfb8:b8cc  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:4a:33:33  txqueuelen 1000  (Ethernet)
        RX packets 165  bytes 23589 (23.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 486  bytes 72311 (70.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

iw reg get,on rpi zero (and on rpi3 that does'nt have any issue):

country CN: DFS-FCC
    (2402 - 2482 @ 40), (N/A, 20), (N/A)
    (5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
    (5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
    (5735 - 5835 @ 80), (N/A, 30), (N/A)
    (57240 - 59400 @ 2160), (N/A, 28), (N/A)
    (59400 - 63720 @ 2160), (N/A, 44), (N/A)
    (63720 - 65880 @ 2160), (N/A, 28), (N/A)

I am out of ideas, please help me, I really need my pi zero to be accessed headless

thanks in advance


I use a Sitecom AC750 Router :

  • 2.4Ghz (B+G+N)
  • channel : auto

the main (only) RPI usb port is linked to a hub

I use an ethernet USB dongle and

so far I tried :

  • forcing the channel to 1
  • an additional USB WIFI dongle (ODROID)
  • removed the odroid dongle, removed the static ip on wlan0

still the same issue.


enter image description here


  • I unplugged the eth dongle
  • I use a monitor on the HDMI output
  • I checked dmesg, /var/log/messages, and /var/log/syslog. this is what happen when running sudo ip link set wlan0 down/up

(I dont see any relevant info, I'll now create a new sd card)

enter image description here


  • I did a full format of my 16gb sandisk with https://www.sdcard.org/downloads/formatter/
  • I burned the image 2019-09-26-raspbian-buster.img with https://www.balena.io/etcher/ (I usually use Win32DiskImager-odroid-v1.3, that supposably double checks each writing cycle, never had any problem with it)
  • did not do any update/upgrade, just first boot setup, checked the ip, usual
  • tried to ping the router and...it does not work...

my setup can't be more simple than this

enter image description here

I'd be tempted to think I killed the wifi ship soldering the header, but I get an IP,

  • just installed a terminal on my android phone, I can ping the router....

(next step : I am getting a wizard and maybe an exorcist too...)

ROUND 4 : I received the new PI

I just found out that putting down the wlan0 interface, iw reg get shows

country BE: DFS-ETSI

then, once I bring back up the interface, iw reg get shows

country CN: DFS-FCC

I found this but it does not say how to solve it


apparently the router sends the wrong country code, so why is this working with all my other devices ...smartphone, RPI3, RPI4....

  • Please identify the MAC address of your wireless adapter. I added the statement "PER THE COMMUNITY'S FEEDBACK THE STATIC IP WAS CHANGED TO DHCP" above the screenshot. Only you can ensure that it is position correctly. Test results above the statement would be STATIC IP related and test results below the statement would be DHCP related. Now that you are using DHCP: when testing the wireless, be sure that the ethernet is disconnected when DHCP assigns IP address (boot time). Best to reboot with ethernet disconnected, then test wireless.
    – gatorback
    Feb 15, 2020 at 15:25
  • Have you tried connecting the Pi to a TV to setup and test the wifi from the Raspbian GUI? This is an easy fast & fast test: especially coming from a fresh Raspbian flash of the SD card. raspberrypi.org/documentation/configuration/wireless/desktop.md
    – gatorback
    Feb 15, 2020 at 15:30
  • I did put down the wlan0 and brought it back up, I tried rebooting too, dhcp works fine, still cannot pigng the router, I never encountered such a case
    – phil
    Feb 15, 2020 at 15:57
  • I either use an ethernet dongle to debug it or I plug it to a pc hdmi screen
    – phil
    Feb 15, 2020 at 15:57
  • I strongly, strongly suggest removing the ethernet dongle, reboot and test \ debug from a Raspbian console (connect HDMI and USB keyboard). I have edited my Answer this morning and would be interested in the test results. My hunch is that your hardware is good and that the problem lies on the SD card
    – gatorback
    Feb 15, 2020 at 16:01

5 Answers 5


There is a high correlation between Questions which state "I have setup a static IP lease" and XXX doesn't work.

You have listed lots of files, but not provided any information which would enable anyone to answer.

What did YOU do? - in particular HOW did you set "a static IP lease".

I recommend you remove the attempt to set "static IP addresses" and let your router do its job.

If you REALLY insist on static IP addresses (which are totally unnecessary except in a few circumstances) do it properly.
See How to set up Static IP Address

Or to setup networking properly How to set up networking/WiFi

  • Comments are not for extended discussion; this conversation has been moved to chat.
    – goldilocks
    Feb 16, 2020 at 13:23

With iw dev wlan0 info you show that you are using:

channel 13 (2472 MHz), width: 20 MHz, center1: 2472 MHz

I remember that I had problems some times ago with connections using channels above 11. Since then I only use channels up to 11. I'm unsure if it also an issue for you because you have a link shown with iw dev wlan0 link but maybe there is a problem with key negotiation or with the regulatory domain set with country=BE in /etc/wpa_supplicant/wpa_supplicant.conf. You can get info about the latter withiw reg get.

Anyway, it's worth a try just to use a channel up to 11. The channel to use is configured on the hotspot/access point.

  • how do you change the channel ?
    – phil
    Feb 14, 2020 at 15:32
  • note that I only have that issue with the pi zero...my other raspbery pi 3 & 4 work seamlessly on eth0 and wlan0
    – phil
    Feb 14, 2020 at 15:40
  • @phil The channel to use is configured on the hotspot/access point.
    – Ingo
    Feb 14, 2020 at 16:08
  • I tried channel one, same issue, I tried an odroid wifi dongle (that I know to be working) and still the same problem, so I suspect something wrong with the software (RPI or router), I'll try my old odroid board, but I am pretty sure it worked back in the day
    – phil
    Feb 15, 2020 at 8:17
  • I added teh output of iw reg get
    – phil
    Feb 15, 2020 at 12:04

At least your PI was able to get an IP address ( as per your screenshot). So the radio link is working although it may not be perfect. Looks more like a routing issue than a hardware issue. If you type ifconfig you should see the same address now or you still have an issue. What is your /etc/network/interfaces file like ?

One thing: your output of iw reg get says China, but your location is Belgium so I would do this: iw reg set BE. Also, I am wondering if you restarted both PI and router after making all those changes. Sometimes that's all it takes. There might be a bad route or stale IP address cached on either end.

I am also wondering if your router has some debugging tools (I had a quick look at the manual but didn't see anything). If you can, try to ping the PI from the router to check if the ping at least works in that direction, and verify that the PI is reachable.

Last but not least, check your logs on the PI ie dmesg, /var/log/messages and /var/log/syslog.

  • @phil if you are going to check the logs, I suggest copying and pasting them to pastebin.com so that you can post a link to them and ask questions.
    – gatorback
    Feb 15, 2020 at 14:47
  • I think Phil has ethernet and wifi adapters: if this is correct then we must first confirm that is wifi and not ethernet?
    – gatorback
    Feb 15, 2020 at 15:12
  • yep so I have a ethernet adapter, ip is..58, the built in wlan0 is 51 and the other odroid wifi dongle, I forgot
    – phil
    Feb 15, 2020 at 15:55
  • @phil That is very important information and needs to be in your original post. Important facts should be in the OP and not buried in a comment
    – gatorback
    Feb 15, 2020 at 16:14
  • If there is an additional USB/wired ethernet adapter on the RPi Zero then it is dead and has no functionality according to the output of ifconfig and routing table. But the DHCP server has given an ip address Sorry, but the hole thing gets more and more mysterious.
    – Ingo
    Feb 15, 2020 at 23:44

I recommend trying to verify hardware is working: DHCP requires communication between the wifi adapter and the router, otherwise it can not be assigned an IP address. If you can confirm the wifi's MAC address was received by the router, then the wifi's transmit side is working.

If you had a second Zero-W with functional wifi, you could transfer the SD card and expect it to work in the system under evaluation.

My experience tells me that you would be better off to:

  1. Disconnect the ethernet dongle from the Zero-W
  2. Flash a different Raspbian version to a new/different SD card and install SD-Card
  3. Connect the Zero-W to a keyboard and monitor THEN
  4. Configure wifi from the Raspbian GUI per instructions:
  5. Identify & Test DHCP issued address
    • ping gateway from rPi
    • nslookup yahoo.com's IP address and ping that number from rPi
    • ping rPi's IP address from another LAN connected PC
  6. Post the current (Ampere) rating of your 5V power source and compare it to the requirement

There are all kinds of ways to misconfigure a wifi connection, which is why I recommended starting 'fresh': your observations are very unusual: a DHCP LAN address is assigned to the wifi adapter, however, communication between wifi and another point fails. DNS failures can be ruled out by using IP addresses and not FQDNs.

  • it's a fresh install and brand new card..bakc in the day , people recomended using an ethernet dongle...I see now the wifi issues are still not fixed on RPI zero...that thing newer worked over wifi
    – phil
    Feb 14, 2020 at 15:31
  • and I did a dist upgrade
    – phil
    Feb 14, 2020 at 15:32
  • Did you try configure wifi via raspi-config? raspberrypi.org/documentation/configuration/wireless/… My device is rPi-ZW with built-in wifi. I suggest that you update your original post with a separate & full list of hardware. Have you had success setting up a LAN connection with this device in the past?
    – gatorback
    Feb 14, 2020 at 16:33
  • it's just a simple router, all my other devices work on wifi without issue
    – phil
    Feb 14, 2020 at 23:10
  • I'll remove all static lease and give it a try, but I did that a year ago, and it never worked..I am already considering buying a new RPI zero,the one I got just never been able to connect through wlan0 since day one
    – phil
    Feb 14, 2020 at 23:11

I faced the same issue with my Pi Zero, it's well connected to Wifi as I can see its assigned IP in the DHCP list, but I can not access the Pi using SSH.

It's solved simply by replacing its power source, I realized that the issue was due to insufficient ampere in the first power supply I used.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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