I’m experiencing SOCKET issues with Wavecom Fastrack Supreme 04, running on WIP library 5.05 and on R74
This is how the bearer + socket’s are being initialized, note : I attach handler using AT+CGATT=1
Ret_Value = wip_netInit();
Ret_Open = wip_bearerOpen(&Br_Id,"GPRS",BearerHandler,NULL);
if(Ret_Open == 0) {
/*set the option for the bearer service */
Ret_Option = wip_bearerSetOpts(Br_Id,WIP_BOPT_GPRS_APN,APN,
WIP_BOPT_LOGIN,APNUname,
WIP_BOPT_PASSWORD,APNPwd,
WIP_BOPT_END);
if(Ret_Option == 0) {
Ret_Start =wip_bearerStart(Br_Id);
In BearerHandler callback
case WIP_BEV_IP_CONNECTED:
adl_tmrSubscribe(FALSE, 100, ADL_TMR_TYPE_100MS, pollGPRS);
adl_atSendResponse ( ADL_AT_RSP, "opensocket\r\n");
BearerRunning = TRUE;
SocketOpeningTimer = adl_tmrSubscribe (FALSE, TimerValue, ADL_TMR_TYPE_100MS, OpenSocketTimer);
break;
and in OpenSocketTimer
Channel = wip_TCPClientCreate(IpAddr,Port,ClientEventHandler,NULL);
RetVal = wip_setOpts(Channel, WIP_COPT_NODELAY, TRUE, WIP_COPT_END);
This was the default socket creation used and during testing on my work bench, i have had no issues whatsoever.
However, when it was rolled out live, we found problems where the socket just get stuffed and throws a BUSY event randomly and fails to connect there after.
When a packet is sent using the wip_write across the created TCP channel, the modem expects an acknowledgement. If there is not acknowledgement received after a period of time, and the modem detects an existence of GPRS, it attempts to reconnect the channel by closing the socket and recreating another socket.
The software probes the state of the channel and it will show BUSY all the time, and then subsequently throws a WIP_CEV_ERROR event.
The software would not be able to create a new socket until a reset is done on the unit.
I have ran out of ideas on how this happens. I’ve tried sending the information to two different server implementation that waits for incoming connection but still does not work.
Clues anyone?