Here I have one Android phone, the provider, a device, usb, connecting to it through USB tethering, and a device wlan connecting through WLAN hotspot.

So once usb connected, it got assigned an IP in the block. provider, acting as router, had an IP in there, of course. When I connected wlan, it got an IP in the block, and provider had one IP in there too.

Now, I can't see the other from either device, either by scanning both blocks, or by directly pinging or sshing into the other device. All I can see is the device I'm operating on, and the two gateways, which are essentialy the same provider.

I suspected it's a limitation of the ROM I used at first, but after flashing a custom ROM the problem persists. Is this a native limitation of the Android OS? As far as I remember iOS didnt't have this problem, and a USB tethered device can communicate with a WLAN connected one. Thank you.

  • It's because hosts on different subnets cannot communicate with each other. and are two different subnets. iOS might be using same subnet for both USB tethering and hotspot, I'm not aware of. Or you can add a static route to setup Routing Between Multiple Subnets. Your question is more about networking than Android. Jul 6, 2020 at 6:14
  • @IrfanLatif Thanks for pointing out! You're right about subnet communications. However, after adding a route on one of the devices, with the gateway being either address of provider, it can still not ping the other. I'll go further to figure out. It also seems true that iOS uses the same subnet ( for both USB tethering and hotspot. Jul 6, 2020 at 7:13
  • Here is a solution, and the question is largely the same. Jul 6, 2020 at 13:27
  • Adding some routes or setting up proxy ARP is better than using third party tools to divert the traffic in userspace. Jul 6, 2020 at 16:07
  • Agreed. I'll try and find a way. Jul 8, 2020 at 14:01


You must log in to answer this question.

Browse other questions tagged .