Meaningless Drivel is fun!
The moose likes Java Micro Edition and the fly likes Search wifi device by J2ME Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Search wifi device by J2ME " Watch "Search wifi device by J2ME " New topic

Search wifi device by J2ME

Yaser muthana

Joined: Dec 05, 2010
Posts: 7
Dear All
Kindly I need your help to create program by J2ME searching any nearest WIFI device ex "wireless router LINKSYS" and then try to connect it
please give me Doc or tutorial for that
Many Thanks for your help
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

Thank you!

Much as I hate to put you through all that grief and then not have a simple answer, I don't have a simple answer.

The reason for that is because Java's networking model is based on TCP/IP, and the TCP/IP architecture is based on the idea that applications will neither know nor care about the hardware details of networking. A typical mobile device may contain several different network interfaces (WiFi, Bluetooth, Infrared, USB cable, and so forth), but when an app wants to contact another network node, the app doesn't know which of these interfaces is actually being used. And in fact, if the OS wants to do so, it can use more than one (in parallel) and/or switch interfaces in and out, based on routing criteria such as best measured data rates. Rather like how cell phones route phone calls.

So basic Java/JME won't know anything about WiFi.

However, there is an extension, specified as JSR 309 ( that looks like it may help. It supports learning about and controlling the network interfaces themselves. The problem is that not all devices will implement this extension, so it will depend on what device(s) you are supporting.

An IDE is no substitute for an Intelligent Developer.
Yaser muthana

Joined: Dec 05, 2010
Posts: 7
Many Thanks for your reply
but as I understand that we can't create program by J2ME to searching any wireless network cos may be that Mobile "nokia N82" O.S can't give us Authority to control wireless adapter
but as I know that any programming language can do that by O.S cooperation example V.B 6 I already did software by V.B to searching any nearest wireless network "SSID" to PC

Many Thanks for your clarification
Lester Burnham

Joined: Oct 14, 2008
Posts: 1337
Yes, the OS can do it, but that does you no good if that functionality is not exposed to whatever high-level language you intend to use.

Just like you can't implement ping or traceroute functionality in JSE (not without using JNI, anyway), simply because Java does not expose the OS functionality needed for that through its API.
I agree. Here's the link:
subject: Search wifi device by J2ME
It's not a secret anymore!