diff --git a/meta-oniro-staging/recipes-connectivity/matter/matter/0001-platform-Linux-bluez-change-BLE-characteristic-from-.patch b/meta-oniro-staging/recipes-connectivity/matter/matter/0001-platform-Linux-bluez-change-BLE-characteristic-from-.patch new file mode 100644 index 0000000000000000000000000000000000000000..6b6e614ec7ad452155d271d6af6cff582b0f01ff --- /dev/null +++ b/meta-oniro-staging/recipes-connectivity/matter/matter/0001-platform-Linux-bluez-change-BLE-characteristic-from-.patch @@ -0,0 +1,44 @@ +From 4ef30fac607674a5edf69edffb37e678e07748e3 Mon Sep 17 00:00:00 2001 +From: Stefan Schmidt <stefan.schmidt@huawei.com> +Date: Thu, 17 Mar 2022 13:31:40 +0100 +Subject: [PATCH] platform/Linux/bluez: change BLE characteristic from indicate + to notify + +The Android app BLE code was change from indication to notification +(as per spec) in: +https://github.com/project-chip/connectedhomeip/commit/bc3d6bf593ed27592a939a58a056776b6a5407bb + +I now run into the problem where a device onboarding over BLE form +Android to a Linux device ends up in a handshake timeout: + +[1647506437.426894][389:392] CHIP:DL: c1 BluezCharacteristicWriteFD mtu, 517 +[1647506437.427057][389:392] CHIP:BLE: Write request received debug 0x7f7c042a50 +[1647506437.427576][389:389] CHIP:BLE: local and remote recv window sizes = 6 +[1647506437.427632][389:389] CHIP:BLE: selected BTP version 4 +[1647506437.427672][389:389] CHIP:BLE: using BTP fragment sizes rx 244 / tx 244. +[1647506452.431248][389:389] CHIP:BLE: receive handshake timed out, closing ep 0x556c83fde0 + +This is similar to the issue raised here: +https://github.com/project-chip/connectedhomeip/issues/8774 + +Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com> +--- + src/platform/Linux/bluez/Helper.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/platform/Linux/bluez/Helper.cpp b/src/platform/Linux/bluez/Helper.cpp +index 81f59af08..17e45bbfe 100644 +--- a/src/platform/Linux/bluez/Helper.cpp ++++ b/src/platform/Linux/bluez/Helper.cpp +@@ -1235,7 +1235,7 @@ static void BluezPeripheralObjectsSetup(gpointer apClosure) + { + + static const char * const c1_flags[] = { "write", nullptr }; +- static const char * const c2_flags[] = { "read", "indicate", nullptr }; ++ static const char * const c2_flags[] = { "read", "notify", nullptr }; + static const char * const c3_flags[] = { "read", nullptr }; + + BluezEndpoint * endpoint = static_cast<BluezEndpoint *>(apClosure); +-- +2.35.1 + diff --git a/meta-oniro-staging/recipes-connectivity/matter/matter_git.bb b/meta-oniro-staging/recipes-connectivity/matter/matter_git.bb index ec951de43f0ad3f82e211af9a5083ec97c923de0..3bd17b35cd470db7f5b04add44b58f347cc3ff82 100644 --- a/meta-oniro-staging/recipes-connectivity/matter/matter_git.bb +++ b/meta-oniro-staging/recipes-connectivity/matter/matter_git.bb @@ -42,6 +42,7 @@ SRC_URI = "git://github.com/project-chip/connectedhomeip.git;protocol=https;name file://0001-projectmatter-use-Yocto-toolchain-and-flags.patch \ file://0002-mbedtls-disable-building-integrated-library-in-Yocto.patch \ file://0001-BUILD.gn-enbale-all-Linux-examples-in-the-default-bu.patch \ + file://0001-platform-Linux-bluez-change-BLE-characteristic-from-.patch \ " PV = "0.0+git${SRCPV}"