Text this: Maximizing the lifetime of wireless sensor networks in trains for monitoring long-distance goods transportation