Java Wireless

Started by
2 comments, last by rip-off 14 years, 9 months ago
Hello, I am trying to create a java program to search and find any devices using the wireless technology. I guess java.net would be the place to start, I bet java has something already implemented, but is there anything I could read to improve my skills in that area? I want ultimately to make a program that will find the devices (eg. a network) and connect to them etc.
Advertisement
Quote:
I am trying to create a java program to search and find any devices
using the wireless technology.

Using which wireless technology?

Quote:
I want ultimately to make a program that will find the devices (eg. a network) and connect to them etc.

What kind of devices?
The wifi(WLAN) of a computer.

Devices that connect with wifi.
From your computers perspective, there is no difference between these devices and devices on a physical network. You could use UDP broadcasts to discover services (if those services support it). Alternatively, some kind of port scan could be used to discover devices.

I can't help you with connecting to the devices. Each device has none or more totally unrelated services. You can't do anything useful (apart from service fingerprinting) by just connecting to arbitrary devices talking arbitrary protocols.

Now, if you refine your requirements what you want might be possible. For instance, Windows machines often run SMB, which you could use to communicate with them (though I imagine writing such software would not be for the faint of heart).

Some devices support Bonjour, another protocol you could use to talk to compatible devices.

It depends on what you want to do. If you want a list of devices on a local network, you could write a program like nmap. If you want to interact with them, you have to accept that you can only do so over protocols you are willing to implement.

The main protocols that java.net provides helper classes for are HTTP/HTTPS. You should be able to write a program that can enumerate all HTTP/HTTPS servers on local networks.

This topic is closed to new replies.

Advertisement