1. FreeCoAP
- FreeCoAP
- 开发语言: C
- 功能: Client + Server + HTTP/CoAP Proxy
- 模块: Core, DTLS, Blockwise Transfers
- 开源协议:BSD
- 下载地址:https://github.com/keith-cullen/FreeCoAP](https://github.com/keith-cullen/FreeCoAP)
- 支持平台:Linux(gnulinux)
2. 源代码目录
├── build-aux
├── certs
├── docs
├── lib
│ ├── include
│ └── src
├── proxy
│ ├── common
│ │ ├── include
│ │ └── src
│ └── http_coap
│ ├── include
│ └── src
├── sample
│ ├── reg_client
│ ├── reg_server
│ ├── time_client
│ └── time_server
└── test
├── test_coap_client
├── test_coap_mem
├── test_coap_msg
├── test_coap_server
├── test_config
├── test_cross
├── test_data_buf
├── test_http_client
├── test_http_msg
├── test_lock
├── test_proxy_http_coap
├── test_thread
├── test_tls_client
├── test_tls_server
└── test_uri
3. 编译
-
创建安装脚本
cd /home/xxx/work/coap/FreeCoAP-master autoreconf --install
-
编译
-
在CentOs7中安装gnutls
yum install gnutls* # 注意: 编译时,源代码中有include <gnutls/x509.h>,因此,还需要安装gnutls-develop # 或安装 yum install gnutls-develop # 查看头文件 ls /usr/include/gnutls/x509.h /usr/include/gnutls/x509.h # 创建libgnutls.so的软链接 cd /lib ln -s /usr/lib64/libgnutls.so.28.43.3 libgnutls.so
-
cd /home/xxx/work/coap/FreeCoAP-master mkdir bin ./configure --prefix=/home/xxx/work/coap/FreeCoAP-master/bin make make install # 查看输出 ll /home/xxx/work/coap/FreeCoAP-master/bin/lib/ -rw-r--r--. 1 root root 268930 4月 22 11:52 libfreecoap.a -rwxr-xr-x. 1 root root 988 4月 22 11:52 libfreecoap.la lrwxrwxrwx. 1 root root 20 4月 22 11:52 libfreecoap.so -> libfreecoap.so.0.0.5 lrwxrwxrwx. 1 root root 20 4月 22 11:52 libfreecoap.so.0 -> libfreecoap.so.0.0.
-