CoAP (acrònim anglès de Constrained Application Protocol) és un protocol de la capa d'aplicació d'internet per a dispositius amb recursos restringits. CoAP permet que dispositius amb pocs recursos es puguin comunicar amb qualsevol node d'internet. CoAP és un protocol de capa d'aplicació dirigit a la internet de les coses.[1][2][3]

Fig.1 Estructura protocol CoAP


Propietats modifica

  • El nucli del protocol està basat en l'especificació internet RFC 7252 realitzada per The Internet Engineering Task Force (IETF).
  • L'eficiència de la comunicació és molt important, per tant CoAP utilitza el protocol de transport UDP. Els errors i reintents de missatges es gestionen des de la capa d'aplicació.
  • COAP és un protocol que segueix el model client/servidor.
  • Opcionalment empra la seguretat DTLS (Datagram Transport Layer Security) que és la implementació del protocol SSL sobre el protocol UDP.[4]

Implementacions modifica

Nom Llenguatge de programació Versió CoAP implementada Client/Servidor Funcionalitats CoAP implenatades Llicència Enllaç
aiocoap Python 3 RFC 7252 Client + Server Blockwise Transfers, Observe (parcial) MIT https://pypi.python.org/pypi/aiocoap
Californium Java RFC 7252 Client + Server Observe, Blockwise Transfers, DTLS EPL+EDL https://www.eclipse.org/californium
cantcoap C++/C RFC 7252 Client + Server BSD https://github.com/staropram/cantcoap
Canopus Go RFC 7252 Client + Server Core Apache License 2.0 https://github.com/zubairhamed/canopus
CoAP implementation for Go Go RFC 7252 Client + Server Core + Draft Subscribe MIT https://github.com/dustin/go-coap
CoAP.NET C# RFC 7252, coap-13, coap-08, coap-03 Client + Server Core, Observe, Blockwise Transfers 3-clause BSD https://github.com/smeshlink/CoAP.NET
CoAPSharp C#, .NET RFC 7252 Client + Server Core, Observe, Block, RD LGPL http://www.coapsharp.com
CoAPthon Python RFC 7252 Client + Server + Forward Proxy + Reverse Proxy Observe, Multicast server discovery, CoRE Link Format parsing, Block-wise MIT https://github.com/Tanganelli/CoAPthon
Copper JavaScript (Browser Plugin) RFC 7252 Client Observe, Blockwise Transfers 3-clause BSD https://github.com/mkovatsc/Copper[enllaç sense format] https://addons.mozilla.org/firefox/addon/copper-270430/[Enllaç no actiu]
eCoAP C RFC 7252 Client + Server Core MIT https://gitlab.com/jobol/ecoap
Erbium for Contiki C RFC 7252 Client + Server Observe, Blockwise Transfers 3-clause BSD http://www.contiki-os.org/ (er-rest-example)
iCoAP Objective-C RFC 7252 Client Core, Observe, Blockwise Transfers MIT https://github.com/stuffrabbit/iCoAP
jCoAP Java RFC 7252 Client + Server Observe, Blockwise Transfers Apache License 2.0 https://code.google.cat/p/jcoap/[Enllaç no actiu]
libcoap C RFC 7252 Client + Server Observe, Blockwise Transfers, DTLS BSD/GPL http://sourceforge.net/projects/libcoap/develop
LibNyoci C RFC 7252 Client + Server Core, Observe, Block, DTLS MIT https://github.com/darconeous/libnyoci
lobaro-coap C RFC 7252 Client + Server Observe, Blockwise Transfers MIT http://www.lobaro.com/lobaro-coap
microcoap C RFC 7252 Client + Server MIT https://github.com/1248/microcoap
nCoap Java RFC 7252 Client + Server Observe, Blockwise Transfers, CoRE Link Format, Endpoint-ID-Draft BSD https://github.com/okleine/nCoAP
node-coap Javascript RFC 7252 Client + Server Core, Observe, Block MIT https://github.com/mcollina/node-coap
Ruby coap Ruby RFC 7252 Client + Server (david) Core, Observe, Block, RD MIT, GPL https://github.com/nning/coap[enllaç sense format] https://github.com/nning/david
Sensinode C Device Library C RFC 7252 Client + Server Core, Observe, Block, RD Comercial https://silver.arm.com/browse/SEN00
Sensinode Java Device Library Java SE RFC 7252 Client + Server Core, Observe, Block, RD Comercial https://silver.arm.com/browse/SEN00
Sensinode NanoService Platform Java SE RFC 7252 Cloud Server Core, Observe, Block, RD Comercial https://silver.arm.com/browse/SEN00
SwiftCoAP Swift RFC 7252 Client + Server Core, Observe, Blockwise Transfers MIT https://github.com/stuffrabbit/SwiftCoAP
TinyOS CoapBlip nesC/C coap-13 Client + Server Observe, Blockwise Transfers BSD http://docs.tinyos.net/tinywiki/index.php/CoAP Arxivat 2013-03-12 a Wayback Machine.
txThings Python (Twisted) RFC 7252 Client + Server Blockwise Transfers, Observe (partial) MIT https://github.com/mwasilak/txThings/
FreeCoAP C RFC 7252 Client + Server + HTTP/CoAP Proxy Core, DTLS, Blockwise Transfers BSD http://www.freecoap.org Arxivat 2017-03-24 a Wayback Machine.
coap-rs Rust RFC 7252 Client + Server MIT https://github.com/Covertness/coap-rs

Comunicacions en grup amb CoAP modifica

En moltes aplicacions CoAP és essencial de tenir la possibilitat de comunicar-se amb diferents nodes al mateix temps (per exemple per apagar o encendre totes les llums alhora). CoAP solventa aquesta necessitat amb unes extensions definides en la recomanació RFC 7390 que implementa una difusió múltiple (multicast) a tots els nodes del grup.

Vegeu també modifica

  • OMA LWM2M: protocol obert i de baixa complexitat per a la gestió de dispositius IoT o M2M.

Referències modifica

  1. «CoAP — Constrained Application Protocol | Overview» (en anglès). coap.technology, 20-04-2017. Arxivat de l'original el 2017-01-03. [Consulta: 20 abril 2017].
  2. Chen, Xi. «Constrained Application Protocol for Internet of Things» (en anglès). www.cs.wustl.edu. [Consulta: 20 abril 2017].
  3. Joncas, Roxanne. «MQTT and CoAP, IoT Protocols» (en anglès). eclipse.org, 20-04-2017. [Consulta: 20 abril 2017].
  4. «Hands-on with CoAP» (en anglès). Google Docs, 20-04-2017.