Question

Use Case:

We have an iOS application where you can run a network test between an iOS device and its associated wireless access point to test throughput. The app can get the IP address of the iOS device just fine, but the user has to type in the IP of the access point.

Problem:

The task is to get the IP address of the associated access point, and pre fill it for the user, hence avoiding user intervention there.

My Approach:

  1. Find out the Mac Address/BSSID of the access point. I do this by employing the Captive Network API.

  2. Issue an ARP request to find out the IP associated to the access point. I haven't been able to accomplish this as of yet. Google and SO search has kind of lead me to a dead end here. Here are some similar questions: How do I query the ARP table on iPhone? AND ARP Requests on iPhone

Question:

What is the right way to do this? In fewer words, what is the best way to get the IP address of the access point an iOS device is connected to.

No correct solution

OTHER TIPS

A WiFi access point is not necessarily an IP-capable device (although many of them are, but for configuration, not communications, purposes).

Even if you do get the actual access point's IP address, how are you going to test the throughput? You could send ICMP Echo requests, but that will just give you instantaneous round-trip times, not throughput, and many IP devices, for security reasons, are configured to not respond to ICMP ECHO requests.

BSSID is unique for each SSID on each Radio and it differs from the Access Point’s Mac Address. If you compare them you can see last characters of Mac Adresses are different for BSSID and the AccessPoint.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top