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 192.168.42.0/24
block. provider
, acting as router, had an IP in there, of course. When I connected wlan
, it got an IP in the 192.168.43.0/24
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 ping
ing or ssh
ing 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.
192.168.42.0/24
and192.168.43.0/24
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.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 (172.20.10.0/28) for both USB tethering and hotspot.