Channels 通道
3 Advertising Channels and 37 Data Channels 3个广播通道以及37个数据通道
States and Network Topology 状态和网络拓扑
•There are six possible Link Layer states of a BLE device: BLE设备的六种链路层状态
–Standby-device is not transmitting or receiving any data, and is not connected to any other device 等待
–Advertiser -periodically broadcasting advertisements 广播
–Scanner -actively looking for advertisers 搜索
–Initiator -actively trying to initiate a connection with another device 初始化
–Master -connected to another device as a master 主机
–Slave -connected to another device as a slave 从机
•BLE is a star topology network:
–Master device “manages” the connection, and can be connected to multiple slaves 主机管理连接
–Slave device can only be connected to one master
States Flow ChartTI 状态的流程图
Advertisement EventsTI 广播事件
•A device in the advertising state transmits advertising packets 设备处于广播状态时进行广播包传输
–Advertising packets can contain a data payload 广播包包含数据负载
–Advertising packets can be directed towards a specific scanner device, or undirected
–Advertisements can be connectable or non-connectable (and therefore just used for broadcast of data)
•During one “advertising event”, an advertisement packet is transmitted on each of the three advertising channels (37, 38, and 39)
当处于广播事件,广播包在广播通道(37,38,39)进行传输
Advertisement IntervalsTI confidential 广播间隔
•The advertising device has an “advertising interval”,which is the minimum amount of time between two advertising events
•Advertising Interval can be any amount of time between 20ms and 10.24s
•The Link Layer generates a pseudo-random amount of time between 0ms and 10ms (“advertising delay”) during each advertising event. This delay is added to the advertising interval before the next advertising event, in order to prevent “beating” from multiple devices
Advertisement Types
•Advertising packets can contain a data payload, and therefore broadcast data without a connection
•Four types of advertisements:
–Connectable undirected-any scanner device can initiate a connection with this advertiser
–Connectable directed-only one specific device can initiate a connection with this advertiser
–Non-connectable undirected-no devices can initiate a connection with this advertiser; primarily used for general broadcast of data
–Discoverable undirected-any scanner device can request more information from the advertising device, but no devices can initiate a connection with it
ScanningTI
•Passive Scanning
–Scanner listens on advertising channels for advertising packets
–When an advertisement packet is received, it passes the information up to the host
•Active Scanning
–Scanner listens on advertising channels for advertising packets
–When an advertisement packet is received, it responds with a “scan request” packet
–Advertiser then responds back with a “scan response” packet (this packet can contain additional data from advertiser)
Connection InitiationTI confidential
•After a scanner device has scanned a connectable advertisement message, it can become an “initiator” by sending a “connection request” packet to the advertiser
•Connection request contains a set of link layer parameters for the slave device, which dictate the channels and timing requirements for the connection
•If the advertiser accepts the connection, both devices enter a connected state, with the initiator becoming the “master” and the advertiser becoming the “slave”
Connection Parameters
Connection Events
Slave Latency
Connection Parameters Tradeoffs
Connection Update Request
Connection Termination
总结: