Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Bluetooth Low Energy BLE Indicate Response
Forum Updated to NodeBB v4.3 + New Features

Bluetooth Low Energy BLE Indicate Response

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 735 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • JanosJ Offline
    JanosJ Offline
    Janos
    wrote on last edited by
    #1

    Hello,
    does anybody have experience with sending out indications as a BLE peripheral?
    To send out indications, I configure the characteristic accordingly (see below) and issue a write to the charactersistic:

    QLowEnergyService::writeCharacteristic(characteristic, response, QLowEnergyService::WriteMode::WriteWithResponse);
    

    By that, as opposed to notifications, I should receive a response/confirmation.
    The bluez logging indeed prints out an event, that a response has been received.

    But how do I get the response/confirmation into my Qt application? I registered for all the signals defined in http://doc.qt.io/qt-5/qlowenergyservice.html#signals. First I expected to receive the confirmation signal in the "characteristicWritten" signal, but then I read the note:

    Note: This signal is only emitted for Central Role related use cases.
    

    As I am a peripheral (and as indications are emitted by peripherals), through what mechanism in the Qt BLE API can I receive an indication response? Or an error?

    The charactersistic is basically setup like this:

    QLowEnergyDescriptorData    clientCharacConfigDescriptor;
    constexpr uint8_t           rawClientCharacData[]  = { 0x02, 0x00 };
    const QByteArray            qRawClientCharacData   = QByteArray::fromRawData(reinterpret_cast<const char*>(rawClientCharacData), sizeof(rawClientCharacData) / sizeof(*rawClientCharacData));
    clientCharacConfigDescriptor.setUuid(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration);
    clientCharacConfigDescriptor.setValue(qRawClientCharacData);
    ...
    QLowEnergyCharacteristicData characteristic;
    characteristic.setUuid(...);
    characteristic.setProperties(QLowEnergyCharacteristic::Write | QLowEnergyCharacteristic::Indicate);
    characteristic.addDescriptor(clientCharacConfigDescriptor);
    
    

    Maybe related: https://forum.qt.io/topic/65196/bluetooth-low-energy-characteristic-indications-not-notifications

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved