Unsolved Qt OSX BLE read DeviceInformation give InvalidService.
-
Does someone no way I get a error on DeviceInformation discoverDetails. The signal stateChanged returns InvalidService.
The example app lowenergyscanner give "Disconnect from device" if you try to read DeviceInformation. With het LightBlue app from the App store work it fine.
Is is my code
if(foundDeviceService) m_serviceInfo = m_control->createServiceObject( QBluetoothUuid(QBluetoothUuid::DeviceInformation), this); if(m_serviceInfo) { connect(m_serviceInfo, SIGNAL(stateChanged(QLowEnergyService::ServiceState)), this, SLOT(serviceStateDeviceInfoChanged(QLowEnergyService::ServiceState))); connect(m_serviceInfo, SIGNAL(characteristicRead(QLowEnergyCharacteristic,QByteArray)), this, SLOT(characteristicReadValue(QLowEnergyCharacteristic,QByteArray))); connect(m_serviceInfo, SIGNAL(error(QLowEnergyService::ServiceError)), this, SLOT(descriptorError(QLowEnergyService::ServiceError))); connect(m_serviceInfo, SIGNAL(descriptorWritten(QLowEnergyDescriptor,QByteArray)), this, SLOT(confirmedDescriptorWrite(QLowEnergyDescriptor,QByteArray))); m_serviceInfo->discoverDetails(); } else { setMessage("DeviceInformation not found."); }
-
Hi and welcome to devnet,
Might be a silly question but did you check that your Mac machine has support for Bluetooth Low Energy ?
-
Yes my mac suport Bluetooth Low Energy.
-
What version of Qt ?
What version of macOS ?
What model of Mac computer ? -
A bit late, but I still have the problem.
Qt Version: Qt 5.10.0
macOS: 10.13.2
MacBook Pro (Retina, 13-inch, Late 2013)