Cloudcoap - Because It Works
Efficiency & Reliability
Even in our days some are still not that happy with their cellular connectivity solution. It is too common to be not that low power as assumed by reading the datasheets. Causing to send only once a day rather than once a hour. The reliability is also frequently behind the believes. Especially on weak radio signals it stops working. In spite of all the promises in the prospects.
TLS and DTLS - Commons and Differences
TLS and DTLS are both used to encryt comunication. Both are based on the Internet Protocol v4 or Internet Protocol v6 to exchange messages. TLS reached a large popularity, while DTLS seems to be still uncommon. Some may therefore ask, why DTLS should be considered at all. So compare both to see the difference. Possibly some will recognise, that there are cases, where DTLS shows benefits.
TLS
TLS is very wellknown. It is based on TCP. That offers a connection oriented reliable transmission. You may consider it as “stream of ordered data without gaps”. For the most, that’s what is wanted for communication. You can send data and it gets received reliable in the same order without gaps. A TCP stream is split into IP messages and the reliability is based on retransmissions of these IP messages, as common. In some rare cases, for example under bad connectivity, even these retransmissions fails, and so the connection is dropped and no data could be exchanged. TCP transmits these IP messages using a window-buffer. It sends a number of messages without waiting for ACKs. The nonobvious drawback comes with a situation, where some data could be transmitted successfully, but some is dropped. To grant the “ordered data without gaps” the already received data after such a gap must be dropped, if that gap could not be closed by retransmissions. If the time of processing the received data is critical to your application, these grants may turn into drawback. The critical data may have been already received, but some less important, but preceding, data may stick in retransmission. With that, the critical data will not be processed in time.
CoAP over DTLS - unleash the power
CoAP over DTLS - unleash the power
In TLS and DTLS - Commons and Differences I explained some basics about TLS and DTLS. That gave a first impression about the benefits of using DTLS. The challenges are retransmission of messages and preferable small messages. This article explains, how CoAP does both for you.
CoAP
CoAP is specified in The Constrained Application Protocol (CoAP).
It is split in two layers:
Retransmission
The message transmission uses 4 message types to control the transmission: