Click here to Skip to main content
16,006,065 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi can any one tell me how can i scan wireless network and how many devices are connected with my wireless network(list of connected devices) using java please can any one help me..?
Posted

There is no API for that. But you can use some devices and trigger them via command line. It all depends on what Hardware/OS/Software you use.
 
Share this answer
 
Comments
Khudha Bakhsh Mari 9-Jul-12 9:05am    
hi dear
operation system may b mac,window, Linux , if you have any hint or solution please help me..thnx
TorstenH. 9-Jul-12 9:40am    
Netstumbler
AiroPeek
Ethereal

are the three tools one can use to find and decipher WLANs. Remember: it's not legal, so only practice on your own WLAN (e.g. for testing how safe it really is).
Hi dear friends I have solve this myself in this way(given below) but(one problem with this is that it is more slow),this is showing me all computers(laptop[wireless]) connected with my network but now I want to show android, BlackBerry devices connected with my network how can I do this can any one help me please.


public class NetworkPing extends JFrame{
public NetworkPing() {
}
public static void main(String[] args) throws UnknownHostException {
try {
second_testmethod();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static void second_testmethod() throws IOException{
InetAddress localhost = null;
try {
localhost = InetAddress.getLocalHost();
} catch (UnknownHostException e) {
e.printStackTrace();
}
// this code assumes IPv4 is used
byte[] ip = localhost.getAddress();
for (int i = 0; i < 255; i++)
{
ip[3] = (byte)i;
InetAddress address = InetAddress.getByAddress(ip);
if (address.isReachable(1000))
{
System.out.println("can b pinged");
// machine is turned on and can be pinged
}
else if (!address.getHostAddress().equals(address.getHostName()))
{
System.out.println("Name is......"+address.getHostName()+"\tIP is......."+address.getHostAddress());
// machine is known in a DNS lookup
}
else
{
System.out.println("nothing");
// the host address and host name are equal, meaning the host name could not be resolved
}
}
}
}//end of class
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900