## 1 Introduction  
A wireless sensor network (WSN) contains energy-constrained stationary or mobile wireless sensor nodes deployed in a dynamically varying environment. A sensor node consists of transmission, data processing, a power source, and multiple sensor units [1]. The WSN perceives and interacts with the physical world by revolutionizing the ways in application domains including environmental sensing, health, military defense, and habitat monitoring [2; 3; 4; 5]. The majority of existing research work conducted in WSN focuses on proposing and developing low cost and low power networking solutions to perform collaborative and cooperative tasks under stringent computational and energy constraints. It is due to the fact that in various WSN applications, the wireless sensor nodes operate for a long duration without the replacement of their power units [6; 7]. Therefore, the limitation of power capacity is considered extremely crucial while designing WSNstrategies and solutions [8; 9]. Routing is the core networking activity to route sensed information from sensor nodes to the sink. Hence, in such networks, the efficient utilization of node batteries must be guaranteed while designing routing strategies. Software defined networking (SDN) is a revolutionary paradigm, promising to enable the evolution and dynamic management of traditional networks. It has a flexible network architecture that carries out the decoupling of network control that is programmable from the data plane [10; 11; 12]. In fact, the basic idea behind this concept is the efficient utilization and management of networking resources. In SDN, the network intelligence is logically centralized within the control plane, while the devices appear as packet forwarding elements within the data plane. The SDN uses a well-defined interface between various planes in the network. The control plane is responsible for routing and fault recovery while the data plane manages the packet delivery to devices. Considering the above-mentioned facts, it can be concluded that SDN can play a pivotal role in minimizing energy consumption in a WSN. SDN architecture is presented in Figure 1.  
In this paper, we integrate the concept of SDN to a traditional WSN, called software defined wireless sensor networks (SDWSNs) [13]. The architecture of a SDWSN is shown in Figure 2. We propose an SDN-enabled energy-aware routing protocol. In the proposed scheme, residual energy (R.E) and geographical proximity are the main parameters for the selection of the forwarder node. The proposed network architecture has two types of core nodes: Controller and regular nodes as shown in Figure 2. The underlying network is controlled by a controller that collects the data from regular nodes. Therefore, the aforementioned architecture plays an important role in managing the network more efficiently so as to minimize network energy consumption. The main contributions of this paper are listed below:  
* Real-time implementation of SDN on hardware platform;
* The proposition and development of an energy aware SDN based multi-hop routing protocol (EASDN) for SDWSN;
* Development of a test bed useful for experimentation and analysis of SDWSN;
* The implementation of an existing energy efficient SDWSN routing protocol (called a traditional SDN [14]) and ad-hoc on-demand distance vector (AODV) routing protocol;
* A comparative analysis of an EASDN with a traditional SDN and AODV in real environment. Figure 1: Software defined networking (SDN) architecture. The remaining part of our paper is structured as followed: Section 2 describes related work and is divided into two parts, traditional WSN routing approaches and SDN based routing approaches. The energy consumption mathematical model is explained in Section 3. Section 4 provides details of the energy aware routing algorithm. The working of the algorithm is also demonstrated through figures. A real-time experimental setup, an experimental platform, a deployment scenario, and results are shown in Section 5.