Network coding and duty cycling in IEEE 802.11 wireless networks with bidirectional transmissions and sleeping periods