I'm developing j2me application on Nokia 6630 (firmware v 3.45.113 04-01-05) and on Nokia 6680 (versione firmware v2.04.15 04-03-05).
I'm trying to develop a J2ME application that uses Socket and SocketServer in TCP.
I have downloaded the following code example :
MIDP 2.0: Introduction to Using Sockets and Datagrams v1.0
I have used TCPMidlet as Socketclient, and TCPEChoServerMidlet as ServerSocket.
Well, no problem using Nokia 6630.The two Midlets work perfectly.
Instead on Nokia 6680 TCPEChoServerMidlet does not run properly.
Debugging TCPEChoServerMidlet I note that the instruction code:
ServerSocketConnection serverSocketConnection = (ServerSocketConnection) Connector.open("socket://:1234");
open correctly the ServerSocket on 1234 port, but the instruction:
SocketConnection socketConnection = (SocketConnection) serverSocketConnection.acceptAndOpen();
doesn't work properly because, even if the client connection on port 1234 is made correctly, the server remains blocked on "acceptAndOpen" and don't create the SocketConnection object.
Using a protocol sniffer, i have verified the TCP handshake is set up correctly but when the client starts actual data sending to the server on the phone, the server stops responding with any packets, and TCP retrasmissions come in place.
If anyone has find any solution or could provide me with any hint to solve or further debug the problem... I'm completely clueless at the moment.