= EMR – Energy-efficient Multi-hop Routing for Clustered WS&ANs Cookbook = This document includes instructions how to install and to run the Energy-efficient Multi-hop Routing (EMR) for Clustered WS&ANs. [[PageOutline(2-3,Table of Contents,inline)]] == Introduction == The main purpose of EMR is to address the hot-spot issue in WSNs so that the network energy could be better utilized. * The operation of EMR is as following: * First, some CH candidates are selected; * Second, these candidates compete to be the final CH; * Third, the CHs announce their role and allow non-CH nodes to join them as member nodes to form the cluster; * Fourth, the CHs collect the data packets from their respective member nodes; * Finally, the CHs aggregate these packets as one summary packet of the cluster and deliver them to the sink. Please note that the competition range of the CH candidates to be the CHs are determined by the probability of nodes to be the CH, acquired by the mathematical analysis which aims to equalize the node lifetime across the network. == Installation == === Hardware and Software Requirements Installing the EMR protocol requires the following hardware tools and software packages: * [http://www.ubuntu.com/ Linux PC (Ubuntu)]/ [http://www.microsoft.com/windows/windows-xp/default.aspx/ Windows XP)] * [http://docs.tinyos.net/index.php/Getting_started TinyOS-2.x] * [https://ncit-cluster.grid.pub.ro/trac/Sensei-Cookbook/wiki/emr/emr.tar.gz EMR software package] * At least 11 TelosB sensor nodes We assume that the installation PC is running a '''Linux''' operating system and the [http://docs.tinyos.net/index.php/Getting_started TinyOS-2.x] has been installed and configured properly on it. We skip the installation of TinyOS. A user could refer to here and refer to [http://docs.tinyos.net/index.php/Getting_started TinyOS-2.x] about the installation if necessary. We describe the installation and configuration steps in the following for the [http://www.ubuntu.com/ Ubuntu] operating system. This is the structure of the content of the EMR software package: * Node \\ Contains the functionalities of the nodes in the network * EMRAPPc.nc\\ Contains * EMRCHC.nc\\ Contains * EMRClusteringC.nc\\ Contains * EMRInitC.nc\\ Contains * EMRLib.nc\\ Contains * EMRMemberC.nc\\Contains * EMRRouting.nc\\ Contains * interface\\ Contains * Sink \\ Contains the functionalities of the sink * EMRSinkAppc.nc\\ Contains * EMRSinkC.nc\\ Contains * Interface\\ Contains the functionalities of the interfaces === Installation == Running EMR==