How do I set the IP stack to listen for incoming connections?

AT#TCPSERV="x.x.x.x" (x.x.x.x = the IP address of the incoming client - use "255.255.255.255" if you want to allow any IP addresses to connect)
AT#TCPPORT=n (n = the port in which the stack will listen for incoming connections)

After a GPRS connection has been established using the‘AT#CONNECTIONSTART’ command, use the command ‘AT#LTCPSTART’ to set the stack into listening mode. ‘AT#LTCPSTOP’ will stop the listening mode. Once a socket connection has been established, to stop the connection you must use an ETX character, ‘<ctrl C>’. If this ETX character is in the data, it will cause the IP stack to disconnect the socket connection. To keep this from happening you must preceed your ETX character with DLE characters. You can also set the #DLEMODE command to ignore the ETX character (look in IP Command Guide for the #DLEMODEcommand). If the ETX character is ignored, then the session will have to be disconnected another way.

The‘AT#LTCPSTART’ command will have to be issued after every connection if you want the stack to keep listening.