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
- network - i want to use raspberry pi as an access point and get the mac address of the terminal that detected the access point
- Method for obtaining mobile phone address book, SIM card contact and calling dialing interface by Android
- Method for obtaining IP address of current server in java
- Android method for obtaining network pictures using threads
- Summary of methods for obtaining network types in iOS
- How to solve illegal network request address in iOS development
- Example of PHP obtaining IP address location information (using the pure IP database qqwrydat)
- C # Get the router's external network IP, MAC address implementation code
- C # implements the method of obtaining the absolute address of the website according to the given relative address
- network - how to learn mac address
- C # method for obtaining machine code (machine name, CPU number, hard disk number, network card mac, etc)
- network - about address conversion function of bufallo router
- i want to convert a network address structure to a string
- what is a network address structure?
- network - how to get an ip address for users in the question box
- network - why is it hard to hit an ip address directly?
- i want to obtain the host name and ip address of a pc on the company network
- network - router and ip address assignment
- network - the ip address for vpn is also assigned to the in-house pc by dhcp
- C ++ method for obtaining local network parameters such as IP, subnet mask, gateway, DNS
- objective-c - unable to submit to apple review an error has occurred please try again after a while
- objective-c - ios settings [wifi]:[blue i mark]:[ipv6 address]:meaning of two addresses displayed in [ip address]
- objective-c - i want to make an ios app that can wake up other people
- objective-c - how to display your own application in the option of the standard iphone photo application
- objective-c - i replaced uiwebview with wkwebview but received an itms-90809 email when uploading to itunes connect