0

I have no issue with ethernet but wifi seems to not always work

I setup a DHCP reservation with my router, and if I look my router, I can see the raspberry pi wifi IP and mac but I can't connect to SSH or any webif of the raspberry pi (at least not always)

weirdly if I'm connecting via VNC, I can see that the SSID is connected and the IP is correct

ping seems also to work. If I ping, I'm seeing

64 bytes from 10.0.1.60: icmp_seq=0 ttl=64 time=6.787 ms
64 bytes from 10.0.1.60: icmp_seq=1 ttl=64 time=22.870 ms
64 bytes from 10.0.1.60: icmp_seq=2 ttl=64 time=4.089 ms
4
  • 1
    is ssh enabled? Commented Apr 10, 2018 at 15:19
  • Yes but I’m seems to work when I unplug the Ethernet so that’s fine
    – Kevin
    Commented Apr 10, 2018 at 15:23
  • You didn't happen to have the same IP for both ether and wifi on the pi, did you? Commented Apr 11, 2018 at 2:04
  • No, I have dhcp reservation for Wi-Fi to 10.0.1.60 and 10.0.1.40 for Ethernet that very odd, both had a normal ping from my router or my phone. but I don’t really need to connect both anyway, that was just during the setup
    – Kevin
    Commented Apr 11, 2018 at 10:32

2 Answers 2

2

This was caused by having both Ethernet and Wi-Fi connected to the Pi simultaneously. Unplugging Ethernet solved the problem and I was able to connect with Wi-Fi as expected.

1
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Commented Jan 5, 2020 at 19:56
1

Oh, this is weird... I was working on a different issue, and found something that might offer an explanation:

You can refresh the ARP cache in your PC (Mac in my case) like this:

#!/bin/sh

: ${1?"Usage: $0 ip subnet to scan. eg '192.168.1.'"}

subnet=$1
for addr in `seq 0 1 255 `; do
( ping -c 3 -t 5 $subnet$addr > /dev/null ) &
done

This script (call it pingpong.sh), simply pings all possible IP addresses in your subnet, just in order to refresh your host's ARP cache. Once the cache is refreshed, do this to learn what IP address your Raspberry Pi has been assigned:

arp -a | grep b8:27:eb  [see Note 1 below]

I have an RPi 3B+ on which WiFi is enabled, and the Ethernet port is jacked into my switch. Here's what I see as output from the above:

? (192.168.1.27) at b8:27:eb:cd:2f:ff on en0 ifscope [ethernet]
? (192.168.1.28) at b8:27:eb:cd:2f:ff on en0 ifscope [ethernet] 

I'm surprised and confused to learn that both WiFI and Ethernet have the same MAC address. It seems to me this could lead to confusion, but I'm not sure. Anyway, just be aware of it I guess - that's my answer... and my question :)


EDITED 20200104
NOTE 1: As of the RPi ver 4B, the OUI has changed FROM: b8:27:eb TO: dc:a6:32. The arp command to find either is:

arp -a |grep -E --ignore-case 'b8:27:eb|dc:a6:32'

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.