Tutorial by Examples

For this example I have a controlled room with a single BLE device enable. Your class should extend CBCentralManagerDelegate. Implement the method: centralManagerDidUpdateState(_ central: CBCentralManager). Use global queue to not freeze the screen while searching for a device. Instantiate CBC...
I'm in a controlled room with a single minew beacon that use IBEACON protocol. BLEController needs to extend CBPeripheralDelegate I'll use the first BLE to connect after the search has stop. Modify the method StopSearchBLE() class BLEController: CBCentralManagerDelegate, CBPeripheralDelegate...
You need discover the services and characteristic You don't need read value from the characteristic before writing over it. will continue for, for this example, after read value. Modify func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?)...

Page 1 of 1