O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introducing CoAP

There are several problems with using HTTP for resource-constrained devices. HTTP is verbose and requires a lot of bytes for headers. These headers are in plain text, and since HTTP has grown over time, there are a lot of headers that need to be supported to achieve compliance with the standards. This forces implementations to become large, which might be a problem if the device has limited memory. CoAP is much simpler and has less options, and therefore has a smaller code footprint than HTTP.

CoAP is an Internet Engineering Task Force (IETF) standard and is defined in RFC 7252: https://tools.ietf.org/html/rfc7252.

At the same time, the amount of data in the payload is often small. A sensor value can be encoded in just a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required