[BLE] 不同的 Advertising 種類與用途
在 BLE 通訊協定中, BLE 裝置透過 Advertising 告知周邊 BLE 裝置自己的存在, 其中, 考慮到 WiFi 的干擾, Advertising 封包在以下 3 個 bluetooth channel 上廣播: channel 37 (2402 MHz), channel 38 (2426 MHz), 和 channel 39 (2480 MHz), 我們可以利用下圖來了解其中干擾的關係: 來自: https://www.infsoft.com/technology/sensors/bluetooth-low-energy-beacons 對於 connection 之後的資料傳輸, 則使用其他 bluetooth channel 進行通訊, 並藉由展頻通訊 (跳頻) 的方法, 對抗 WiFi 通訊產生的干擾, 透過不同的通訊目標, BLE 設計了 4 種不同的 advertising 的方式, 如下表所示: Advertising PDU Description Max Adv Data Len Max Scan Res Len Allow Connect ADV_IND Used to send connectable undirected advertisement 31 bytes 31 bytes Yes ADV_DIRECT_IND Used to send connectable directed advertisement N/A N/A Yes ADV_SCAN_IND Used to send scannable undirected advertisement 31 bytes 31 bytes No ADV_NONCONN_IND Used to send non-connectable undirected advertisement 31 bytes N/A No (來自: Bluetooth Low Energy Scanning and Advertising ) Advertising Data (Adv Data) 代表在 advertising 封包中自帶的資訊, 在 BLE 中, 此資料的長度為 31 bytes. 更多的資訊可以透過 Scan