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

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

+ Description

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

  • 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

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

u8b
u8c
+ 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

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

u8b
u8c
Leave Comment

Your email address will not be published. Required fields are marked *

clear formSubmit