← Back to the chapter · Previous detail · Next detail →
Technical detail · CoAP Security: CON and NON Trade-Offs
Hospital wearable delivery and battery assumptions
A hypothetical hospital wearable system uses CoAP readings and configuration commands protected by Datagram Transport Layer Security (DTLS) between each wearable and its gateway.
The original worked example uses 200 wearable monitors reporting every 30 seconds to an authorized gateway. Occasional lost readings are acceptable in that hypothetical scenario, while a sampling-rate change needs receipt evidence. Non-confirmable (NON) readings without CoAP acknowledgements and Confirmable (CON) configuration changes that request them fit those different needs, both using wearable-to-gateway DTLS. Read back the sampling rate before claiming the change succeeded.
At that interval, one wearable sends 2,880 readings per day. That count alone gives no battery lifespan. Measure handshake frequency, record sizes, retries, radio energy and sleep current. Estimate lifetime from measured energy use and usable battery capacity under the intended conditions. A clinical alarm needs its own deadline, failure handling and application evidence; naming CON alone does not establish safety.
The Python example on the reference page is an unvalidated implementation sketch. Its two example secrets each contain 33 octets despite a comment saying 32 bytes. Check the supported library API and securely provision credentials before implementation.