23

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?

  • There is DTLS for CoAP, have you tried that? – Cromax Jun 7 '17 at 11:53
  • 2
    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 Oct 10 '17 at 17:48
  • 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 Oct 10 '17 at 17:49
13

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.

  • 1
    An alternative for constraint devices would be the more lightweight version of MQTT: MQTT-SN which runs over UDP – xwoker Jul 23 '18 at 7:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.