I am programming a Q2686 module which should send at a given rate (1 hour for the moment) data.
I am using OpenAT 4.12 , WIP 1.10.03 , firmware 6.61.
Everything works well but the GPRS connection : after 4 hours (sometimes less, but those 4 hours may be exactly the same even if the “send rate” is 20 minutes for exemple) I can’t connect anymore to my server. I don’t have memory leaks (tested with a free memory function).
Here is more or less the way I proceed :
At boot time, I do :
wip_netInitOpts(WIP_NET_OPT_SOCK_MAX, 1, WIP_NET_OPT_END);
wip_bearerOpen( &bearer_GPRS, “GPRS”, handler_GPRS, NULL);
And then for each connection :
wip_bearerSetOpts(bearer_GPRS,
WIP_BOPT_GPRS_APN, config.GPRS_APN,
WIP_BOPT_END);
wip_bearerStart(bearer_GPRS);
After receiving WIP_BEV_IP_CONNECTED :
TCP_connection = wip_TCPClientCreate ( config.URL, (config.TCP_port), TCP_connection_eventHandler, NULL);
After receiving WIP_CEV_OPEN :
some wip_read ( TCP_connection, buffer, i );
and some wip_write(TCP_connection, buffer, buffer_size);
And finally :
wip_close(TCP_connection);
And after a 2 seconds timer :
wip_bearerStop(bearer_GPRS);
Is there something wrong in that way of proceeding ?
Did one of you ever had a similar problem ?
Thanks in advance for any piece of advice.