Text this: Distributed algorithms for cooperative routing and power allocation in wireless sensor networks