In this paper, an efficient connectivity and coverage management module for wireless sensor networks is proposed. The proposed approach is composed of centralized-based algorithms that depend on software defined network architecture. The focus in this paper is on coverage and connectivity problem under the restrictive assumptions that the controller has sufficient information about the sensor nodes in the area of interest such as nodes IDs, locations, and residential energy. This information is used to determine the active, the connection and the sleep set of nodes via two main algorithms. First, coverage algorithm uses location, residential energy and other parameters to choose coverage set which will be the active nodes in the sensing field. Second, a shortest path algorithm uses the active set produced from the coverage algorithm in order to choose the connectivity set of nodes that ensures connectivity of the entire network. The proposed approach has been compared with another related approach. Simulations results have showed that the proposed algorithm outperforms the other approach in terms of the network lifetime, coverage, and connectivity performance.