Wifi enabled device list

List connected devices to Android phone working as WiFi Access point

Is there a way in Android API to list connected devices, when Android phone is acting as WiFi router? And also is there a way to interefere with routed request to serve a welcome/login page?

1 Answer 1

This is an answer from another stackoverflow question, I read it before two month and don´t know from which user the answer is from, but this should work. WifiManager gives You what You need:

import java.util.ArrayList; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; import com.whitebyte.hotspotclients.R; import com.whitebyte.wifihotspotutils.ClientScanResult; import com.whitebyte.wifihotspotutils.WifiApManager; public class Main extends Activity < TextView textView1; WifiApManager wifiApManager; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) < super.onCreate(savedInstanceState); setContentView(R.layout.main); textView1 = (TextView) findViewById(R.id.textView1); wifiApManager = new WifiApManager(this); scan(); >private void scan() < ArrayListclients = wifiApManager.getClientList(false); textView1.append("Clients: \n"); for (ClientScanResult clientScanResult : clients) < textView1.append("####################\n"); textView1.append("IpAddr: " + clientScanResult.getIpAddr() + "\n"); textView1.append("Device: " + clientScanResult.getDevice() + "\n"); textView1.append("HWAddr: " + clientScanResult.getHWAddr() + "\n"); textView1.append("isReachable: " + clientScanResult.isReachable() + "\n"); >> 
public class ClientScanResult < private String IpAddr; private String HWAddr; private String Device; private boolean isReachable; public ClientScanResult(String ipAddr, String hWAddr, String device, boolean isReachable) < super(); IpAddr = ipAddr; HWAddr = hWAddr; Device = device; this.setReachable(isReachable); >public String getIpAddr() < return IpAddr; >public void setIpAddr(String ipAddr) < IpAddr = ipAddr; >public String getHWAddr() < return HWAddr; >public void setHWAddr(String hWAddr) < HWAddr = hWAddr; >public String getDevice() < return Device; >public void setDevice(String device) < Device = device; >public void setReachable(boolean isReachable) < this.isReachable = isReachable; >public boolean isReachable()
 public enum WIFI_AP_STATE
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.lang.reflect.Method; import java.net.InetAddress; import java.util.ArrayList; import android.content.Context; import android.net.wifi.WifiConfiguration; import android.net.wifi.WifiManager; import android.util.Log; public class WifiApManager < private final WifiManager mWifiManager; public WifiApManager(Context context) < mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); >/** * Gets a list of the clients connected to the Hotspot, reachable timeout is 300 * @param onlyReachables if the list should contain unreachable (probably disconnected) clients, otherwise * @return ArrayList of */ public ArrayList getClientList(boolean onlyReachables) < return getClientList(onlyReachables, 300); >/** * Gets a list of the clients connected to the Hotspot * @param onlyReachables if the list should contain unreachable (probably disconnected) clients, otherwise * @param reachableTimeout Reachable Timout in miliseconds * @return ArrayList of */ public ArrayList getClientList(boolean onlyReachables, int reachableTimeout) < BufferedReader br = null; ArrayListresult = null; try < result = new ArrayList(); br = new BufferedReader(new FileReader("/proc/net/arp")); String line; while ((line = br.readLine()) != null) < String[] splitted = line.split(" +"); if ((splitted != null) && (splitted.length >= 4)) < // Basic sanity check String mac = splitted[3]; if (mac.matches(". ")) < boolean isReachable = InetAddress.getByName(splitted[0]).isReachable(reachableTimeout); if (!onlyReachables || isReachable) < result.add(new ClientScanResult(splitted[0], splitted[3], splitted[5], isReachable)); >> > > > catch (Exception e) < Log.e(this.getClass().toString(), e.getMessage()); >finally < try < br.close(); >catch (IOException e) < Log.e(this.getClass().toString(), e.getMessage()); >> return result; > > 

Источник

How to Check Devices Connected to WiFi

How to Check Devices Connected to WiFi

Are freeloading neighbors connecting to your Wi-Fi network without your permission? Or are your kids secretly connected to the WiFi under your nose? Whatever the situation, it is essential to know who or what devices are connected to your Wi-Fi network. Unwelcomed access to your Wi-Fi can not only slow down your internet speeds, but it’s also a privacy concern.

Читайте также:  Сеть управления скоростью wi fi

As such, for this article, we have put together a detailed guide on how you can use your computer or router to always keep an eye on all devices connected to your Wi-Fi network. So without wasting any more time, let’s get started:

Access your Router’s Web Backend Dashboard

Each router has a dedicated web interface or a backend dashboard that you can enter through your browser to access its settings and configurations. This is where you will find the most accurate data on all the devices connected to your network.

That being said, not all routers give you a way to check the list of connected devices. However, if you use a router from a famous, well-known brand, you should have the option.

Conventionally, you need to type in your IP address into the browser address bar Here’s a detailed guide to help you access your Wi-Fi router’s backend dashboard.

Now, depending on your router’s manufacturer, the exact position of all the settings will vary. As such, we have put together a detailed guide on how to find the list of connected devices on your network for different popular router brands.

Where to Find the List of Connected Devices on your Router

As we stated earlier, almost all popular router manufacturers include an option to let you view a list of connected devices.

In case your router supports this feature, it should be labeled under the following three tags – “Connected Device Name,” “Attached Device,” or “DHCP Client” or something of that sort.

Also, the option isn’t always readily available on the front page. Instead, it is generally buried beneath other settings, often under the WiFi Configuration Page.

Now, it’s beyond the scope of this tutorial to show you how to access the list of connected devices on all router models. However, we have a short guide on accessing this on a few popular models like D-Link, Netgear, Linksys, and Comcast Xfinity.

Comcast Xfinity Routers

For Comcast Xfinity routers, you will find an option called “Connected Devices” in the lefthand sidebar, where you will find the list of all connected devices to your WiFi network.

With D-Link routers, you can find the list of connected devices by navigating to Status > Wireless.

Linksys Routers

Linksys Routers have the “DHCP Clients Tablet option,” and it’s accessible under Status > Local Network.

Netgear Routers

If you are using a Netgear router, you should find the option under “Attached Devices” located in the lefthand sidebar.

How to Interpret this “List” of connected devices?

Although these routers will show you a list of all connected devices, they aren’t intelligible. The thing is, the list will contain all the DHCP Client information. It won’t give you an exact name of the connected device but instead tell you its IP address (just numbers), MAC address (alphanumeric characters), and sometimes its hostname.

It can be hard to precisely know what devices are connected to your network from this data alone. However, it is still helpful information that you can use to your advantage.

First of all, you can take note of the total number of connected devices. Now compare it to how many devices you know are connected to your Wi-Fi network. If the number of connected devices is more, then you know someone is accessing your home network without your permission.

Читайте также:  Усиление wi fi сигнала банками

Second, you can start switching off your Wi-Fi-enabled devices one after the other. Turning off one device will make it disappear from the list. This will let you know the MAC address and IP address of that device. Alternatively, you can also look for the MAC address of your devices and compare it to the ones shown on the list. Here’s a guide on how to find the MAC address for your device.

That being said, looking at a list of DHCP clients isn’t a foolproof way to know which devices are connected to your network. Here is a quick look at some of the cons and security issues that you might face:

  • Someone might change their hostname, so you won’t be able to know what devices are connected to your network.
  • Hackers can also change the MAC addresses of their devices. They can also copy the MAC addresses of one of the devices you own. In that case, your device won’t connect to your network as the router doesn’t allow two devices with the same MAC address to connect.
  • If the hacker sets up a static IP configuration for their device, it will not appear on the DHCP client list.

As such, although convenient and straightforward, checking the DHCP client list on your router’s backend isn’t the best way to know which devices are connected to your Wi-Fi network.

Scan Your Wi-Fi Network Using a Dedicated Software

You can use third-party software to scan your Wi-Fi network and find suspicious devices. First, you need to install the tool on your computer, and it will scan your Wi-Fi network and give you a list of all connected devices that are currently online and active on your network.

Now, there is a lot of this software on the market. However, we mostly recommend Glasswire – a freemium tool, and Wireless Network Watcher – a free alternative for our readers.

For the sake of this guide, we will show you how you can use Wireless Network Watcher to keep an eye on your Wi-Fi network.

The main benefit of using Wireless Network Watcher is that it’s completely free with no nagging screens that ask you to upgrade. Also, you don’t need to install the software on your system. Instead, just download it, and launch it, and it will start scanning your Wi-Fi network for active devices.

Once it’s done scanning, it will show you the device names, MAC address, and the manufacturer of the device’s Wi-Fi network hardware – which is an instrumental piece of information for identifying devices.

Disclaimer: In some cases, the tool might not work correctly. In that situation, you need to specify your Wi-Fi network adapter. To do this, open Wireless Network Watcher and go to Options > Advanced Options. Now, under the “Use the following network adapter” setting, choose your physical Wi-Fi adapter. After configuring this setting, run your network scan, and it should run perfectly.

Better your WiFi Network Security

After scanning your network, if you find someone stealing your Wi-Fi, there is no need to get too terrified or unnecessarily worried. Now that you know the intruder’s device’s MAC address or IP address, you can head back into your router’s backend panel and kick them out of your network.

Alternatively, you can also change your Wi-Fi password to something longer and more secure. Also, remember to choose WPA2 for your password type, which makes it extremely difficult to crack. Once you change your password, all connected devices will be kicked out of your network. Now, log in with your devices, and you don’t need to worry about other users connecting since you have a strong password in place.

Читайте также:  Вай фай от macbook air

Also, apart from a strong password, you can take other precautions to ensure your Wi-Fi network isn’t easily broken into. You know how the saying goes – “prevention is better than cure.”

First, if your router supports WPS, disable it, as it’s a security risk.

Second, when sharing your WiFi network with guests or your neighbor when they ask for it, don’t let them log in to your leading home network. Instead, create a guest network. That way, they will never know the password for your home network, and you can monitor the guest network separately.

Hedayat S

Hedayat is the new Editor-in-Chief of Rottenwifi and has been writing about computer networking since 2012. Hedayat’s strong background in computer science helped him cement his position in the ever-expanding tech blogging world. As a network engineer, systems administrator, and systems analyst during his decade-long career in Information Technology, he has a passion for the internet & technology in his DNA.

Blog.rottenwifi.com is a participant in the Amazon Services LLC Associates Program which means we may get paid commissions on editorially chosen products purchased through our links to retailer sites. All names, logos, brands, and images are trademarks or copyrighted materials of their respective owners. Amazon and the Amazon logo are trademarks of Amazon.com, Inc., or its affiliates.

Источник

Find wifi enabled devices [stations] around [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

Imagine this situation that there are some smartphones and computer around with their WiFi adapter (wireless adapters) on, but not necessary connected to a network. Is there a way to look the MAC addresses via a Linux machine? Any insights are appreciated.

2 Answers 2

Disconnected clients aren’t always silent. In fact, more often than not, clients send out directed and broadcast probe requests searching for access points they have connected to previously, thus revealing their MAC addresses which can be displayed through airodump-ng or by filtering capture packets in Wireshark to display probe requests. This is the suitable Wireshark filter:

Old question, but i’ll have a go anyway.

Wifi enabled devices usually send probe requests to try to find Access points they previously have been connected to, even when they are nowhere near them.

If you’re using backtrack/kali linux, try this:

Create a wireless adapter alias running in monitor mode (assuming your adapter name is wlan0):

Start scanning for devices and access points:

The access points will be listed first with their Mac addresses under «BSSID», followed by the devices which will have their MAC addresses listed under «STATION» and a «not associated» flag under «BSSID» if they aren’t connected to an access point.

Источник

Оцените статью
Adblock
detector