# No Documentation on Particle's use of the CoAP Protocol

**URL:** <https://community.particle.io/t/no-documentation-on-particles-use-of-the-coap-protocol/22393>\
**Category:** General\
**Created:** [April 24, 2016, 10:38pm UTC](https://community.particle.io/t/no-documentation-on-particles-use-of-the-coap-protocol/22393 "2016-04-24T22:38:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greg123](https://avatars.discourse-cdn.com/v4/letter/g/49beb7/32.png) [@Greg123](https://community.particle.io/u/Greg123)\
**Post date:** [April 24, 2016, 10:38pm UTC](https://community.particle.io/t/no-documentation-on-particles-use-of-the-coap-protocol/22393/1 "2016-04-24T22:38:48Z")

</div>

There is no documentation on Particle’s use of the CoAP Protocol. I would like to know if there is any documentation on Particle’s use of the CoAP protocol. I looked on the Particle docs but I didn’t find anything. Does Particle use a custom implementation of the CoAP protocol such as using a custom RFC? Why did Particle decide to change the CoAP protocol to use tcp instead of udp(the default option)?

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [April 24, 2016, 11:37pm UTC](https://community.particle.io/t/no-documentation-on-particles-use-of-the-coap-protocol/22393/2 "2016-04-24T23:37:07Z")

</div>

Most people don’t need to dig that far down in, so I’m not sure there is documentation for it, but I’d start here:

> **[particle-iot/spark-protocol](https://github.com/particle-iot/spark-protocol)**
>
> spark-protocol - Node.JS module for hosting direct encrypted CoAP socket connections

---

<div class="post-metadata">

**Author:** ![Greg123](https://avatars.discourse-cdn.com/v4/letter/g/49beb7/32.png) [@Greg123](https://community.particle.io/u/Greg123)\
**Post date:** [April 25, 2016, 12:08am UTC](https://community.particle.io/t/no-documentation-on-particles-use-of-the-coap-protocol/22393/3 "2016-04-25T00:08:53Z")

</div>

Thanks but it still doesn’t answer my question of why did Particle decide to change the CoAP protocol to use tcp instead of udp(the default option)?

---

<div class="post-metadata">

**Author:** ![Greg123](https://avatars.discourse-cdn.com/v4/letter/g/49beb7/32.png) [@Greg123](https://community.particle.io/u/Greg123)\
**Post date:** [April 25, 2016, 1:17am UTC](https://community.particle.io/t/no-documentation-on-particles-use-of-the-coap-protocol/22393/5 "2016-04-25T01:17:59Z")

</div>

My plan is to fuzz the protocol so the more information I have the better I can fuzz the protocol. If I find any bugs I will report them to Particle. Though that answer my question why did Particle decide to change the CoAP protocol to use tcp instead of udp(the default option)? It would be nice if Particle had some documentation like this [http://tools.ietf.org/html/rfc7252](http://tools.ietf.org/html/rfc7252) . It doesn’t matter how good you make the protocol without good documentation it’s no good.

_Poll ([view on site](https://community.particle.io/t/no-documentation-on-particles-use-of-the-coap-protocol/22393/5))_

---

<div class="post-metadata">

**Author:** ![mdma](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mdma/32/1924_2.png) [@mdma](https://community.particle.io/u/mdma)\
**Post date:** [April 26, 2016, 10:55pm UTC](https://community.particle.io/t/no-documentation-on-particles-use-of-the-coap-protocol/22393/6 "2016-04-26T22:55:28Z")

</div>

TCP was chosen because it was the right tool for the job to provide a reliable communications channel between the device and the cloud.

I don’t understand how knowing why a decision was made (i.e. to use TCP) will change how you fuzz the protocol. UDP is only a recommended binding - CoAP can run on top of many transports. If TCP were the default, you’d still fuzz it in the same way.

Apart from the initial handshake, you’ll have little luck fuzzing the protocol since it’s encrypted so only random bit manipulations make any sense, unless you plan to also fuzz things before encryption and after decryption on the client and server side.

The documentation for the handshake is here - [https://github.com/spark/spark-protocol/blob/master/js/lib/Handshake.js#L28](https://github.com/spark/spark-protocol/blob/master/js/lib/Handshake.js#L28)

---

<div class="post-metadata">

**Author:** ![Greg123](https://avatars.discourse-cdn.com/v4/letter/g/49beb7/32.png) [@Greg123](https://community.particle.io/u/Greg123)\
**Post date:** [April 26, 2016, 11:34pm UTC](https://community.particle.io/t/no-documentation-on-particles-use-of-the-coap-protocol/22393/7 "2016-04-26T23:34:33Z")

</div>

I was just wondering. Dumb fuzzing it is!
