Reputation: 41
Please suggest me how to control Scan Request from iOS side as central?
How to distinguish the scan response packet and advertisement packet, in the advertisementData in the below delegate call:
- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI
Upvotes: 3
Views: 601
Reputation: 53870
The iOS Core Bluetooth framework combines these steps for you. When iOS discovers a peripheral that is advertising one of the services that you're scanning for (scanForPeripheralsWithServices:options:
), iOS automatically retrieves the scan response data.
There is currently no way to do these tasks separately.
All of the advertisement data including the scan response data can be accessed via the advertisementData
NSDictionary parameter using the Advertisement Data Retrieval Keys.
Perhaps if you explained what the concern is or what you're trying to accomplish, we could offer more help.
Upvotes: 3