【BLE】CC2541實時更新廣播包advertData內容
阿新 • • 發佈:2019-02-03
advertData[]是廣播包資料。
實時更新廣播包的API:
extern bStatus_t GAP_UpdateAdvertisingData( uint8 taskID, uint8 adType, uint8 dataLen, uint8 *pAdvertData );
引數說明:
taskID: task ID of the app requesting the change
adType:TRUE - advertisement data, FALSE - scan response data
dataLen:Octet length of advertData
pAdvertData :advertising or scan response data
當adType型別為TRUE的時候實時更新的是廣播包資料,為FALSE的時候更新的是掃描迴應的資料(掃描迴應有一個LocalName[]的引數可以用於更改名字的處理);dataLen是pAdvertData資料的長度(按位元組算的),pAdvertData廣播包值或者掃描迴應的值。