Wireless sensor networks [1] are composed of small devices, called sensor nodes, which cooperate to forward collected data to a sink node that either uses the data locally or forwards it to other networks through a gateway, like for example, the Internet. Sensors are resource-limited devices composed of sensing, processing, transceiver, and power units.