Lwm2m之leshan服务器连接

LwM2M

  • 关于lwm2m 协议介绍部分,请自行百度.

  • eclipse 提供了一个开源的client service 实现,包含java 以及c 的实现。分别为下面的两个git repo
    https://github.com/eclipse/leshan
    https://github.com/eclipse/wakaama

  • leshan 提供了一个在线的leshan server及其bootstrap server
    https://leshan.eclipseprojects.io/
    https://leshan.eclipseprojects.io/bs/

连接到LwM2M Server

目标

本地搭建server 和client

  • 使用leshan 提供的client 连接到server 上。
  • download 相关的java jar包
wget https://ci.eclipse.org/leshan/job/leshan/lastSuccessfulBuild/artifact/leshan-server-demo.jar
wget https://ci.eclipse.org/leshan/job/leshan/lastSuccessfulBuild/artifact/leshan-client-demo.jar
  • 启动服务
java -jar leshan-server-demo.jar -ln 10.0.20.193

在这里插入图片描述

  • 启动client
java -jar leshan-client-demo.jar -u 10.0.20.193:5683

在这里插入图片描述

  • 通过server 8080 端口查看注册的设备信息
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

使用wakaama 连接到测试的公共leshan server

  • 详细参考该连接,https://github.com/eclipse/wakaama/issues/673
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值