I work on a Server MIDlet.
I want it to listen for a connection a some port (e.g 4444)
Because I use GPRS connection first the mobile has to send its IP address to an external server, and then it can make a server socket. I use the code below:
conn = (SocketConnection) Connector.open( "socket://"+address );
out = conn.openOutputStream();
in = conn.openInputStream();
String msg = conn.getLocalAddress() + "\r\n";
serverconn = (ServerSocketConnection) Connector.open("socket://:"+port);
conn = (SocketConnection) serverconn.acceptAndOpen();
On emulator everything works all right.
But ther real mobile phone is only able to send its IP addres to external server. But then i can't connect to mobile on this IP address.
Maybe you know what can be wrong.