I carry my phone and laptop with me everywhere, and I have many software solutions that communicate through Wi-Fi. (For example, I can play/stop/pause the music on my laptop using my cell phone).
I'd like a way for my laptop to automatically discover the new IP address of my phone upon joining a new network, like a coffee shop for instance. I could just assign a static IP to my phone, but I'd prefer to keep DHCP.
I'm thinking maybe a script that executes an arp-scan? My phone's MAC address is static, obviously. Then sets an environment variable?
I could run this script after I have seen that my phone is connected.
Just where my head is going. Thanks for your advice.