File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java Micro Edition and the fly likes Connecting to a socket program on the PC with WIFI from mobile phone Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Connecting to a socket program on the PC with WIFI from mobile phone" Watch "Connecting to a socket program on the PC with WIFI from mobile phone" New topic
Author

Connecting to a socket program on the PC with WIFI from mobile phone

Koh Khai Huat
Ranch Hand

Joined: Aug 05, 2005
Posts: 100
Hi all,

I am working on a project using a mobile phone E51. This midlet is going to connect to a program on a pc through socket connection. But when i started the midlet and try to connect the midlet always fail to response but it does not hang just not responding. Also then the connect button is press the phone does not ask for any permission for a network connection. Does nokia phone require any procedure to connect to the wifi? or is there anything i need to take note of? Please provide any suggestion thanks in advance. Connection code is as follow:


if (!WorkHard){
System.out.println("Fail!!!");
}
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16061
    
  21

On my (non-Nokia) phone, you have to connect the phone to a WiFi network using the phone's control panel - or via a shortcut icon at the top of the screen that links to the Wifi control panel applet (same thing). The last Nokia WiFi phone I worked with was basically the same way. Among other things, this allows you to specify the security credentials for secured WiFi nets and pick a network if you're in range of more than one network.

Until you're connected to a network, either WiFi, Bluetooth, infrared or over the phone company datalink, you won't have a path to connect and the socket connection will fail.

System.out.println is a dangerous diagnostic tool. Not every environment sends the output to some place you can see it. Try displaying an alert box instead.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connecting to a socket program on the PC with WIFI from mobile phone