Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Matter Generic Switch not resuming subscription on reboot

I'm developing a Matter-over-thread generic switch with 2 generic switch endpoints. This is configured as an Intermittently Connected Device with Long Idle Time.

I have an Apple TV serving as the thread border router.

I'm able to commission the device successfully in the Home app and assign actions to each of the buttons however when the device is rebooted the subscription doesn't appear to resume successfully and the buttons no longer work.

I've tested this on various SOC's with their respective SDKs including ESP32-C6, nrf52840 and EFR32MG24 and the behaviour was consistent across all of them.

It was working originally when I first started out on the ESP32-C6, then the issue popped up first when I was testing the nrf52840. In that SDK I set persistent subscriptions explicitly and it seemed to resolve the issue until it popped up again when I found that unplugging and restarting the Apple TV completely which appeared to fix the issue with subscriptions not resuming.

Recently I've added a Home Pod Mini Gen 2 to the matter fabric so there are now two TBR on the network and restarting both the Apple TV and the HomePod doesn't appear to resolve the issue anymore and the subscriptions are not resuming across all three SOC's on device reboot

I'm wondering if there might be something preventing the subscriptions from resuming?

Just want to give some more detail to this. From the logs on the generic switch I see the following error messages on reboot:

I: 46070 [DIS]Checking node lookup status for BF3EABE8BCEC00C9-00000000D02D30E3 after 45000 ms E: 46078 [DIS]OperationalSessionSetup[1:00000000D02D30E3]: operational discovery failed: 32 E: 46086 [DMG]Failed to establish CASE for subscription-resumption with error '32' I: 46095 [IM]Schedule subscription resumption when failing to establish session, Retries: 1

After about 10-15 minutes the Apple TV initiates a new case session tears down the old subscription and then creates a new one.

So subscriptions are not being preserved and the only way it can be reestablished is if the Apple TV initiates a new Case session.

I feel like this is new behaviour because it has been working in the past but I'm guessing an update has introduced it maybe?

First of, as full disclosure, I'm far more familiar with the HAP (HomeKit) specification than I am with Matter.

Looking at the details:

Just want to give some more detail to this. From the logs on the generic switch I see the following error messages on reboot:

I believe that indicates that it's failing to find the previous controller. However, my expectation here is that if if failed to find a previous controller, it would eventually go active and advertise itself so that other controllers can find it.

The issue here is that once you're accessory is powered off, you no longer "know" anything about the state of the network your rejoining. For example, imagine that the user replaced the Apple TV while your accessory was powered off. Similarly, the network could have been reconfigured such that the same devices are present but your accessory won't be able to find it's controller(s).

I think that process is essentially what eventually happens here:

After about 10-15 minutes the Apple TV initiates a new case session tears down the old subscription and then creates a new one.

I'm not sure what the specific trigger here is, but I suspect a new discovery cycle is occurring which is then causing the Apple TV to discover and connect to your accessory. I think that's what your accessory should have initiated on it's own when it failed to resubscribe.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Matter Generic Switch not resuming subscription on reboot
 
 
Q