#5, First Floor, 4th Street , Dr. Subbarayan Nagar, Kodambakkam, Chennai-600 024 pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to attach the variable in data packet RPL contiki cooja?
Description

To attach the additional variable in RPL data packet using contiki cooja simulator.

Source code

Step 1: open a file at location: contiki/examples/ipv6/rpl-udp/
udp-client.c file sends the data packets in the function

static void send_packet(void *ptr) {
uip_udp_packet_sendto(client_conn,data_buf,strlen(data_buf),&server_ipaddr, UIP_HTONS(UDP_SERVER_PORT));
}
strcat(data_buf,buf);
strcat(data_buf,bb);
strcat(data_buf,privalue);
strcat(data_buf,bb);

Step 2: Run the simulation

Step 3: Client side: Attach the variable in data packet