Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to keep alive a GPRS connection ???

Status
Not open for further replies.

Aragorn

Newbie level 4
Joined
Sep 9, 2009
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,332
gprs keep alive register number

Hi All,

I've built a simple chat software based on WinSock control on PC(Server) and SIM300 module(Client) with TCP protocol, using AT Commands.
What is the best way to determine disconnection between Client and Server?

:?:

Kind Regards
Amirreza
 

at command gprs keep alive

Aragorn said:
What is the best way to determine disconnection between Client and Server?
Your title is asking a different question than your post.

To answer the question "How to keep alive a GPRS connection" there are a few things to consider. When you make a TCP connection, three different parties can close the connection - the server, the client and the network. Typically, the server and client will close a connection if it has been inactive for a period of time. The network will also close the GPRS connection if it has been inactive -typically 3 minutes is the network time-out. The network will also close the PDP context if there have been no active TCP connections for a period of time -typically about 15 minutes. So to keep the TCP connection alive, you must periodically send data between the client and server.

To answer the second question - "What is the best way to determine disconnection between Client and Server". Use the "AT+CIPSTATUS" command to get the current connection status. It will indicate if the connection is open or closed, or if the PDP context has been closed.
 

gprs keep alive -download

Hi GSMMan,

Thank you for your reply.

mostly i have problem when an unexpected power off occurs to Client. the server remains connected and the client cant reach it.

Is there any way to change network default timeout?

As you said i decided to solve the problem by send a PING command by server and receive an ACK from Client with specified interval times. it works fine for a while. but some times, after a while, the client receive SEND FAIL for each sending. this happens while it can receive from server but cant send to it.
and continue until i hard reset the device.

do you have any idea about it?

Thank you
Amirreza
 

keep alive a gprs connection

Aragorn said:
mostly i have problem when an unexpected power off occurs to Client. the server remains connected and the client cant reach it.
You should have the program on the server disconnect if there is no request on the connection for a period of time.

Aragorn said:
Is there any way to change network default timeout?
No, these are controlled by the cellular service provider, and are set to minimize connections that are not active.

Aragorn said:
As you said i decided to solve the problem by send a PING command by server and receive an ACK from Client with specified interval times. it works fine for a while. but some times, after a while, the client receive SEND FAIL for each sending. this happens while it can receive from server but cant send to it.and continue until i hard reset the device.
When you receive the "SEND FAIL" what is the status of the connection - is it still open, or has it been closed? It sounds like you may have an issue with timing or the exchanging of messages between the client and server. It may help if you could provide a diagram that shows the data flow between the client and server.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top