Hello,
I have a timer which perodically sends data to an UDP server every 5 seconds:
adl_tmrSubscribe(TRUE, 50, ADL_TMR_TYPE_100MS, (adl_tmrHandler_t) SENDTimer);
and the function attached to this timer is:
adl_tmrHandler_t SENDTimer(u8 tmr_id)
{
if(!udpopen)
udp_Socket_Chanel = wip_UDPCreateOpts(evh_udp, NULL, WIP_COPT_PORT, wm_atoi((ascii*) getItems(P_SERVER_PORT)), WIP_COPT_PEER_STRADDR, getItems(P_SERVER_IP), WIP_COPT_PEER_PORT, wm_atoi((ascii*) getItems(P_SERVER_PORT)), WIP_COPT_END);
sunucuyagonder();
}
So this function checks if the UDP socket is not opened, opens it. Then runs the function “sunucuyagonder” which sends data to our server using wip_write:
wip_write(udp_Socket_Chanel, (void*) rsp, (u32) wm_strlen(rsp) + 1);
So, the only place in the code that uses this socket and sends data via wip_write is the function sunucuyagonder(). And it is called by the function SendTimer() which is called every 5 seconds, according to the timer.
Then, why do I see data that are sent to the server in less than 5 second interval, or sometimes less than a second?
Here is a list of data received to our server:
I don’t see this issue very often but, it is still an issue. Do you have any suggestions or any place to check for this issue?