26

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?

3
  • There is DTLS for CoAP, have you tried that?
    – Cromax
    Jun 7, 2017 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). Oct 10, 2017 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). Oct 10, 2017 at 17:49

2 Answers 2

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
  • 1
    An alternative for constraint devices would be the more lightweight version of MQTT: MQTT-SN which runs over UDP
    – xwoker
    Jul 23, 2018 at 7:14
0

Some of the improvements introduced with COAP might become less relevant with the introduction of HTTP/2 and HTTP/3 so will need to wait and see how the protocol war evolve.

1
  • Which improvements?
    – Rexcirus
    Sep 23, 2022 at 22:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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