This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Contiki UDP Send problem



I am using the below code to send UDP packets to a server (through an edge router) that listens IPv6 UDP packets.

static void send_msg_server( uint8_t *data, uint16_t dataLength ){
uip_ipaddr_t address = {0xbb, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01};
client_conn = udp_new( &address, UIP_HTONS(SERVER_PORT), NULL);

udp_bind(client_conn, UIP_HTONS(SERVER_PORT));

uip_udp_packet_send(client_conn, data, dataLength);
uip_udp_remove(client_conn);
}

I use the function for three conditions, pin interrupt, GPT interrupt occurs, or when it receives a packet from a neighbor node.

The weird thing is that it sometimes sends UDP packet, sometime not. I monitor the traffic on Wireshark, so that I confirm if the packets are sent or not.

I am using IAR port. I wonder if the issue is with my IAR port or is it a Contiki related issue?