From 10:00 CET Friday 22nd November we will adjust how the server works to deal with some recently reported problems. Therefore there may be a load problem, if you experience more problems than usual trying to access the forum then please PM AndyS or any of the moderators so they can inform me.


Bluetooth Low Energy Characteristic Indications (not Notifications)



  • Can anybody explain how Bluetooth Low Energy Indications (QLowEnergyCharacteristic::Indicate) are supposed to work please?
    There is very little documentation on them so I assume they work very similair to BTLE Notifications. Is that correct?

    The Heart Listener example has this code where notifications are enabled:
    const QLowEnergyDescriptor m_notificationDesc = characteristic.descriptor(QBluetoothUuid::ClientCharacteristicConfiguration);
    if (m_notificationDesc.isValid()) m_service->writeDescriptor(m_notificationDesc, QByteArray::fromHex("0100"));

    So is it a matter of setting the bit flags differently?

    And can I assume indiciations are delivered through characteristicChanged?
    connect(m_service, SIGNAL(characteristicChanged(QLowEnergyCharacteristic,QByteArray))

    I would be very thankful for a small example or verification of my assumptions.
    Cheers



  • A bit of a late response, but...

    Assuming the GATT server on the other end has a characteristic that allows for Indicate, then the only thing that needs to change is the value that you write to the descriptor. Set Bit 1 of the CCC to enable indicates by writing "0200" instead of "0100" (the descriptor is little-endian according to the BLE documentation for the Client Characteristic Configuration descriptor).

    As far as I know, indications are delivered with the characteristicChanged signal just like notifications.