Home iOS Core Bluetooth not working on Bluetooth 5.0 Devices (iPhone X, iPhone 8, iPhone 8 Plus)
Reply: 0

iOS Core Bluetooth not working on Bluetooth 5.0 Devices (iPhone X, iPhone 8, iPhone 8 Plus)

user967
1#
user967 Published in June 21, 2018, 4:39 am

I'm working on BLE, my code run perfectly on bluetooth 4.2 devices (iPhone SE, iPhone 6, iPhone 6 Plus, iPhone 7). When I switch to on Bluetooth 5.0 devices(iPhone X, iPhone 8 Plus), my code will stop at didDiscoverPeripheral function, will not get into didConnectPeripheral function.

- (void) centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI {

    if ([peripheral.name isEqualToString:bleDic[@"name"]]) {

        self.connectedPeripheral = peripheral;
        self.connectedPeripheral.delegate = self;                           
        [self.cm connectPeripheral:self.connectedPeripheral options:nil];
    }
}

- (void)centralManager:(CBCentralManager *)central didConnectPeripheral:(CBPeripheral *)peripheral {

   [self.connectedPeripheral discoverServices:@[[CBUUID UUIDWithString:ServiceUUID]]];
}
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.311972 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO