Qt 6.11 is out! See what's new in the release
blog
qt.bluetooth.windows: Unable to get value for characteristic
-
I am unsuccesfullytrying to read a Custom BLE Service characteristics from a custom device i created on a STM32WB5M.

I know the embedded part works because im able to read the custom services from an android app from STM


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

my code: https://github.com/javiBajoCero/STM32WBWorkshop_BluetoothMesh_LAB1
-
Hi and welcome to devnet,
You need to update to Qt 5.14 at least for that.
See the documentation here.