2

I have a Raspberry Pi 3 running raspbian-lite stretch(9.4) with updates installed. Sometimes when I have the following:

  • Connected through serial (or via the on the lan IP address)
  • ifconfig shows a correct address for wlan0,
  • iwconfig shows it is connected to the wifi (power management is off)

So, when I try to ping to wlan0 ip the Pi it does not respond. Even if I search it on the access point, it appears not to be connected. However, at some point the Pi appears on the router and starts responding to the pings.

Any ideas where to look?

  • Power issues
  • Configurations?
  • Logs? (I have looked in /var/log/messages, dmesg)
  • How can I get some more debugging info?
8
  • I'm assuming that you have some sort of console access to this pi, probably via the serial connection. Can you use a browser or wget to or even ping to see if there is a connection to any other machine on your network, either by ip address or ip name? And why isn't restarting the router an option?
    – NomadMaker
    Commented Jun 13, 2018 at 12:00
  • @NomadMaker Actually I am connected to the Pi via ssh using its ethernet connection. The problem is that the wifi address is not responding. So pinging still works as the ethernet interface is there. However, I can askubuntu.com/questions/99411/… and let you know. The problem is the problem is not persistent and I have to wait for it to occur
    – akarapatis
    Commented Jun 13, 2018 at 12:16
  • @NomadMaker As for not rebooting the access point. At the moment I want to rule out any issues related to the Pi. Other Pi's that are connected to the AP do not appear to have this issue
    – akarapatis
    Commented Jun 13, 2018 at 12:20
  • Duplicate ip address? What channels are you using? You have two interfaces wlan0 and eth0, maybe it's a routing issue? Check with ip route. What's about ping from the raspi to the router, to other devices? Check from specific interface with ping -I wlan0 <ip-address>.
    – Ingo
    Commented Jun 13, 2018 at 14:22
  • 1
    If your hotspot associate dynamically to channels greater than 11 from time to time, your raspi doesn't support it.
    – Ingo
    Commented Jun 13, 2018 at 16:31

4 Answers 4

1

Are you sure you are getting a default gateway from your router?

Check with ip route command in terminal.

pi@raspberrypi:~ $ ip route
172.16.31.0/24 dev wlan0 proto dhcp scope link src 172.16.31.138 metric 303 

I just saw that my raspberry pi didn't get a default route.

Then just add it with sudo ip route add default via 172.16.31.1

0

What does the wifi bar at the top say?

  1. Have you tried forgetting password then re entering

  2. Restarting router

1
  • It is rasbian-lite and I am connected via serial 1. Password is stored in /etc/wpa_supplicant/wpa_supplicant.conf 2. Restarting router is not an option, and that is not the problem since other devices ( other pi's as well) do not have this issue
    – akarapatis
    Commented Jun 13, 2018 at 11:37
0

I haven't found yet a permanent solution. Currently I ensure the following:

  1. Do not have simultaneous wlan and eth connections. If I do, then connect via eth
  2. Ensure that the ip configurations are using the correct subnet
0

You say the ethernet and wifi are two different subnets. Are you pinging both from the same host, if so you could have some interesting routing going on. Is there any chance to get console access on the pi and try pinging from there to hosts on ethernet and wifi with only one connected at a time, and then try both together?

Can you also also try pinging from another host to the Pi on each network by themselves with any link bewteen the two networks blocked. Or set up temporary test networks for it to connect to if you can't play with the current ones?

I also presume you're not trying to use the Pi as a bridge or router itself, or have been playing with static routes. And you only have a default gateway configured on one interface?

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.