Details
-
Bug
-
Resolution: Won't Do
-
P2: Important
-
None
-
5.11.3
-
None
Description
Hi,
After QLowEnergyController as Central detects a disconnect with a ble peripheral, and the call connectedDevices for the QBluetoothLocalDevice object is made, the connectedDevices still has it in his list as connected.
I have made the following code:
int connected(0); QString objectPath; QString addr;
for(auto address : connectedDevices())
{
addr = address.toString().replace(":", "_");
objectPath = QString("/org/bluez/hci0/dev_%1").arg(addr);
qDebug()<<"Object path = "<<objectPath<<endl;
OrgBluezDevice1Interface bluez5DeviceInterface(QStringLiteral("org.bluez"), objectPath, QDBusConnection::systemBus()));
if (bluez5DeviceInterface.connected()) ----> will correctly return false
{ connected++; }}
qDebug()<<"Number of connected devices = "<<connectedDevices().size()<<" via Dbus "<<connected<<endl;
The Dbus call to the connected property will (correctly) no longer see it as connected.
Best regards,
Frank