From acd35d358c604d93542bc0f888acfe7c403c6677 Mon Sep 17 00:00:00 2001 From: Koichiro Ohba Date: Tue, 26 May 2026 10:47:31 +0900 Subject: [PATCH] Support Kingsmith X21 plain service fallback --- src/devices/kingsmithr2treadmill/kingsmithr2treadmill.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/devices/kingsmithr2treadmill/kingsmithr2treadmill.cpp b/src/devices/kingsmithr2treadmill/kingsmithr2treadmill.cpp index 1c448f1d4d..cb97b8d515 100644 --- a/src/devices/kingsmithr2treadmill/kingsmithr2treadmill.cpp +++ b/src/devices/kingsmithr2treadmill/kingsmithr2treadmill.cpp @@ -549,6 +549,12 @@ void kingsmithr2treadmill::serviceScanDone(void) { qDebug() << "KS_NACH_X21C default service id not found"; _gattCommunicationChannelServiceId = QBluetoothUuid(QStringLiteral("00011234-0000-1000-8000-00805f9b34fb")); gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId); + if(gattCommunicationChannelService == nullptr) { + KS_NACH_X21C_2 = false; + qDebug() << "KS_NACH_X21C fallback service id not found"; + _gattCommunicationChannelServiceId = QBluetoothUuid((quint16)0x1234); + gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId); + } } else if(gattCommunicationChannelService == nullptr && KS_HDSY_X21C) { KS_HDSY_X21C_2 = true; KS_HDSY_X21C = false;