Question USB Tethering : How to get the connected device's ip

Shinasame

New member
May 21, 2023
3
1
3
Visit site
Recently I'm playing with a small nuc and I want to use it as a Windows sever, remote smb storage whatever, here is the thing, I want to throw monitor away, as well as keyboard and mouse, and I have a solution just with ONE LAST question to make it perfect.

Here is how I do:
Windows 10, remote controll enabled. + Android device with usb tethering function(Samsung S20)
1. Windows computer power on, no monitor needed.
2. Connect phone with computer with usb cable. Turn on usb tethering.
3.Use Termux on android and run "ifconfig", it tells me the Local ip of android is 192.168.41.55
4.(needs to be solved) Now I just need the ip of computer so I can controll it with RD Client, no monitor,keyboard, mouse needed.

I do get the ip 192.168.41.58 for the computer by using monitor before, and it works fine.
But how do I get the ip of computer suppose there is no monitor ever? Totally from andoid device.


Thanks and waiting for sulotion.
 

rvbfan

Well-known member
Jan 17, 2015
1,862
1,618
113
Visit site
Can you assign it a static IP? Use the keyboard ,mouse and monitor long enough to set it up on the computer and router, then go from there.
You didn't say what software you are using but I find freebsd to be the easiest to setup and use.
Nevermind, you're using Windows.
 
Last edited:

Shinasame

New member
May 21, 2023
3
1
3
Visit site
Can you assign it a static IP? Use the keyboard ,mouse and monitor long enough to set it up on the computer and router, then go from there.
You didn't say what software you are using but I find freebsd to be the easiest to setup and use.
Nevermind, you're using Windows.
Thank you for your reply, I tried to assign a static IP on windows, and it works fine as the dhcp does. Also once the static IP is assigned, it wont change anymore, at least between the samsung and windows I have. Anyway, thanks for helping. It took me several hours trying and finnally it is solved. Here's the solution below.
 

Shinasame

New member
May 21, 2023
3
1
3
Visit site
Problem solved! Here's the solution, hope it will do some help when someone need it.

The purpose is to controll a windows desktop using an android device, with just o ONE usb cabe.(getting rid of keyboard, mouse, and most trouble making - monitor)

Devices we need:
One windows computer with power adapter
One android phone
One usb cable to connect the to devices

Get stared:
1. windows power up
2. connect android and windows with usb cable
3. activate usb tethering on the android device
4. Download "Termux" from GitHub or FDroid, run the line 'ifconfig' to get your android phone's ip address.Screenshot_20230522_095337_Termux.jpg
Now you will get more than one ip address, the 192.168.1.210 is from my wifi router, useless, and you can identify according to your network an home.
192.168.41.55 is the one we are looking for, which means the windows desktop is also in 192.168.41. * which helps us in the next step
5.Download "Ping range of addresses" from APKPure or whereever you like, ping from 192.168.41.1 to 192.168.41.255Screenshot_20230522_112628_Ping Range of IPs.jpg6.Wait for the only one IP address reachable except for the host, here I get 192.168.1.22, which means it's the IP assigned automatically by my android to the windows

7.Now we can use "Remote Desktop" from Google Play store to controll the windows from android. Note that you should enable remote controll on windows and know the current account and password.


This will work n any two of an Android phone and a Windows device.
The android provides Keyboard, provides Mouse, provides Monitor, and provides Network.
 
Last edited:
  • Like
Reactions: B. Diddy