1

I have recently started having issues with a laptop device (running Ubuntu 22.04) on the local WiFi network being unable to connect to two separate Android devices (both running SSHelper). On my first attempt, when I tried to ping android1 from laptop, I kept getting the error "Destination Host Unreachable". But when I tried to ping laptop from android1 after about 5 or 10 of the same error message, suddenly it started working!

But then when I tried the same approach from laptop to android2, it did not work. After pulling a bunch of hairs I thought to try manually adding the MAC address of android2 to the ARP table on laptop (arp -s) and suddenly it started working! A couple of hours later I tried to connect from laptop to android2 and it wasn't working again. The ARP table was still in the same state. This time I was able to get it to work by adding the MAC address of laptop to the ARP table on android2! (Fortunately android2 is a rootable device!)

While this is a workaround until I get to the bottom of why it doesn't work, it doesn't solve the problem longer term. In addition, it seems like every workaround I find stops working after while and I am about of things to try! How can I trouble shoot the issue? I've already tried rebooting all devices (this is actually the first thing I tried as in the past I seem to recall it did work), I have looked at the network routes, the subnet masks, the ARP table (which says "incomplete" until I manually force it in there.) I feel like there may be some issue with broadcast packets or something - could it be possible that there is an issue with the WiFi network?

1 Answer 1

1

ARP is probably failing because multicast (which, in the context of Wi-Fi, includes broadcast) is failing because of a buggy implementation, possibly in your Android devices Wi-Fi drivers, or possibly in your AP (wireless router). Multicast is tricky on Wi-Fi and there have been lots of buggy implementations out there, in both APs and clients.

Pinging the subnet broadcast address or the all-hosts multicast address (224.0.0.1), from various clients, and seeing who does or doesn't respond in each case, might shed some light on whether or not multicast is working (caveat: Windows doesn't always like to respond to broadcast or multicast pings for policy reasons unfortunately, so don't be surprised if you don't get responses from Windows devices).

If multicast is indeed broken, rebooting your AP may clear up the problem for a while until something breaks again. Even if the bug is in the clients, rebooting the AP forces them to reconnect, which can reset things for a while.

Another test would be to temporarily run with no wireless security. The trickiest part of multicast on Wi-Fi has to do with the security crypto. So if disabling security makes the problem go away (not just temporarily) then it points to a buggy WPA2 implementation somewhere. When you turn your security back on, be sure to use WPA2 (or later) only. That is, AES-CCMP only. Original WPA (TKIP) should not be enabled or available in any way. Same goes for WEP.

If it's a multicast breakage but not security, it could be your AP's multicast rate setting. Make sure it's set to a rate low enough to be received reliably by all devices on your network. Or temporarily just set it down to the lowest possible rate (1Mbps on 2.4GHz b/g/n/ax, 6Mbps on 5GHz a/n/ac/ax).

One last potential cause of multicast breakage on Wi-Fi is too much multicast traffic. If you're doing any kind of multicast streaming on your wired Ethernet LAN, make sure you've enabled your AP's "IGMP Snooping" feature to prevent it from flooding onto your Wi-Fi network.

1
  • i didn't mention this in my original question because I wasn't sure how many devices I should expect to respond to a broadcast ping, but at the time I was seeing only 1 or 2 replies from either device (laptop/android2). I tried enabling IGMP snoop but that seemed to break an Apple TV that was on the network hard, and it took some time for it to "see" the network again even after disabling snoop. However, apparently the AP also rebooted itself a couple times as part of turn it on and back off and a broadcast ping now gets 6 or 7 replies.
    – Michael
    Jun 26, 2022 at 18:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .