<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Matter CASE resumption delayed 10+ minutes on nRF52840 due to BLE-first serial fabric fallback</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121228/matter-case-resumption-delayed-10-minutes-on-nrf52840-due-to-ble-first-serial-fabric-fallback</link><description>Hi everyone, 
 I&amp;#39;m developing a matter generic switch and I’ve run into a puzzling behavior when commissioning an nRF52840 DK with Apple Home via an Apple TV Thread border router. After the switch reboots, it takes over ten minutes before the device finally</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 May 2025 10:19:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121228/matter-case-resumption-delayed-10-minutes-on-nrf52840-due-to-ble-first-serial-fabric-fallback" /><item><title>RE: Matter CASE resumption delayed 10+ minutes on nRF52840 due to BLE-first serial fabric fallback</title><link>https://devzone.nordicsemi.com/thread/534835?ContentTypeID=1</link><pubDate>Mon, 12 May 2025 10:19:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:079eb4a6-0358-4ad1-b03c-f4520b9891a7</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Okay, are you able to establish persistent subscriptions on the SiLabs device reliably? Our devs don&amp;#39;t think this is related to BLE as BLE&amp;nbsp;&lt;strong&gt;must&lt;/strong&gt; be turned off after commissioning (BLE referring to service/advertising for Matter).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter CASE resumption delayed 10+ minutes on nRF52840 due to BLE-first serial fabric fallback</title><link>https://devzone.nordicsemi.com/thread/534656?ContentTypeID=1</link><pubDate>Fri, 09 May 2025 12:29:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac05897d-7b74-400c-ba75-22f99e8e37e6</guid><dc:creator>brobin88</dc:creator><description>&lt;p&gt;Thanks but if you take a look at the ticket that I linked here that was suggested to me in the past to turn on persistent subscriptions and it *did* work for a while and now it&amp;rsquo;s no longer working.&lt;/p&gt;
&lt;p&gt;With persistent subscriptions I get an error message about case persistent subscription resumption failing with error 32 which indicates that it can&amp;rsquo;t find the controller and it still takes 10+ minutes to become responsive. I think this is because of the dual fabrics that Apple sets up as part of HomeKit.&lt;/p&gt;
&lt;p&gt;fabric 0 is between the matter device and the iOS device that commissioned it. But because the iOS device doesn&amp;rsquo;t have thread and the nrf52840 doesn&amp;rsquo;t have wifi and turns off chipoble advertising after commissioning it can&amp;rsquo;t advertise its state on fabric 0 and therefore the sigma handshake isn&amp;rsquo;t received on fabric 0 because it can&amp;rsquo;t reach the iOS device.&lt;/p&gt;
&lt;p&gt;the nrf52840 attempts to reconnect to fabric 0 for 10 minutes until finally failing and then reconnecting to fabric 1 which is the thread based fabric.&lt;/p&gt;
&lt;p&gt;At least that&amp;rsquo;s my theory&amp;hellip; I need that to be validated if possible &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter CASE resumption delayed 10+ minutes on nRF52840 due to BLE-first serial fabric fallback</title><link>https://devzone.nordicsemi.com/thread/534650?ContentTypeID=1</link><pubDate>Fri, 09 May 2025 12:14:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6164bcd-1ae9-4892-af06-8a6ca1f5ec54</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Ben&lt;/p&gt;
&lt;p&gt;Our developers came back with a suggestion today, and we suspect that these 10 minutes delay you&amp;#39;re seeing is actually the subscription interval set by the Apple Ecosystem, and after ~10 minutes the controller tries to establish a CASE session and the previous one times out. To trigger faster subscription re-establishment, accessory maker may enable what is called Persistent subscriptions which are described here: &amp;nbsp;&lt;a title="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/matter/getting_started/advanced_kconfigs.html#persistent_subscriptions" href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/matter/getting_started/advanced_kconfigs.html#persistent_subscriptions" rel="noopener noreferrer" target="_blank"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/matter/getting_started/advanced_kconfigs.html#persistent_subscriptions&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We have not enabled this by default, and for all we know Silicon Labs has. In the past this was not well supported across ecosystems and also had some negative issues in large network set-ups. Although it&amp;#39;s perfectly fine to use it.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter CASE resumption delayed 10+ minutes on nRF52840 due to BLE-first serial fabric fallback</title><link>https://devzone.nordicsemi.com/thread/534351?ContentTypeID=1</link><pubDate>Wed, 07 May 2025 19:19:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4447adf-5618-4eb6-9dfb-093069caea2c</guid><dc:creator>brobin88</dc:creator><description>&lt;p&gt;It definitely was working for a while in v2.9.1 of the SDK. If you have a look at my other ticket here:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/120060/matter-generic-switch-not-working-on-reset"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/120060/matter-generic-switch-not-working-on-reset&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Turning on persistent subscriptions did work for a while (sadly I didn&amp;#39;t capture the logs) but then suddenly it wasn&amp;#39;t working. Then I found some guidance on the Silicon Labs forum that said to restart the Apple TV, which again worked for a while and then wasn&amp;#39;t working. Now nothing seems to make a difference.&lt;/p&gt;
&lt;p&gt;My Code is quite small so I&amp;#39;ll put it in below:&lt;/p&gt;
&lt;p&gt;app_task.cpp&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
#include &amp;quot;app_task.h&amp;quot;

#include &amp;quot;app/matter_init.h&amp;quot;
#include &amp;quot;app/task_executor.h&amp;quot;
#include &amp;quot;board/board.h&amp;quot;
#include &amp;quot;lib/core/CHIPError.h&amp;quot;
#include &amp;quot;lib/support/CodeUtils.h&amp;quot;


#include &amp;lt;setup_payload/OnboardingCodesUtil.h&amp;gt;
#include &amp;lt;app/clusters/identify-server/identify-server.h&amp;gt;
#include &amp;lt;app/clusters/switch-server/switch-server.h&amp;gt;
#include &amp;lt;app-common/zap-generated/attributes/Accessors.h&amp;gt;

#include &amp;lt;zephyr/logging/log.h&amp;gt;

LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL);

using namespace ::chip;
using namespace ::chip::app;
using namespace ::chip::DeviceLayer;

namespace 
{
constexpr EndpointId kSwitchEndpointId = 1;
constexpr EndpointId kSwitchEndpointId2 = 2;

Identify sIdentify = { kSwitchEndpointId, AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler,
		Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator };


#define SWITCH_BUTTON_1 DK_BTN2_MSK
#define SWITCH_BUTTON_2 DK_BTN4_MSK

}

void AppTask::IdentifyStartHandler(Identify *)
{
	Nrf::PostTask(
		[] { Nrf::GetBoard().GetLED(Nrf::DeviceLeds::LED2).Blink(Nrf::LedConsts::kIdentifyBlinkRate_ms); });
}

void AppTask::IdentifyStopHandler(Identify *)
{
	Nrf::PostTask([] { Nrf::GetBoard().GetLED(Nrf::DeviceLeds::LED2).Set(false); });
}

void AppTask::ButtonEventHandler(Nrf::ButtonState state, Nrf::ButtonMask hasChanged)
{
	uint8_t currentPosition = 1;
    // Check if the application button (e.g., DK_BTN2) has been released.
    // The button is considered released when its bit is cleared in the current state.
    if ((SWITCH_BUTTON_1 &amp;amp; hasChanged) &amp;amp;&amp;amp; !(state &amp;amp; SWITCH_BUTTON_1))
    {
		DeviceLayer::SystemLayer().ScheduleLambda([currentPosition] {
			Clusters::Switch::Attributes::CurrentPosition::Set(kSwitchEndpointId, currentPosition);
			Clusters::SwitchServer::Instance().OnInitialPress(kSwitchEndpointId, currentPosition);
		}); 
    }

    if ((SWITCH_BUTTON_2 &amp;amp; hasChanged) &amp;amp;&amp;amp; !(state &amp;amp; SWITCH_BUTTON_2))
    {
		DeviceLayer::SystemLayer().ScheduleLambda([currentPosition] {
			Clusters::Switch::Attributes::CurrentPosition::Set(kSwitchEndpointId2, currentPosition);
			Clusters::SwitchServer::Instance().OnInitialPress(kSwitchEndpointId2, currentPosition);
		}); 
    }
}

CHIP_ERROR AppTask::Init()
{
	/* Initialize Matter stack */
	ReturnErrorOnFailure(Nrf::Matter::PrepareServer());

	if (!Nrf::GetBoard().Init(ButtonEventHandler)) {
		LOG_ERR(&amp;quot;User interface initialization failed.&amp;quot;);
		return CHIP_ERROR_INCORRECT_STATE;
	}

	/* Register Matter event handler that controls the connectivity status LED based on the captured Matter network
	 * state. */
	ReturnErrorOnFailure(Nrf::Matter::RegisterEventHandler(Nrf::Board::DefaultMatterEventHandler, 0));

	return Nrf::Matter::StartServer();
}

CHIP_ERROR AppTask::StartApp()
{
	ReturnErrorOnFailure(Init());

	while (true) {
		Nrf::DispatchNextTask();
	}

	return CHIP_NO_ERROR;
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;prj.conf&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;# Enable CHIP
CONFIG_CHIP=y
CONFIG_CHIP_PROJECT_CONFIG=&amp;quot;src/chip_project_config.h&amp;quot;
# 32768 == 0x8000 (example Product ID added temporaly,
# but it must be changed with proper PID from the list:
# https://github.com/project-chip/connectedhomeip/blob/482e6fd03196a6de45465a90003947ef4b86e0b1/docs/examples/discussion/PID_allocation_for_example_apps.md)
CONFIG_CHIP_DEVICE_PRODUCT_ID=32768
CONFIG_STD_CPP17=y

# Enable Matter pairing automatically on application start.
CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y

# Enable Matter extended announcement and increase duration to 1 hour.
CONFIG_CHIP_BLE_EXT_ADVERTISING=y
CONFIG_CHIP_BLE_ADVERTISING_DURATION=60

# Add support for LEDs and buttons on Nordic development kits
CONFIG_DK_LIBRARY=y

# Bluetooth Low Energy configuration
CONFIG_BT_DEVICE_NAME=&amp;quot;MatterTemplate&amp;quot;

# Other settings
CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n
CONFIG_CHIP_LIB_SHELL=y
CONFIG_NCS_SAMPLE_MATTER_TEST_SHELL=y

# Disable NFC commissioning
CONFIG_CHIP_NFC_COMMISSIONING=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y

###############
# Issue occurs with or without persistent subscriptions, 
# power management or ICD config
###############
# Persistent Subscriptions
CONFIG_CHIP_PERSISTENT_SUBSCRIPTIONS=y

# Configure Power Management
CONFIG_PM_DEVICE=y
CONFIG_RAM_POWER_DOWN_LIBRARY=y
CONFIG_POWEROFF=y

# Settings for ICD with LIT
CONFIG_OPENTHREAD_MTD=y
CONFIG_OPENTHREAD_NORDIC_LIBRARY_MTD=y

CONFIG_CHIP_ENABLE_ICD_SUPPORT=y
CONFIG_CHIP_ICD_LIT_SUPPORT=y
CONFIG_CHIP_ICD_IDLE_MODE_DURATION=900
CONFIG_CHIP_ICD_ACTIVE_MODE_DURATION=500
CONFIG_CHIP_ICD_SLOW_POLL_INTERVAL=30000
CONFIG_CHIP_ICD_FAST_POLLING_INTERVAL=1000
CONFIG_CHIP_ICD_ACTIVE_MODE_THRESHOLD=5000
CONFIG_CHIP_ICD_CLIENTS_PER_FABRIC=2

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here are the logs from the nrf52840 when the device is rebooted:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3630.nrf52.log"&gt;devzone.nordicsemi.com/.../3630.nrf52.log&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here are the logs from the EFR32MG24 when the device is rebooted:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/silabs2.log"&gt;devzone.nordicsemi.com/.../silabs2.log&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter CASE resumption delayed 10+ minutes on nRF52840 due to BLE-first serial fabric fallback</title><link>https://devzone.nordicsemi.com/thread/534300?ContentTypeID=1</link><pubDate>Wed, 07 May 2025 13:41:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91b9455a-b1e3-4dc1-bec4-ff6243f804cf</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Okay, thank you for clarifying. I&amp;#39;ll run this by the developers then. Likely something snuck in one of the latest versions. You haven&amp;#39;t by chance caught when this was introduced if it worked fine in older versions of the SDK?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter CASE resumption delayed 10+ minutes on nRF52840 due to BLE-first serial fabric fallback</title><link>https://devzone.nordicsemi.com/thread/534260?ContentTypeID=1</link><pubDate>Wed, 07 May 2025 11:04:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf53cca9-d66e-40d0-950b-1bcc011387f8</guid><dc:creator>brobin88</dc:creator><description>&lt;p&gt;Also forgot to mention, I&amp;rsquo;m seeing this behaviour in V2.9.0 and v3.0.0 of the sdk&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter CASE resumption delayed 10+ minutes on nRF52840 due to BLE-first serial fabric fallback</title><link>https://devzone.nordicsemi.com/thread/534259?ContentTypeID=1</link><pubDate>Wed, 07 May 2025 10:59:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfe43109-35c5-40e2-a9f7-9446d7addb9c</guid><dc:creator>brobin88</dc:creator><description>&lt;p&gt;No This is actually based on the matter template project and I&amp;rsquo;ve created matter generic switch endpoints. But I think the ble advertising behaviour is embedded in the matter sdk not in the sample code.&lt;/p&gt;
&lt;p&gt;If it&amp;rsquo;s any help I actually see the same behaviour on the esp32-c6 with the esp matter sdk with their icd_app sample project.&lt;/p&gt;
&lt;p&gt;i feel like apple has changed something recently because it was working fine on the nrf52840 and now it&amp;rsquo;s not. For some reason it hasn&amp;rsquo;t affected the silicon Labs MG24&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter CASE resumption delayed 10+ minutes on nRF52840 due to BLE-first serial fabric fallback</title><link>https://devzone.nordicsemi.com/thread/534243?ContentTypeID=1</link><pubDate>Wed, 07 May 2025 09:28:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bcf76da-7da9-4004-a114-2b802b34b7db</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Just to make sure, can you confirm which sample/demo project you&amp;#39;re working on here? I&amp;#39;m assuming it is the Matter: Light Switch one, but please confirm before I report this as a bug to the development team.&lt;/p&gt;
&lt;p&gt;It should also be possible to enable scanning again after the commissioning is complete to avoid this on your end.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>