###### Abstract  
Network lifetime and localization are critical design factors for a number of wireless sensor network (WSN) applications. These networks may be randomly deployed and left unattended for prolonged periods of time. This means that node localization is performed after network deployment, and there is a need to develop mechanisms to extend the network lifetime since sensor nodes are usually constrained battery-powered devices, and replacing them can be costly or sometimes impossible, e.g., in hostile environments. To this end, this work proposes the energy-aware connected k-neighborhood (ECKN): a joint position estimation, packet routing, and sleep scheduling mechanism. To the best of our knowledge, there is a lack of such integrated solutions to WSNs. The proposed localization algorithm performs trilateration using the positions of a mobile sink and already-localized neighbor nodes in order to estimate the positions of sensor nodes. A routing protocol is also introduced, and it is based on the well-known greedy geographic forwarding (GGF). Similarly to GGF, the proposed protocol takes into consideration the positions of neighbors to decide the best forwarding node. However, it also considers node residual energy in order to guarantee the forwarding node will deliver the packet. A sleep scheduler is also introduced in order to extend the network lifetime. It is based on the connected k-neighborhood (CKN), which aids in the decision of which nodes switch to sleep mode while keeping the network connected. An extensive set of performance evaluation experiments was conducted and results show that ECKN not only extends the network lifetime and localizes nodes, but it does so while sustaining the acceptable packet delivery ratio and reducing network overhead. wireless sensor networks; position estimation; greedy geographic forwarding; packet routing; sleep scheduling; duty cycling; mobile sink; performance evaluation; data dissemination protocol 2023236133 20  
network inoperational. The proposed ECKN takes into consideration the energy remaining in sensor nodes to make decisions on duty cycles. Coverage and connectivity are two performance metrics that are mainly studied in WSNs, as described by [PERSON] et al. [6]. Coverage refers to the surveillance map of the area, and in this metric, nodes placed in a region cooperate with each other in order to maintain good coverage quality. Some benchmarks are used to quantify coverage quality in terms of granularity. At the highest granularity, every point on the map should be covered by at least one sensor. At the medium granularity, every path crossing the network should be covered. Finally, at the lowest granularity, the map may not be entirely covered by nodes, and the network may not necessarily be connected. Connectivity, on the other hand, refers to message retrieval and delivery in the network. The connectivity of a node to other nodes in the network can be considered in two dimensions related to energy consumption. In the temporal domain, nodes switch between active and sleep states. In the spatial domain, nodes have multiple energy levels that vary their communication ranges. In WSN applications, being location-aware is an important factor in fundamental tasks such as packet routing, event mapping, and energy savings. However, due to the deployment of a large number of sensor nodes, manual placement of these devices is often unfeasible and costly. Consequently, sensor nodes usually acquire their positions through location estimation. One of the most common localization methods is the global positioning system (GPS) [7]. However, for small, inexpensive, low-power devices that are left unattended for long periods of time, the use of GPS modules on all sensor nodes is unfeasible due to size, form factor, cost, and power constraints [8]. In this paper, we present an integrated node localization, sleep scheduling, and packet routing algorithm.