The document presents SR-Code, a novel network coding algorithm designed to enhance reliability in data collection for wireless sensor networks, particularly under harsh conditions. By utilizing the XOR operator and bit address vectors, SR-Code minimizes retransmission costs related to power and latency, achieving a reliability factor of 75% even with packet losses. This approach involves a two-tier network structure where sensor nodes code un-coded packets before forwarding them through relays to the sink.