Text this: An analytical model of contention in wireless sensor networks using tree routing