Is CoAP still used for IoT devices?



I did a prototype project for work a few years ago that utilized the Constrained Application Protocol (CoAP) for communicating with an Arduino board over a mesh network, but we put the brakes on the project due to a serious lack of security in our devices. We ended up abandoning CoAP for our project to move to an in-house protocol that we adapted for our needs.

I've done a little digging around, and it looks like there are still a few implementations floating around, but I was curious if anyone is actually using CoAP in any products.

Is CoAP still a good protocol to use, or has the industry settled on a de-facto standard?

Jarren Long

Posted 2016-12-06T19:45:41.323

Reputation: 100

There is DTLS for CoAP, have you tried that?Cromax 2017-06-07T11:53:57.787

Sorry for the wait, just saw your comment. Yes I have, I actually developed one of the first DTLS implementations for CoAP when CoAP was still pretty young. The problem with it at the time was that DTLS is a stateful protocol, CoAP was stateless. The only way to track the DTLS session was to add a bridge layer between CoAP and DTLS to keep the DTLS session alive and track the device it belonged to, even when there was no CoAP activity (reasonable, but prone to session hijacking), or to create a new DTLS session for every CoAP request (huge amount of overhead and really slow to do).Jarren Long 2017-10-10T17:48:43.847

I haven't kept up with CoAP or DTLS the past few years, so I don't know if anyone have solved these issues since I touched them last (I hope so).Jarren Long 2017-10-10T17:49:19.907



The reason that you find few implementations is most likely because CoAP is a relatively young protocol. It was first proposed in 2010, and the current version dates from 2014: RFC 7252.

For application level protocols the popular alternatives are HTTP, which is heavy for constrained devices, and MQTT, which requires a broker device and runs on TCP. They both have been around since the late 90s. I think CoAP just needs some time.

Eirik M

Posted 2016-12-06T19:45:41.323

Reputation: 321