2024-10-08 05:49 PM
We are developing a Matter device using X-CUBE-MATTER.
When we set CFG_FULL_LOW_POWER to 1 to enable sleep mode, pressing B1 for 10 seconds does not enter Factory Reset and BLE advertising is not executed.
When we checked the current consumption, it seems to be in sleep mode, but because BLE advertising is not executed, commissioning is not possible.
Please tell me the solution or the specification.
The development environment is described below.
Hardware: STM32WB5MMG-DK
Firmware: Window-App-SBSFU
X-CUBE-MATTER Version: 1.1
Implementation CFG_FULL_LOW_POWER is set to 1
2024-10-09 12:28 AM
Hello,
in app_conf.h where you are setting CFG_FULL_LOW_POWER 1, there is also this code below.
Which means that buttons are not used at all. You can simply change this define to enable them.
2024-10-09 05:53 PM
Thank you very much.
So, if the buttons are not available when CFG_FULL_LOW_POWER is enabled, how does Factory do it? Also, how is Advertising done?
2024-10-10 11:36 PM
As I said above you can change the above defines so that the buttons are active with low power. Then after rebuilding, you can use button1 to do factory reset and advertise.
With the default settings, factory reset cannot be done in low power mode.
2024-10-12 07:28 AM
Thank you.
I understand.
However, I still cannot commission Window-App-SBSFU.
Is it only possible to use Sleep Mode with Generic-Switch-App?
2024-11-05 01:33 AM
I noticed one thing: even in the xxx-App-SBSFU project, if you comment out UTIL_LPM_SetStopMode(1 << CFG_LPM_APP_THREAD, UTIL_LPM_ENABLE);, you can confirm that commissioning is possible with CFG_FULL_LOW_POWER = 1. However, I think this does not put it into Sleep Mode. Please provide a solution.
2024-11-06 12:11 AM
It is possible that in low power modes, the device is not communication fast enough with the OTBR to do the commissioning.
In such case, you can disable the LP modes by commenting out the UTIL_LPM command in app_entry and then enable them again inside AppTask::Init() (if the device is already commissioned on boot)
+ inside AppTask::MatterEventHandler (when the commissioning is finished)
You could go a step further by enabling it at the start and disabling it on BLE connection (that's the start of commissioning) but that's up to you.
2024-11-06 12:42 AM
Thank you for your reply.
If I want to implement it as follows, how should I modify it?
Condition 1: If commissioning has not been performed
When the device starts up, disable Sleep Mode and execute Advertising
When the Advertising time is over, enable Sleep Mode
If commissioning is performed and the connection is successful, enable Sleep Mode
Condition 2: If commissioning has been performed
When the device starts up, enable Sleep Mode
2024-11-06 12:45 AM
Also, isn't the ICD Management Cluster essential for putting the Matter device into Sleep Mode?
2024-11-06 01:12 AM
Most is covered by what I wrote in my previous post. To enable LP modes after BLE advertising is over, you need to copy/replace the 3 attached files and then register some callbacks in AppTask::Init()