Smart Agriculture System

- We are now embracing the 4 th Industrial revolution. Everything is connected, smart and responsive. With that many new devices being connected to the grid we need a new way of connecting them. We will be working in the context of low power sensors used for data logging. One thing we will keep referring to is smart agriculture sensor systems. To connect these many smart agricultural sensors to the grid we propose the use of wireless meshed networks . Since these are portable and potentially reusable sensors it would be a waste of resources to connect each sensor to the internet individually. Since the sensors can in many scenarios be disposable we can a resource and eco-friendly way to connect these sensors to some permanent fixed stations that are used for data collection and measurements.


III. ROUTING PROTOCOLS
Routing protocols are the set of rules for communication between network devices. These are divided into three categories as shown below:

A. PROACTIVE ROUTING PROTOCOLS
 They maintain a table for each node representing the entire network topology that is regularly updated to maintain freshness of routing information  At any given time, any node knows how to reach another node of the network, this approach minimizes the route discovery delay at the cost of exchanging data periodically thus consuming bandwidth  Preferred for small networks due to low routing,

B. REACTIVE ROUTING PROTOCOLS
 In this, nodes are not aware of network topology  Routing table is constructed on demand  Routes are found by flooding network with route requests thus leading to higher latency but minimizes control traffic overhead  Usually they are better in networks with low node density and static traffic patterns.  Preferred for high mobility networks.  Some of the reactive routing protocols include: i. Dynamic Source Routing (DSR) ii. Ad-hoc On-Demand Vector (AODV)

C. HYBRID ROUTING PROTOCOLS
 It is a mixed design of both proactive and reactive routing protocols  It typically uses a proactive approach to keep routes to neighborhood nodes.  For nodes beyond the vicinity area the protocol behaves like a reactive one  Alternatively, multiple algorithms can be used simultaneously, if WMN is segmented into clusters, within clusters proactive algorithm is used and between them reactive algorithm is used.

IV. Protocols used for Smart Agriculture System
The protocol that will be used for the implementation of Smart Agriculture System is Routing Information Protocol (RIP).

RIP-Basically Routing Information Protocol is a standard for exchanging the routing information between the hosts and gateways and uses Hop-Count.
Hop-Count-This refers to the intermediate devices through which the data must pass from the source to the destination.
The maximum number of hops for RIP are 15. This limit also limits the size of networks that RIP can support.
 IP destination network and hop count specify routers.  The routing table is broadcast to all stations on network.
RIPv2:RIPv2 defined in RFC 1723.  The routing table is sent to a multicast address thus reducing network traffic.  Authentication is used for security.

Features-
The following are its features:  Network updates are exchanged periodically  Full routing tables are sent in updates  Routers trust the routing information from other router V. Implementation and Procedure of RIP Each RIP router maintains a routing table, which is a list of all the destinations (networks) it knows how to reach, along with the distance to that destination. RIP uses a distance vector algorithm to decide which path to put a packet on to get to its destination. It stores in its routing table the distance for each network it knows how to reach, along with the address of the "next hop" router --another router that is on one of the same networks --through which a packet has to travel to get to that destination.
If it receives an update on a route, and the new path is shorter, it will update its table entry with the length and next-hop address of the shorter path; if the new path is longer, it will wait through a "hold-down" period to see if later updates reflect the higher value as well, and only update the table entry if the new, longer path is stable.
In short we can summarize the working of RIP protocol implementation as the following series of steps:  Each router initializes its routing table with a list of locally connected networks.
 Periodically, each router advertises the entire contents of its routing table over all of its RIPenabled interfaces.
o Whenever a RIP router receives such an advertisement, it puts all of the appropriate routes into its routing table and begins using it to forward packets. This process ensures that every network connected to every router eventually becomes known to all routers.
o If a router does not continue to receive advertisements for a remote route, it eventually times out that route and stops forwarding packets over it. In other words, RIP is a "soft state" protocol.
 Every route has a property called a metric, which indicates the "distance" to the route's destination.
o Every time a router receives a route advertisement, it increments the metric.
o Routers prefer shorter routes to longer routes when deciding which of two versions of a route to program in the routing table.
o The maximum metric permitted by RIP is 16, which means that a route is unreachable. This means that the protocol cannot scale to networks where there may be more than 15 hops to a given destination.

VI. Integrating RIP with our system
The smart agriculture sensor system is primarily designed for data collection. The more data that can be recorded for a particular crop during a season determines the accuracy and the economical and environment benefit of the decisions made after taking the data into account.
To put it objectively if we cannot ensure timely connectivity between all the nodes we are in effect rendering our system useless. First a simple visual representation of our system. This is a logical map of our system and a prototype sensor for collecting optical, moisture, pH and nitrogen levels in its surroundings.
Here to transfer the data from one node to the server we will be using the RIP protocol. Some of the primary reasons for using this protocol are discussed briefly.
 We have a periodic exchange of data which is essential for timely updates to our crop models.  And the routing tables are shared with every update. This saves the low powered nodes from using precious CPU cycles and battery power in discovering routes on request.  The nodes accept all data coming from other nodes. This is particularly useful in our use case since the probability of an attack with considerable damage is practically zero. So in effect we save CPU resources by not using extensive data integration checks and balances.
This enables us to produce more low cost low powered sensors for measuring everything about the crop at hand and making smarter more informed decisions. This will in turn make farming more efficient, will do less harm to the planet, and produce cheaper food to feed a growing population.