摘要
由于物联网中的很多设备都是资源受限型的,即只有少量的内存空间和有限的计算能力,所以传统的HTTP协议应用在物联网上就显得过于庞大而不适用。IETF的CoRE工作组提出了一种基于REST架构的CoAP协议。CoAP是6LoWPAN协议栈中的应用层协议。该文在详细介绍了CoAP协议的内容、特点和交互模型后,在uIPv6 START KIT无线网络开发套件上,使用Contiki嵌入式操作系统,不仅在浏览器端实现了CoAP协议,而且用自己编写的客户端程序实现了CoAP协议,增加了和数据库之间的交互功能,从而实现了在Web界面上不仅可以查看实时数据,还可以查看历史数据的功能。
Many devices in the Internet of Things are resource-constrained, which have small amount of memory space and limited computing ability, so the traditional HTTP protocol is too large and not applicable. Therefore, CoRE working group in the IETF proposes a CoAP protocol based onthe REST architecture. CoAP is an application layer protocol of 6LoWPAN protocol stack. This paper describes the content, features, and interaction model of the CoAP protocol. Finally, with the Contiki embed-ded operating system used in the wireless network uIPv6 START KIT development kit, the CoAP protocol is implemented not on-ly on the browser side, but also on the client-side program developed by the author to strengthen the interaction with the data-base. The function of viewinz the most recent data as well as the historic data on the Web interface is achieved.
出处
《现代电子技术》
2013年第1期40-44,共5页
Modern Electronics Technique