Study and design of a promiscuous mode-based operating system for wireless sensor networks