Programmatically find the IP address of the desktop over USB tethering

限于喜欢 提交于 2019-12-08 18:49:27

With USB tethering it seems that all android devices use the same static addresses, the android device using tcpdump is 192.168.42.129

The attached device will get a DHCP provided address in the same address range.

I listen to a port on my android app and have a udev rule to push the dhclient address back to that port on my app.

AFAIK, in usb tethering mode the phone is acting as the computer's modem, so the PC's IP would be the phone's IP.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!