Hi
I am experimenting with connecting to BLE devices and hope there maybe some experts out there who can help. I have been pretty successful at connecting to various devices but something is bugging me.
I have a Polar H7 Heart Rate Monitor - about as inductry standard as you can get.
I define
let BLE_Heart_Rate_Service_CBUUID = CBUUID(string: "0x180D")
and use
self.centralManager.scanForPeripherals(withServices: [BLE_Heart_Rate_Service_CBUUID])
as predicted the central manager calls didDiscover and I can move on to connecting, discovering characteristices etc.
I also have a development board from Cypress which is programmed with Immediate Alert service (0x1802)
I define
let BLE_Find_Me_Service_CBUUID = CBUUID(string: "0x1802")
and call
self.centralManager.scanForPeripherals(withServices: [BLE_Find_Me_Service_CBUUID])
For this device it cannot find the device. didDiscover is not called
If I try
self.centralManager.scanForPeripherals(withServices: nil)
I can debug print a list of every device found and the one I'm looking for is there.
I can filter in this call back on the name and move on but was wondering of anyone knew why scanForPeripherals works or doesnt work as I described.
Sorry if that was a bit rambling.
Regards