I'm trying to use Qt Bluetooth on Qt 5.8 and WinRT. I understand it's something that MUST go wrong one way or another but I'd like to avoid mixing Qt and native Windows APIs. I'm pretty sure I'm missing something super obvious right now.
const QLowEnergyCharacteristic characteristic = m_service->characteristic(
QBluetoothUuid(QBluetoothUuid::GlucoseMeasurement));
if (!characteristic.isValid()) {
break;
}
m_notificationDesc = characteristic.descriptor(QBluetoothUuid::ClientCharacteristicConfiguration);
if (m_notificationDesc.isValid()) {
m_service->writeDescriptor(m_notificationDesc, enable_notification);
}
Where enable_notification
is QByteArray::fromHex("0100");
.
After calling writeDescriptor, I get QLowEnergyService::DescriptorWriteError
and an instant disconnect. Any ideas?