Know the hotspot address.

Good day.
I have an application and I want this application to be able to get the IP address of the devices that are connected to the hotspot.
Maybe I should explain myself better.
I have a hardware device that connects to my phone through the shared connection (wifi-hotspot).
The application should be able to communicate with the hardware, but I cannot get the ip address of the hotspot interface.
I need something like this, but with the other interfaces:
useEffect (() => {
getIpAddressAsync (). then ((v) => {
let valuesArray = v.split (“.”);
let ip =
valuesArray [0] + “.” + valuesArray [1] + “.” + valuesArray [2] + “.”;
setLocalIp (ip);