[BLE] 不同的 Advertising 種類與用途

在 BLE 通訊協定中,
BLE 裝置透過 Advertising 告知周邊 BLE 裝置自己的存在,
其中, 考慮到 WiFi 的干擾,
Advertising 封包在以下 3 個 bluetooth channel 上廣播:
channel 37 (2402 MHz), channel 38 (2426 MHz), 和 channel 39 (2480 MHz),
我們可以利用下圖來了解其中干擾的關係:


對於 connection 之後的資料傳輸,
則使用其他 bluetooth channel 進行通訊,
並藉由展頻通訊 (跳頻) 的方法, 對抗 WiFi 通訊產生的干擾,

透過不同的通訊目標, BLE 設計了 4 種不同的 advertising 的方式,
如下表所示:
Advertising PDUDescriptionMax Adv Data LenMax Scan Res LenAllow Connect
ADV_INDUsed to send connectable undirected advertisement31 bytes31 bytesYes
ADV_DIRECT_INDUsed to send connectable directed advertisementN/AN/AYes
ADV_SCAN_INDUsed to send scannable undirected advertisement31 bytes31 bytesNo
ADV_NONCONN_INDUsed to send non-connectable undirected advertisement31 bytesN/ANo

Advertising Data (Adv Data) 代表在 advertising 封包中自帶的資訊,
在 BLE 中, 此資料的長度為 31 bytes.
更多的資訊可以透過 Scan Request (Scan Res) 像發送端要求,
若發送端有支援, 則可以附加額外 31 bytes 的資訊.

其中,  無定向 (undirected) 代表是向所有 BLE 裝置進行發送,
相反的, 定向 (directed) 則只有特定 BLE 裝置可以連接,
在定向封包中 (ADV_DIRECT_IND) 將會包含目標 BLE 裝置的識別 (6 bytes),
因此, 只有特定 BLE 裝置能夠回復, 並建立連線.

另一方面, 還可以根據建立連線的能力, 來區分不同的 advertising 訊息,
其中, 前兩項格式, 都是發出訊息, 邀請其他 BLE 裝置建立連線,
後兩項則無法建立連線, 而是藉由 advertising 進行資料廣播,
其中差別在於是否可以透過 Scan Request (Scan Res) 獲得更多的資訊.

當 BLE 裝置以 peripheral 的角色建立連線之後,
在 TI 和 Nordic 的實作中, 仍可發送非連線需求的 advertising 封包,
https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/383746
https://devzone.nordicsemi.com/f/nordic-q-a/6102/peripheral-device-non-connectable-advertisement-while-in-a-connected-state
但是考慮到 peripheral 只能建立一個連線, 因此無法發出含連線需求的 advertising 封包,
同時, advertising 封包的傳送間隔也最好大於 100 ms,
避免對連線封包的傳輸造成干擾.

留言

熱門文章

LTE筆記: RSRP, RSSI and RSRQ

[WiFi] WiFi 網路的識別: BSS, ESS, SSID, ESSID, BSSID

LTE筆記: 5G NR Measurement Events