如何将CoAP转换为HTTP? [英] How to transform CoAP to HTTP?

查看:135
本文介绍了如何将CoAP转换为HTTP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我进行了搜索,但没有找到任何示例说明如何将CoAP请求或响应转换为HTTP请求.

I searched but did not found any example showing on how to convert CoAP request or response to HTTP request.

基本上我想做的是CoAP请求将设备中的一些数据发送到服务器,服务器会将其转换并执行HTTP请求POST到其他服务器以保存在数据库中.

Basically what I want to do is CoAP request POST some data from device to a server which will translate it and do HTTP request POST to other server to be save inside the database.

虽然现在保存数据的部分不是主要问题,但我没有找到任何示例脚本来说明如何从CoAP转换为HTTP.

While the part to save the data is not a major problem right now, I did not managed to find any example script showing how to convert from CoAP to HTTP.

我已经看过 coapthon

I already looked at coapthon , aiocoap but since aiocoap requires python 3.5,(I use python 2.7) that left me with coapthon. Unfortunately coapthon only has HTTP to CoAP proxy while CoAP to HTTP is still in development.

如果有人知道与此有关的其他项目或对如何解决此问题有任何意见,我很高兴可以与您分享.谢谢.

If anyone know other project regarding this or has any opinion on how to solve this, I am glad if you can share it. Thank you.

推荐答案

即协议互操作性.您需要一个CoAP - HTTPHTTP - CoAP代理,它们可以在它们之间转换消息.

That is called Protocol Interoperability. You Need a CoAP - HTTP and HTTP - CoAP proxy that can translate the messages between them.

这里是GitHub上的 californium-proxy 它已经.这是示例,其中显示了如何使用它

Here is californium-proxy on GitHub, I am using it already. Here is the example that shows how to use it.

这篇关于如何将CoAP转换为HTTP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆