Giter Club home page Giter Club logo

ndn_project's Introduction

GROUP - 8 - Scalable Project 3 - Implementation of Secure Peer-to-Peer ICN-Based Networking Protocol for Smart Agriculture Systems

Group Members:

  • Smit Shah - 23331457
  • Yifan Chen - 23333994
  • Peichen Sun - 23333198
  • Sulaeman Shaik - 23339673

Instructions to run the project

  1. Copy the whole folder along with the .env file to the Rpi.
  2. Run the code using the runme.sh shell script using the below command:
    ./runme.sh
    
    This script creates a virtual environment, installs all the required dependencies and runs a tmux session with 5 split windows that each simulate a node and are running 5 different nodes.
  3. [OPTIONAL] If the installation of the cryptography library fails; please follow the below set of commands to install rust:
    curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y
    PATH="/root/.cargo/bin:${PATH}"
    
    After the above commands, please restart a new session of terminal (close the old window) for the path settings to take effect. Again, perform the step 2 to successfully install all the libraries.
  4. After a while, once all the nodes are synced up, launch a new seperate instance of the terminal, independent of the above tmux sessions. Run the following commands to get the data from the required node and sensor:
    source venv/bin/activate
    python3 actuator.py r1/temperature
    
    where,
    • r1 -> name of the node to get the data from, can be changed to r2, r3, r4
    • temperature -> sensor data information to get. Choose from the following options: temperature, humidity, cec, compaction, nutrition, pH, salinity, pesticides
  5. To run the code on different RPis, please run the following command
    ./start_system.sh
    
    The script automates the process of SSH login to four different Pis and executes the commands ./shell.sh 1, ./shell.sh 2, ./shell.sh 3, and ./shell.sh 4 on each respective Pi. Following this, it executes ./shell.sh 0 on the local Pi. It's important to note that for the script to run successfully, passwordless SSH access to the other four Pis must be set up from the local Pi. This involves transferring the local Pi's public key to the other four Pis, a task already completed on the Pi with the address rasp-008.berry.scss.tcd.ie. After a while, once all the nodes are synced up, launch a new seperate instance of the terminal. Run the following commands to get the data from the required node and sensor:
    python3 actuator.py r1/temperature
    
    r1 can be changed to r2, r3, r4 temperature can be changed to humidity, cec, compaction, nutrition, pH, salinity, pesticides
  6. To terminate a node's process, use the command
    ./terminate.sh
    
    To terminate all the nodes' processes, use the command
    ./terminate_system.sh
    
  7. [OPTIONAL] If the command ./start_system.sh fails, to run the code on different RPis, please run the following command/shell script by passing the appropriate node number:
    ./shell.sh 0
    
    This starts the node 0 in the RPi it is run on. For node 1 do './shell.sh 1' and so on for the other nodes.

ndn_project's People

Contributors

yfchenkeepgoing avatar smit-sms avatar

Stargazers

 avatar  avatar

Watchers

 avatar peichen_sun avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.