ble mesh-provisioning组网流程详解(1)

组网过程(provisioning)是ble mesh 核心流程,先从宏观上了解整个组网过程,再深入到协议的算法,个人认为更加容易接受一些。

请尊重原创,引用请标明出处https://editor.csdn.net/md/?articleId=104375184

组网流程图在这里插入图片描述

总结为五个步骤:

  1. beaconing 信标
  2. 邀请入网,交换设备能力信息(support feature,io cap)
  3. 交换public key
  4. 加密,
  5. 分发组网数据

初步印象,整个过程跟ble smp 流程非常相似。

Beaconning

一个全新的设备,没有加入过任何网络
如果需要加入到mesh 网络,需要向porvisioner 发送ADV

要告诉周围的设备,希望加入mesh 网络,并且现存网络中的设备处于scan 模式,能够收听到这个讯息,注意两点

  1. provisioner 需要处于scan 模式
  2. new device 发送Unprovisioned Device beacon

Note:如果一个设备以及配对过,有加入到网络,需要发送匿名广播,或者私有地址广播,区别于Unprovisioned Device beacon

Invitation在这里插入图片描述

provisioner 接收到beacon 之后,会邀请该设备入网,并且会交换一些必要的设备信息,为后续步骤做准备。

这个过程中有一些特殊的数据帧格式需要特别留意:

Provisioning Invite PDU
an Attention Duration field, used to determine how long the primary element of the device identifies itself using the Attention Timer,
告诉新设备,我会等你多久

Provisioning Capabilities PDU

  1. the number of elements the device supports,
  2. the set of security algorithms supported,
  3. the availability of its public key using an OOB technology,
  4. the ability for this device to output a value to the user,
  5. the ability for this device to allow a value to be input by the
    user,
  6. and if the device has a block of OOB data that can be used for
    authentication

*这些信息,决定后后面加密采用的哪种方式,加密

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值