• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

hirotakaster/CoAP-simple-library

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

hirotakaster/CoAP-simple-library

开源软件地址(OpenSource Url):

https://github.com/hirotakaster/CoAP-simple-library

开源编程语言(OpenSource Language):

C++ 100.0%

开源软件介绍(OpenSource Introduction):

CoAP client, server library for Arduino.

CoAP simple server, client library for Arduino IDE/PlatformIO, ESP32, ESP8266.

Source Code

This lightweight library's source code contains only 2 files. coap-simple.cpp, coap-simple.h.

Example

Some sample sketches for Arduino included(/examples/).

  • coaptest.ino : simple request/response sample.
  • coapserver.ino : server endpoint url callback sample.
  • esp32.ino, esp8266.ino : server endpoint url callback/response.

How to use

Download this source code branch zip file and extract it to the Arduino libraries directory or checkout repository. Here is checkout on MacOS X.

cd $HOME/Documents/Arduino/libraries/
git clone https://github.com/hirotakaster/CoAP-simple-library
# restart Arduino IDE, you can find CoAP-simple-library examples.

These examples need CoAP server libcoap or microcoap server to test the example program.

This is how to use the example with libcoap on Ubuntu Linux. You don't need to use CoAP server(request/reseponse), simply follow these steps :

git clone https://github.com/obgm/libcoap 
cd libcoap/
./autogen.sh 
./configure
make
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.libs
gcc -o coap-server ./examples/coap-server.c -I./include -I. -L.libs -lcoap-1 -DWITH_POSIX
gcc -o coap-client ./examples/client.c ./examples/coap_list.c -I./include -I. -L.libs -lcoap-1 -DWITH_POSIX
./coap-server
# next start Arduino and check the request/response.

Particle Photon, Core compatible

Check this version of the library for Particle Photon, Core compatibility.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap