I try to add the BLE device address to the advertisement data in Cypress PSoC Creator 4.2.
I checked the associated box in the GAP Settings and build the project for my PSoC 4 device (CYBLE-212006-01).
In my iOS App I use the following routine (CBCentralManager) to discover peripherals and print the advertisement data:
func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber){
if peripheral.name != nil {
if peripheral.name!.contains("TEST") {
print(advertisementData)
self.internalPeripheralArray.append(BluetoothPeripheral(name: peripheral.name!, UUID: peripheral.identifier, RSSI: RSSI, peripheral: peripheral, selected: false))
self.internalPeripheralArray.sort(by: {($0.RSSI.intValue) > ($1.RSSI.intValue)})
}
}
}
The console prints:
["kCBAdvDataLocalName": TEST, "kCBAdvDataIsConnectable": 1]
I can't understand, why my BLE device address is not printed!
BTW:
If I add any other advertisement data package, for example the TX power level, it is immediately shown in my print output.