CoAP 综述

CoAP


参考

IETF
RFC 7252 中文
coap.technology
www.rfc-base.org Constrained RESTful Environments (CoRE) Parameters


CoAP

RFC 7252 Constrained Application Protocol
“The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained nodes and constrained networks in the Internet of Things. The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.”

Specification
CoAP is specified in a Standards-Track RFC. RFCs that serve as Internet Standards Documents are generated by the IETF based on an extensive technical review and quality control process. These are meant to last.


涉及标准

适用场景 特点 局限性

  • 点对点通信
  • 数据采集
  • M2M
  • 反向控制能力弱
  • 无状态连接
  • 遵循RESTful
  • DTLS

CoAP占用资源

RFC 7228 Terminology for Constrained-Node Networks

  • RAM:10KB
  • ROM:100KB

CoAP 实现

  • wakaama http://www.eclipse.org/wakaama/
    OMA Lightweight M2M C implementation designed to be portable on POSIX compliant systems

  • libcoap https://libcoap.net/
    C-Implementation of CoAP
    libcoap implements a lightweight application-protocol for devices that are constrained their resources such as computing power, RF range, memory, bandwith, or network packet sizes

  • microcoap https://github.com/1248/microcoap
    A tiny CoAP server for microcontrollers
    最精简实现,只有最简单的CoAP build dump,适用于单片机

  • lobaro-coap http://www.lobaro.com/portfolio/lobaro-coap/
    Complete CoAP Implementation in C 完整的实现CoAP
    The target audiance are experienced programmers with rich knowledge of the „C“ programming language.

    • Royalty-free CoAP stack
    • complete request/response logic
    • easy to use
    • small memory footprint
    • using C99 stdlib, suitable for embedded projects
    • detached packet receive/send logic
    • Arduino support (experimental)

DTLS

  • tinydtls
    tinydtls is a library for Datagram Transport Layer Security (DTLS) covering both the client and the server state machine. It is implemented in C and provides support for the mandatory cipher suites specified in CoAP.

COAP工具

为了测试代码的正确性,需要CoAP相关测试工具。

  • CoAP-cli,一个基于NodeJS的CoAP命令行工具,其核心是基于Node-CoAP库。
  • libcooap,一个用C写的CoAP命令行工具。
  • FireFox Copper, 一个Firefox的插件。
  • Wireshark,Wireshark 支持CoAP协议的解析器

REST model for small devices

server 提供可用的资源在一个URL下,client 使用四种方法获取GET, PUT, POST, and DELETE.

  • GET
  • PUT
  • POST
  • DELET

REST

web client 可以通过跨协议代理(CoAP HTTP)访问web资源和传感器资源,client不必关心资源到底是web提供还是传感器提供。

Discovery integrated

转载于:https://my.oschina.net/Jr413/blog/834238

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值