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. qt.bluetooth.windows: Unable to get value for characteristic
Qt 6.11 is out! See what's new in the release blog

qt.bluetooth.windows: Unable to get value for characteristic

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 936 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.
  • J Offline
    J Offline
    javiB
    wrote on last edited by javiB
    #1

    I am unsuccesfullytrying to read a Custom BLE Service characteristics from a custom device i created on a STM32WB5M.

    a65eef12-ce0a-4be6-8efc-a126eba8d811-imagen.png
    I know the embedded part works because im able to read the custom services from an android app from STM
    533759ca-a87e-4e8f-a966-137d5fcce8f6-imagen.pngcc4efd5c-d951-4623-8233-7738edf7c750-imagen.png 7eef2303-cf30-420e-8a40-5f20d6adb4a2-imagen.png

    But when i try to develop a simple QT app this is the output get from QTcreator's debugging console:
    Im not sure what is missing, maybe it has something to do with my service having a custom uuid?

    //This slot is triggered when a serviceDiscovered signal is emmited by the QLowEnergyController
    void javiBLE::controlServiceDiscovered(const QBluetoothUuid &uuid)
    {
        qDebug() << "controlServiceDiscovered:" << uuid;
        if(uuid==QBluetoothUuid(QString("{0000fe40-cc7a-482a-984a-7f2ed5b3e58f}"))){
            mBLEservice=mBLEControl->createServiceObject(uuid, this);
    
            connect(mBLEservice, SIGNAL(stateChanged(QLowEnergyService::ServiceState)),                 this, SLOT(serviceStateChanged(QLowEnergyService::ServiceState)));
            connect(mBLEservice, SIGNAL(characteristicChanged(QLowEnergyCharacteristic,QByteArray)),    this, SLOT(serviceCharacteristicChanged(QLowEnergyCharacteristic,QByteArray)));
            connect(mBLEservice, SIGNAL(characteristicRead(QLowEnergyCharacteristic,QByteArray)),       this, SLOT(serviceCharacteristicRead(QLowEnergyCharacteristic,QByteArray)));
            connect(mBLEservice, SIGNAL(characteristicWritten(QLowEnergyCharacteristic,QByteArray)),    this, SLOT(serviceCharacteristicWritten(QLowEnergyCharacteristic,QByteArray)));
            connect(mBLEservice, SIGNAL(descriptorRead(QLowEnergyDescriptor,QByteArray)),               this, SLOT(serviceDescriptorRead(QLowEnergyDescriptor,QByteArray)));
            connect(mBLEservice, SIGNAL(descriptorWritten(QLowEnergyDescriptor,QByteArray)),            this, SLOT(serviceDescriptorWritten(QLowEnergyDescriptor,QByteArray)));
            connect(mBLEservice, SIGNAL(error(QLowEnergyService::ServiceError)),                        this, SLOT(serviceError(QLowEnergyService::ServiceError)));
            mBLEservice->discoverDetails();///////<----This line throws qt.bluetooth.windows: Unable to get value for characteristic
        }
    }
    
    BLE Found new device: "MY_CUSTOM" ( "00:80:E1:26:C2:49" )
    Low Energy device found. Scanning more...
    controlStateChanged: QLowEnergyController::ConnectingState
    controlStateChanged: QLowEnergyController::ConnectedState
    controlConected
    controlStateChanged: QLowEnergyController::DiscoveringState
    controlServiceDiscovered: "{00001801-0000-1000-8000-00805f9b34fb}"
    controlServiceDiscovered: "{00001800-0000-1000-8000-00805f9b34fb}"
    controlServiceDiscovered: "{0000fe40-cc7a-482a-984a-7f2ed5b3e58f}"
    serviceStateChanged: QLowEnergyService::DiscoveringServices
    qt.bluetooth.windows: Unable to get value for characteristic "{0000fe42-8e22-4541-9d4c-21edae82ed19}" of the service "{0000fe40-cc7a-482a-984a-7f2ed5b3e58f}" : "No se encontraron atributos en el intervalo de identificadores de atributo especificado." //translates to: cant find attributes within the attribute range specified
    serviceStateChanged: QLowEnergyService::ServiceDiscovered
    controlStateChanged: QLowEnergyController::DiscoveredState
    controlDiscoveryFinished
    BLE discovery finished:
    

    running QT 5.12.2 (64bit) on QT Creator 4.15.0
    6deb626a-91c6-44e7-9484-a84c6b918346-imagen.png

    my code: https://github.com/javiBajoCero/STM32WBWorkshop_BluetoothMesh_LAB1

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You need to update to Qt 5.14 at least for that.

      See the documentation here.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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