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
nameserver 192.168.1.1
route :
pi@raspberrypi:~ $ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 302 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 302 0 0 wlan0
netstat :
pi@raspberrypi:~ $ netstat -r | grep default
default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
pinging router :
pi@raspberrypi:~ $ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.54 icmp_seq=1 Destination Host Unreachable
From 192.168.1.54 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
update_config=1
country=BE
network={
ssid="MyRouterSSID"
psk="******************"
key_mgmt=WPA-PSK
}
ifconfig:
pi@raspberrypi:~ $ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
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 192.168.1.54 netmask 255.255.255.0 broadcast 192.168.1.255
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):
global
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
[edit]
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.
PER THE COMMUNITY'S FEEDBACK THE STATIC IP WAS CHANGED TO DHCP
ROUND 2 : AS PER COUMMUNITY RECOMMENDATIONS
- 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)
ROUND 3 :
- 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 192.168.1.51
- tried to ping the router and...it does not work...
my setup can't be more simple than this
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
github.com/raspberrypi/firmware/issues/630
apparently the router sends the wrong country code, so why is this working with all my other devices ...smartphone, RPI3, RPI4....