Qt6 topics merged with General

qLowEnergyController issues in iOS9?

  • Are there any known issues with qLowEnergyController in iOS v9.x? I had someone try to use my app on an ipad running iOS 9.3.5 and apparently it just crashes when he tries to connect to device using qLowenergyController. It works fine on iOS 11 and Android.

    I don't have a device that runs iOS 9 to test with, so I figured I would just ask here if anyone knows of any issues that I should look out for?

  • Moderators

    @kgregory ios9 huh,
    If that person doesn‘t use ios10, because the hardware does not support an upgrade, than chances are relatively high that the hardware does not support BLE.

    E.g. All devies since iPhone 4S support le, but iOS 10 already drops the support for iphone4s,

    Do you Check anywhere for that?

  • Qt Champions 2016

    @kgregory you can search for 'ekkes BTLE example' in Apple App Store and see if it works on that device.
    if yes: here's the blog: https://appbus.wordpress.com/2017/06/29/ekkes-bt-le-example-app/
    and the src: https://github.com/ekke/ekkesBTLEexample

  • @J.Hilk That was my thought. I asked him and he said it does, but I have a feeling he doesn't know the difference between bluetooth and BLE. He says he checked if an update was available and it said no update available.

    How would I go about having the app check for BLE support? While I'm at it, I should probably have it check that bluetooth is enabled.

    @ekkescorner It's not my device, I'm just getting messages from a guy that is trying to run my app. I'd rather not confuse him as it's going to be hard for me to figure out exactly what he did, so it's likely to add alot of frustration and not much value.

  • Moderators

    mmh, not sure if it's possible from the Qt-Side.

    There is the QBluetoothDeviceDiscoveryAgent::UnsupportedDiscoveryMethod: error message, when you scan for Bluetooth devices with LowEnergy-Filter, but I found that a good bit unreliable.

    theres also CoreLocation from Ios, and you could check this way:

    f ([CLLocationManager isMonitoringAvailableForClass:[CLBeaconRegion class]]){
        NSLog(@"Bluetooth LE is supported");

    Therse also the CBCentralManager , that one is probably the best method, as you'll get the most information of the BT-State:

    switch ([_manager state])
        case CBCentralManagerStateUnsupported:
            NSLog(@"This device does not support Bluetooth Low Energy.");
        case CBCentralManagerStateUnauthorized:
           NSLog(@"This app is not authorized to use Bluetooth Low Energy.");
        case CBCentralManagerStatePoweredOff:
           NSLog(@"Bluetooth on this device is currently powered off.");
        case CBCentralManagerStateResetting:
            NSLog(@"The BLE Manager is resetting; a state update is pending.");
        case CBCentralManagerStatePoweredOn:
            NSLog( @"Bluetooth LE is turned on and ready for communication.");
        case CBCentralManagerStateUnknown:
            NSLog( @"The state of the BLE Manager is unknown.");
           NSLog(@"The state of the BLE Manager is unknown.");

  • Qt Champions 2016

    @kgregory I thought it could be helpful to see IF BT LE is supported on the device. If not - my app also would crash. But if my app runs you can take a look at the sources to see how I'm using QLowEnergyController.

  • @ekkescorner I understand. I just don't want to walk this guy through your app over email and I don't think he wants to go through the trouble either.

    There will probably be other people who encounter this issue as well, so I figure it's probably better if the app can just detect that BLE is not supported and alert the user.

Log in to reply