Research breakthrough possible @S-Logix

Office Address

  • 2nd Floor, #7a, High School Road, Secretariat Colony Ambattur, Chennai-600053 (Landmark: SRM School) Tamil Nadu, India
  • +91- 81240 01111

Social List

Tutorials for Sending and Receiving Raw UDP Datagrams using Contiki-Ng Simulator

Send And Receive Raw UDP Datagrams With Contiki-Ng

Contiki-Ng Simulator Steps for Sending and Receiving Raw UDP Datagrams


   It describes how to send and receive raw UDP datagrams with Contiki-NG. It focus on the module simple-udp.


  Open the file location -->/home/user/Desktop/contiki-ng/os/net/ipv6
simple-udp.c file

First, register a socket, both at the sender and receiver.

#include "net/ipv6/simple-udp.h"
simple_udp_register(struct simple_udp_connection *c,
  uint16_t local_port,
  uip_ipaddr_t *remote_addr,
  uint16_t remote_port,
  simple_udp_callback receive_callback)


  For each incoming datagram, the function above will be called with parameters that provide source/destination addresses and ports, and the payload.

  databuffer, uip_datalen());