A complete study for the implementation of wireless sensor networks in the intelligent building is presented. We carry out some experiments to find out the factors affecting the network performance. Several vital parameters which are related to the link quality are measured before deploying the actual system. And then, we propose an optimized routing protocol based on the analysis of the test data. We evaluate the deployment strategies to ensure the excellent performance of the wireless sensor networks unde...