← Back to the chapter · Previous detail · Next detail →
Technical detail · CoAP Message Exchanges
Worked radio charge: NON versus CON
6.7.1 Worked Example: CON vs NON Energy Budget for Cold Chain Monitoring
This hypothetical CoAP radio model compares a Non-confirmable (NON) reading, sent without a CoAP acknowledgement, with a Confirmable (CON) reading that requests one.
Delivery effort for a battery-powered sensor costs radio work. Choose acceptable loss first, then account for receiving, waiting, retries, sleep and sensing before claiming battery life.
The hypothetical cold-chain model gives a useful comparison, provided its assumptions stay visible. It models a radio listening at 5 mA for 50 ms while waiting for a CON receipt. That receive wait is a device assumption; it is not CoAP’s retransmission timeout.
The model assumes a 20-byte reading and a 53-byte packet: payload, CoAP header, required payload marker, User Datagram Protocol (UDP) header and an assumed compressed Internet Protocol version 6 (IPv6) header. A Token is the field used to match a response to its request. The model assumes zero Token bytes, no options, and excludes radio framing. Addressing a resource may add option bytes.
6.8 Putting Numbers to It: Energy Cost Formula for CON vs NON
At 250 kilobits per second (Kbps) and 8 mA transmit current, transmission takes 1.696 ms. Including startup gives NON a modeled charge of 0.017568 mA·s. CON adds a 50 ms receive wait at 5 mA and receipt of a 32-byte ACK at 5 mA, reaching 0.272688 mA·s, about 15.52 times the NON charge. Current multiplied by time gives charge; at the model’s fixed voltage, the energy ratio is the same.
6.9 Interactive: CoAP Message Energy Calculator
That ratio describes this modeled radio exchange. It does not give a whole-device lifetime ratio. Sleep current, sensing, retransmissions, link-layer acknowledgments and application responses also consume charge. The energy calculator retains a different, legacy packet model and known display limitations; its original caveats and complete calculations remain together on the CoAP Message Exchanges reference page.