californium

MQTT研究之EMQ:【CoAP协议应用开发】

左心房为你撑大大i 提交于 2020-04-30 20:46:34
本博文的重点是尝试CoAP协议的应用开发,其中包含CoAP协议中一个重要的开源工具libcoap的安装和遇到的问题调研。当然,为了很好的将EMQ的CoAP协议网关用起来,也调研了下EMQ体系下,CoAP的使用逻辑, CoAP支持明文,也支持DTLS的安全传输。 首先,介绍下libcoap的环境准备,然后基于libcoap进行EMQ的CoAP协议支持的验证。我的环境信息如下: 1. Linux: 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux 2. libcoap: 4.1.1 3. EMQ:起初10.95.200.11上是EMQ v2.3.11,后来验证coap无法正常工作,将EMQ的V3版本即emqx v3.0.1在10.95.197.8上安装,再次验证coap工作。 为了验证后面的COAPS通信,即CoAP基于DTLS的安全通信,这里,将libcoap的SSL环境也做一下准备,libcoap支持多种SSL的组件,这里,选择最为基础的且是最为常用的组件openssl。 1. libcoap带安全组件的环境构建 1) 首先安装openssl, 需要的openssl的版本比较高点,操作系统原始带有的openssl版本为1.0.1

物联网时代 跟着Thingsboard学IOT架构-CoAP设备协议

末鹿安然 提交于 2020-04-27 10:03:02
thingsboard官网: https://thingsboard.io/ thingsboard GitHub : https://github.com/thingsboard/thingsboard thingsboard提供的体验地址: http://demo.thingsboard.io/ BY Thingsboard team 以下内容是在原文基础上演绎的译文。除非另行注明,页面上所有内容采用知识共享-署名( CC BY 2.5 AU )协议共享。 原文地址: ThingsBoard API参考: CoAP设备API CoAP 协议介绍 CoAP是一种在物联网世界的类web协议,它的详细规范定义在 RFC 7252 。COAP名字翻译来就是“受限应用协议”,顾名思义,使用在资源受限的物联网设备上。物联网设备的ram,rom都通常非常小,运行TCP和HTTP是不可以接受的。 协议特点 CoAP协议网络传输层由TCP改为UDP。 它基于REST,server的资源地址和互联网一样也有类似url的格式,客户端同样有POST,GET,PUT,DELETE方法来访问server,对HTTP做了简化。 COAP是二进制格式的,HTTP是文本格式的,COAP比HTTP更加紧凑。 轻量化,COAP最小长度仅仅4B,一个HTTP的头都几十个B了。 支持可靠传输,数据重传,块传输。

Eclipse Californium CoAP wildcard as url path

家住魔仙堡 提交于 2019-12-10 11:29:52
问题 I'm working on a CoAP app using Eclipse Californium that will declare explicitly only the root resource path, and the rest of the resources should be served and resolved through a wildcard /root/* just like on REST APIs or servlets. Is there any way to achieve that ? 回答1: Ok I managed to do it. So after a few hours of digging on their Source code here is what ended up doing. Note that it works but it's only to show how it could be done, it's still a work on progress (I did this in 3h) as I

Eclipse Californium CoAP wildcard as url path

狂风中的少年 提交于 2019-12-06 10:29:40
I'm working on a CoAP app using Eclipse Californium that will declare explicitly only the root resource path, and the rest of the resources should be served and resolved through a wildcard /root/* just like on REST APIs or servlets. Is there any way to achieve that ? Ok I managed to do it. So after a few hours of digging on their Source code here is what ended up doing. Note that it works but it's only to show how it could be done, it's still a work on progress (I did this in 3h) as I removed some code like observer etc.. As soon as I have some time, I'll digg onto the Californium Api more and