How to list all devices connected to your hotspot?

I am developing an application where I have to turn on the hotspot and get the information of client which connected to this hotspot.

I'm trying to get a list of ip's of all connected devices on my personal hotspot on iOS but can't seem to find any documentation on it.Hope for some tips! thanks!

Replies

iOS does not have any APIs for Personal Hotspot. You might be able to make some progress by using networking APIs to discover client devices but I’m reticent to recommend that because Personal Hotspot doesn’t guarantee that sort of connectivity (Personal Hotspot was designed solely as a way to connect the client devices to the Internet).

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thank you so much! My solution is check every IP(from 172.20.10.2 to 172.20.10.255),How do you think whether there another solution for find IP on this network?

My solution is check every IP (from 172.20.10.2 to 172.20.10.255) …

Urgh! There’s a bunch of things I don’t like about this solution but my main concern is something I wrote earlier: Personal Hotspot does not guarantee connectivity between apps running on the hotspot device and apps running on the hotspot network. That works right now, but it’s not an essential part of the Personal Hotspot product and so one could easily imagine it being blocked in the future.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

After a period of actual testing, this method has taken me too long and is not very stable. Can you give me some help? thanks!!!

Most of the help available for this is going to involve telling you why what you're trying to do is a bad idea. 😟


Here are some parts of the problem:

1. The access point knows what devices are connected to it. If you have an app that needs to know this, why aren't you using an access point modified to cooperate?

2. If you're trying to implement a peer-to-peer networking app, so that an app running on two devices on the same network can communicate, there are already frameworks set up to do that. You don't need to exhaustively scan the network to do that, either.

3. If you try to scan the local network, paranoid devices and access point implementations are going to see that as a network attack and stop you.


So why are you trying to do things the hard way?

2. If you're trying to implement a peer-to-peer networking app, so that an app running on two devices on the same network can communicate, there are already frameworks set up to do that. You don't need to exhaustively scan the network to do that, either.


How to connect wirelessly two devices, one iOS and another which is not iOS to exchange data at min speed of 8mbps? Newest Bluetooth technology is not the option for obvious reasons - too slow.

How to connect wirelessly two devices, one iOS and another which is not iOS to exchange data at min speed of 8mbps?

I recommend that you start a new thread for this question. Go to the Core OS > Networking topic area and click “Start a discussion”.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"