Do Wi-Fi hotspots have an IP address?

I am trying to create an application that can connect from a mobile device to a Wi-Fi controller. Planning for a socket connection (multicast) ... The only values ​​I can get through the Wi-Fi Wi-Fi interface are SSID and BSSID. Can someone tell me if I should continue these values ​​or should I connect with an IP address? If I have to connect to the BSSID .. how do I do this?

+2
source share
1 answer

Wi-Fi access points should not have an IP address, no more than wired switches and hubs. However, a large number of operations, since they also operate at the IP level as DHCP servers and network gateways.

What exactly are you trying to do? This doesn't seem to be the Wifi hotspot you need to talk to.

If it supports TCP and UDP, it will of course have an IP address. It will not be directly searchable from the Wifi API, and you will need other means to detect this. It is difficult to say what exactly would be a reasonable way to do this without knowing what an AP is and what services it provides.

Common ways to list the services provided on a network include DHCP ; multicast DNS / DNS service discovery , which is used by Bonjour and Zeroconf ), SSDP and uPnP and, of course, static configuration.

I am not familiar with the Android network APIs to recommend anything, although http://jmdns.sourceforge.net/ seems to be suitable for use in Java with the multicast DNS library.

+3
source

Source: https://habr.com/ru/post/1492826/


All Articles