赞
踩
BLE就是低功耗蓝牙,从蓝牙4.0起分出来的方式。蓝牙低功耗(BLE)技术是低成本、短距离、
可互操作的鲁棒性无线技术,工作在免许可的2.4GHz ISM射频频段。其调频算法主要有两种:
1、Channel Selection Algorithm #1
2、Channel Selection Algorithm #2
来源:蓝牙core5.0 vol6 B 4.5.8 P2644页
一些概念:
hopIncrement:跳频增量,就是跳频增加的数.其他的再加
这个信道选择算法比较简单,实现该信道算法跟随还是很简单的。
Channel Selection Algorithm #1 only supports channel selection for connection
events
主要过程:
1.hop和上一次信道相加并取余37
unmappedChannel = (lastUnmappedChannel + hopIncrement) mod 37
2.如果该信道在可用信道上则在该信道上
3.不然就采取在可用信道上直接取余,然后映射
remappingIndex = unmappedChannel mod numUsedChannels
现在还没有例子,等有空抄大佬们的一个
算法2就复杂了,引入了连接事件次数 connectEvent,每次连接该值是0. Channel Selection Algorithm #2 supports channel selection for connection events and periodic advertising packets(周期性广告包). 一些概念 channelIdentifier:信道标识符,由access address组成,每次连接固定的 The 16-bit input counter 输入计数器,用在该算法中 The 16-bit input counter changes for each event. For data 加粗样式 connections it is the connection event counter connEventCounter defined in Section 4.5.1. For periodic advertising it is the event counter paEventCounter defined in Section 4.4.3.4. The permutation operation 排列操作,couter流水线计算的一个过程 MAM Multiply, Add, and Modulo 乘加余 pseudo-random number 伪随机数 主要过程: 1.channelIdentifier计算,couter计算,也不是计算,就是使用这个值 channelIdentifier = (Access Address31-16) XOR (Access Address15-0) 2.couter像是进入一个流水线一样,与channelIdentifier进行一堆计算。XOR PREM MAM 生成prn_e 3.取余求取,如果在则是,如果不在重新映射。这个映射算法也不简单,哎 现在还没有例子,等有空抄大佬们的一个
该算法整个整个流程
prn_e生成过程
prn_e生成过程中的XOR
The “XOR” operation always refers to a 16-bit bit-wise XOR.
prn_e生成过程中的 PREM
prn_e生成过程中的MAM
prn_e映射
重新映射的
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。