BLE ADVERTISE

Dear Apple: The program we developed uses BLE broadcasting to discover devices. The discovered device sends three broadcasts, but when we debug the program, we found that the addresses reported by centralManager::didDiscoverPeripheral for the same device's three broadcasts are actually different CBPeripheral * addresses. I would like to ask how we can identify that these three broadcasts are from the same device? Are there any variables in the peripheral that can identify it as the same device? Thanks。

Are you actually checking the CBPeripheral * address to see if these are the same device?

Those are temporary objects passed on to didDiscoverPeripheral(). The objects themselves are not meaningful to identify peripherals. You will want to use the peripheral UUID property to identify the peripherals.

That said, the UUID can also change over time. If you want to permanently identify a peripheral over a period of time, you will need to add an identifying piece of data to the advertisements. The advertised name data field is usually used.


Argun Tekant /  DTS Engineer / Core Technologies

BLE ADVERTISE
 
 
Q