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. BLE notification
Forum Update on Monday, May 27th 2025

BLE notification

Scheduled Pinned Locked Moved Unsolved General and Desktop
bleqlowenergycharaqlowenergydescr
2 Posts 2 Posters 2.0k Views
  • 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.
  • H Offline
    H Offline
    helenebro
    wrote on 27 Jan 2017, 16:41 last edited by
    #1

    Hi,
    I want communicate with a BLE device. I haven't problem to send him data but I can't be notified of event on this device. When there are a event on my BLE device, I have the warning :

    qt.bluetooth.bluez: cannot find matching characteristic for notification/indication
    

    I think it's because my device is a bit strange. I have :

    - service_1 
       |_ characteritic_1
       |_ characteritic_2
       |_ characteritic_3
       |_ characteritic_4
       |_ characteritic_5
       |_ characteritic_6
           |_ descriptor_1
    
    void MyApp::startNotifListen()
    {
    
        if(m_controller) {
             QLowEnergyService *service = m_controller->createServiceObject(QBluetoothUuid (UUID_SERVICE_1));
            if(!service) {
                if(DEBUG)   qDebug()<<"service not found!!!";
                return;
            }
            else if(DEBUG)   qDebug()<<"service found!";
             QLowEnergyCharacteristic characteristic = service->characteristic(QBluetoothUuid(UUID_CHARACT_6));
             if(characteristic.isValid()) {
                   QLowEnergyDescriptor descriptor = characteristic.descriptor(QBluetoothUuid(UUID_DESC_1));
                 if(descriptor.isValid()) {
                     service->writeDescriptor(descriptor, QByteArray::fromHex("0100"));
                 } else if(DEBUG)   qDebug()<<"descriptor not found";
             }
            else if(DEBUG)   qDebug()<<"characteristic not found";
        }
    }
    

    I have tested on android and there are no problem. I can enable notification on characteristic { BluetoothGatt.setCharacteristicNotification(BluetoothGattCharacteristic characteristic, boolean enabled) }
    I haven't found similar function on Qt.

    M 1 Reply Last reply 7 Apr 2020, 07:13
    0
    • H helenebro
      27 Jan 2017, 16:41

      Hi,
      I want communicate with a BLE device. I haven't problem to send him data but I can't be notified of event on this device. When there are a event on my BLE device, I have the warning :

      qt.bluetooth.bluez: cannot find matching characteristic for notification/indication
      

      I think it's because my device is a bit strange. I have :

      - service_1 
         |_ characteritic_1
         |_ characteritic_2
         |_ characteritic_3
         |_ characteritic_4
         |_ characteritic_5
         |_ characteritic_6
             |_ descriptor_1
      
      void MyApp::startNotifListen()
      {
      
          if(m_controller) {
               QLowEnergyService *service = m_controller->createServiceObject(QBluetoothUuid (UUID_SERVICE_1));
              if(!service) {
                  if(DEBUG)   qDebug()<<"service not found!!!";
                  return;
              }
              else if(DEBUG)   qDebug()<<"service found!";
               QLowEnergyCharacteristic characteristic = service->characteristic(QBluetoothUuid(UUID_CHARACT_6));
               if(characteristic.isValid()) {
                     QLowEnergyDescriptor descriptor = characteristic.descriptor(QBluetoothUuid(UUID_DESC_1));
                   if(descriptor.isValid()) {
                       service->writeDescriptor(descriptor, QByteArray::fromHex("0100"));
                   } else if(DEBUG)   qDebug()<<"descriptor not found";
               }
              else if(DEBUG)   qDebug()<<"characteristic not found";
          }
      }
      

      I have tested on android and there are no problem. I can enable notification on characteristic { BluetoothGatt.setCharacteristicNotification(BluetoothGattCharacteristic characteristic, boolean enabled) }
      I haven't found similar function on Qt.

      M Offline
      M Offline
      mwallnoefer
      wrote on 7 Apr 2020, 07:13 last edited by
      #2

      @helenebro I managed to get to the bottom of the problem (it is due to a firmware bug in these BLE low-cost modules), see my bug report under https://bugreports.qt.io/browse/QTBUG-83363.

      1 Reply Last reply
      2

      • Login

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