File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Search wifi device by J2ME

 
Yaser muthana
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 (http://jsp.org) 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.
 
Yaser muthana
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim
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
Rancher
Posts: 1337
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic