Wip_berr_gprs_failed

I’ve tried to make automatic reconnection when bearer is disconnected by any reason.

I’ve added this in the evh_bearer function:

else if(WIP_BEV_IP_DISCONNECTED == event)
                                                          result = wip_bearerStop(b);
  else if(WIP_BEV_STOPPED == event)
  {
	 result = wip_bearerClose(b);
	  wip_debug("[GPRS]: Bearer Disconnected, trying to reconnect\r\n");
	  poll_creg( 0); //try to reconnect
  }

this works well ,but the problem is when the GPRS fails when I’m trying to reconnect. the wip_bearerStart() function returns -27 (which is WIP_BERR_OK_INPROGRESS) then this progress fails without throwing any events in the evh_bearer function!

how could I konw that the bearer failed to start?
Is there any way to konw that? because the only way I have now is to reset the module manually.

Please help!

Duplicate: viewtopic.php?f=16&t=4159&p=16387#p16387

There always will be situations in witch the modem get no error from the network… (GPRS)
The best thing is to program a ack nack procedure with your server…
If you don’t get ack’s from your server… in a time-out… restart connection…

Is there any way to know if the bearer is up and runnibg without sending to the server?
we need to minimize the amount of data sent via GPRS

You have veered off the topic of this thread - better to go back to your original thread.