Nominate our 2022 Qt Champions!

Qt Low energy scanner example and android 5.0.2

  • Hi All,
    I am trying to use the Qt Low energy scanner example running on a samsung galaxy tab(running android 5.0.2) to connect to a BLE device, list the available service and characteristics.

    It is able to connect to the device and list the services. It was also able to connect to all but one service and list the characteristics available.

    When I try to execute discoverDetails() and collect information about this service, I get the following error message:
    D/QtBluetoothGatt( 9805): Non-readable characteristic 00004a5b-0000-1000-8000-00805f9b34fb for service 11223344-5566-7788-99aa-bbccddeeff00
    W/System.err( 9805): java.lang.SecurityException: Need BLUETOOTH_PRIVILEGED permission: Neither user 10266 nor current process has android.permission.BLUETOOTH_PRIVILEGED.
    W/System.err( 9805): at android.os.Parcel.readException(
    W/System.err( 9805): at android.os.Parcel.readException(
    W/System.err( 9805): at android.bluetooth.IBluetoothGatt$Stub$Proxy.readCharacteristic(
    W/System.err( 9805): at android.bluetooth.BluetoothGatt.readCharacteristic(
    W/System.err( 9805): at
    W/System.err( 9805): at$900(
    W/System.err( 9805): at$2.onDescriptorRead(
    W/System.err( 9805): at android.bluetooth.BluetoothGatt$1.onDescriptorRead(
    W/System.err( 9805): at android.bluetooth.IBluetoothGattCallback$Stub.onTransact(
    W/System.err( 9805): at android.os.Binder.execTransact(

    I tried adding permissions to the AndroidManifest.xml. However, that did not seem to fix the issue

    Can someone please help

Log in to reply