First, you'll need either a thorough knowledge of Linux and a terminal app (so you can trace the connection in Linux on the phone), or external equipment (your router, if it can log connections, or a computer running Wireshark with a wifi adapter that can be put into promiscuous mode).
Then you'll have to learn how to read the logs (or Wireshark records).
Or you could hire a networking engineer to do it all for you.