How to transform CoAP to HTTP?

佐手、 提交于 2019-12-23 02:42:10

问题


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

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.

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.

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.


回答1:


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

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



来源:https://stackoverflow.com/questions/43992052/how-to-transform-coap-to-http

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!