Location Research Breakthrough Possible @S-Logix pro@slogix.in

How to Transfer Data between Server and Client using Cooja Simulator

Send Data Between Server And Client Using Cooja Simulator

Cooja Simulator Exercise for Sending Data between Server and Client

  • Description:
    In this example, UDP is implemented on top of RPL. An LLN comprises a UDP server, which accepts available packets, and several UDP clients, which send packets periodically to the server through single-hop or multi-hops. Through this sample, you will learn the basic idea of RPL and operate UDP communications easily without manipulating lower layer functions.

    Steps for creating the IoT network scenario
Step-1
  • Create sky mote1 for UPD-server.c
    In the example, the UDP server does three tasks primarily.
    • Initializes RPL DAG.
    • Set up UPD connection.
    • Waits for packets from the client, receives and prints them on stdout.
  • Send data between server and client using cooja simulator
  • Create the IoT network scenario
Step-2
  • Create sky mote2 for udp-client.c
    In the example, UDP Client does two tasks primarily.
    • Sets up UPD connection.
    • Sends packet to UDP server periodically.
  • Create sky mote1 for udp-server.c
  • Create sky mote2 for udp-client.c
Step-3
  • Data transmission:
    The motes output and debug messages generated can be seen in the Motes Output window. You can filter the output based on the node ID:node_id to watch a particular node. You can also watch particular debug messages by filtering them.
  • Data transmission