A Fault-Resilient Method for Wireless Sensor Networks in Pervasive Computing