Localization is an unavoidable procedure in location aware sensor networks. In such networks, management of a large amount of location information along with its processing and updating is highly desirable at a central station of the network. In this paper, we have discussed the implementation of software layer to be run on various types of sensor nodes in the localization network, which has been dealt with extensively along with some of the addressed problems and their respective solutions. In addition, the article discusses implementation of an already mathematical formulation of least squares trilateration, which has not yet been attempted in the space of wireless sensor networks. To support our clam we performed experimental analysis on $$telosb$$ t e l o s b motes. Experimental results of proposed framework shows that average error with respect to the physical location estimation can be reduced upto 46.66 % using 4 anchor node as compare to three anchor nodes at outdoor scenario and upto 40 % in indoor scenario.