Thanks for your attention.

We plan to create an iOS app using Objective-C.

Given the following conditions,
・ Device A (iPhone or iPad that runs the created app) is connected to B router (wireless LAN router) via Wifi
・ B router and C terminal (terminal that wants to exchange information with the created application, not iPhone or iPad) are connected by Wifi
・ The A terminal does not know the existence of the C terminal when the application is started
・ The IP address of C terminal is not fixed
・ We do not know what B router is used for (which manufacturer)
・ Other optional devices may be connected to the B router via Wifi
・ You can know the MAC address of C terminal in advance

I think that an IP address is required when trying to communicate from A terminal to C terminal via UDP or TCP, but the AP B router does not tell me the IP address. Is there a way for terminal A to obtain the IP address of terminal C?
If there is a method, I would like to teach you. Thank you.

  • Answer # 1

    Bonjour support cannot be done on the terminal side, and it seems that Objective-C does not use ARP as a standard.

  • Answer # 2

    As long as both routers are connected, there is no way to communicate directly.
    Let's go through a server on the Internet

    If hanging on the same router
    If you send an arp packet, you can get a MAC, so look for it.
    6 ways to find out the IP address used in the LAN (Linux/Windows)
    It looks like you can only send it to you