Index: sources/bluetooth/BluetoothInterface.cpp =================================================================== diff -u -r45e753bb6f0ffde4ebdb60f6658cbccdd440957f -rfb6d2ffcfd44a933380b21784bfaf5c827ec811d --- sources/bluetooth/BluetoothInterface.cpp (.../BluetoothInterface.cpp) (revision 45e753bb6f0ffde4ebdb60f6658cbccdd440957f) +++ sources/bluetooth/BluetoothInterface.cpp (.../BluetoothInterface.cpp) (revision fb6d2ffcfd44a933380b21784bfaf5c827ec811d) @@ -596,6 +596,19 @@ */ void BluetoothInterface::onDeviceError(QLowEnergyController::Error vError) { + bool isErrorUnknown = (vError == QLowEnergyController::UnknownError); + if ( isErrorUnknown ) { + // When polling to reconnect to the remote device, the application encounters an unknown + // error occasionally when the connection fails, but does not report it as a connection error + + bool isLocalAndDeviceValid = isLocalValid() && isDeviceValid(); + if ( isLocalAndDeviceValid && ( _local->pairingStatus(_device->remoteAddress()) != QBluetoothLocalDevice::Unpaired ) ) { + // Code is opting to set _reconnectionActive to true to allow polling to continue since the device + // is still paired and the error encountered is due to not being able to connect to the remote device. + _reconnectionActive = true; + } + } + // if the device is trying to connect to the previously paired device and the device was not on at this moment it should go to the reconnection state. if ( _tryingrepairActive ) _reconnectionActive = true; Index: sources/view/settings/VBluetooth.cpp =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -rfb6d2ffcfd44a933380b21784bfaf5c827ec811d --- sources/view/settings/VBluetooth.cpp (.../VBluetooth.cpp) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/view/settings/VBluetooth.cpp (.../VBluetooth.cpp) (revision fb6d2ffcfd44a933380b21784bfaf5c827ec811d) @@ -129,16 +129,19 @@ break; case MBluetooth::eIS_Scan_Start : + scanEnabled(false); // disable the scan button while the device is scanning reset(); break; case MBluetooth::eIS_Scan_Done : if (! _devices.count()) state = MBluetooth::eIS_Scan_NotFound; + scanEnabled(true); // enable the scan button when scanning is not running break; case MBluetooth::eIS_Device_Waiting : // Selected device connected and is in waiting mode for read. pairedAddr(vData.deviceAddr); pairedBatt(vData.deviceBatt); + scanEnabled(true); break; case MBluetooth::eIS_Idle : @@ -257,7 +260,7 @@ case MBluetooth::eIS_Device_Init : message = tr("Device Initializing ..." ); break; case MBluetooth::eIS_Device_Error_Init : message = tr("Device Initialization Error" ); break; case MBluetooth::eIS_Device_Start : message = tr("Device Connecting ..." ); break; - case MBluetooth::eIS_Device_Waiting : message = tr("Device Waiting To Connect ..." ); break; // received feedback and changed the "Waiting" to this to avoid user confusion. + case MBluetooth::eIS_Device_Waiting : message = tr("Device Waiting For Measurememnt ..." ); break; // received feedback and changed the "Waiting" to this to avoid user confusion. case MBluetooth::eIS_Device_Error : message = tr("Device Connection Error" ); break; case MBluetooth::eIS_Device_Connect : message = tr("Device Connected" ); break; case MBluetooth::eIS_Device_Done : message = tr("Device Clean Up" ); break;