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.

CC2650: Receiving the udp data using UDP-receiver program for cc2650 in contiki

Part Number: CC2650


The example given in contiki named as udp-receiver has this code and it is receving the data and data lenght but I can't able to get the data from raw udp data.

static void
receiver(struct simple_udp_connection *c,
const uip_ipaddr_t *sender_addr,
uint16_t sender_port,
const uip_ipaddr_t *receiver_addr,
uint16_t receiver_port,
const uint8_t *data,
uint16_t datalen)
{
static int msg;

msg++;

printf("%d Data %d received length %d\n",,msg, datalen);

//What code should be here to get the data.

}