How to get the IP address of the associated access point on an iOS device
Asked Answered
A

2

5

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.

Amaurosis answered 21/2, 2014 at 21:25 Comment(2)
https://mcmap.net/q/726829/-how-to-get-the-wifi-gateway-address-on-the-iphone-duplicateWhenever
There is no such thing as an "ARP request to find IP". ARP is used to find MAC addresses. Look for RARP.Phosphoprotein
T
0

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.

Tocantins answered 14/12, 2014 at 13:54 Comment(0)
S
0

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.

Subconscious answered 16/8, 2022 at 18:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.