CoAP

The CoAP protocol has been specifically designed for use on low bandwidth devices such as our IoT sensors. It is like a binary/compressed form of  HTTP (web) requests so uses fewer bytes, hence fewer packets are transmitted on the radio and power is saved. It also has extra facilities ideal for this application. Another energy saving measure is its use of UDP packets (rather than TCP) which saves even more transmissions.

In 2015 we successfully deployed a test network with CoAP. Each node had a readings resource which the Linux  border router system GETs. This was a different approach to 2014 where the nodes POSTed their data. Our initial results show CoAP worked extremely well because it can use as little as one packet for the request and one for the reply.

We have saved even more bytes by packing the data/readings with Protocol Buffers rather than sending ascii values as JSON for example. On the feshie  border router we used the Californium CoAP library, while on the nodes we use Coap libraries supplied in Contiki or Riot-OS.

Libraries are available for most languages and we have used Python to gather or receive data from nodes. Its RESTful design is very familiar to programmers and it can interoperate with HTTP by using a proxy on the border router.