cancel
Showing results for 
Search instead for 
Did you mean: 

Zigbee end device not waking up in sleep mode

Name
Associate III

Hey,

I have two problems regarding custom clusters and sleepy end devices. I want to create an SED that periodically sends custom long string messages (via attribute reporting) to a coordinator.

1.Question:

For this I implemented a custom cluster with a custom long string character attribute. For testing I only write to the attribute once the SED starts up.

enum ZclStatusCodeT status;
uint8_t Custom_str[255] = " PAYLOAD";
Custom_str[0] = 68; // length of string (ZCL format) LSB
Custom_str[1] = 0; // length of string (ZCL format) MSB
status = ZbZclAttrStringWriteLong(zigbee_app_info.custom_ls_server, MY_ZCL_DEV_LS, Custom_str);
APP_DBG("Attribute write status = %d", status);

This works as intended. My motivation to use the custom cluster was the ability to send long custom strings. If I change Custom_str[0] = 68; to Custom_str[0] = 100; the reporting stops and the message does not comes through (attributeWrite still successful). Fragmentation should be enabled by default in custom cluster, but apparently messages do not arrive in this configuration. Any hints on what might cause this issue are appreciated.

2.Question:

For the sleepiness of the end devices i oriented on the Zigbee_OnOff_Client_SED example. I enabled sleepy mode in the Zigbee Stack and made sure the following lines are present.

/* Enabling Stop mode */
UTIL_LPM_SetStopMode(1U << CFG_LPM_APP, UTIL_LPM_ENABLE);
UTIL_LPM_SetOffMode(1U << CFG_LPM_APP, UTIL_LPM_DISABLE);

Furthermore, NVIC configuration is the same. Despite this, the end devices do not wake up for performing the periodic long string attribute report. What might be the issue here?

Best regards and thanks for the help!

17 REPLIES 17
Name
Associate III

Hey,

I got my hands on a Nucleo STM32WB55RGV6 MCU and tried to get a simple example with activated Zigbee and Log to run. USART1 is working fine via the debugger as long, as Zigbee is not activated in CubeMX. I tried switching on and off the recommended paramters from CFG_HW_USART1_ENABLED, but no output at all. Deactivating Zigbee results in the USART working fine again.

My configuration and (simple) code is appended below:

im1.JPG

im3.JPG

im2.JPG

im4.JPG

im5.JPG

Best regards

Ouadi
ST Employee

Hi,

Please make sure to set the right settings on Zigbee CubeMX configurator, as an example you can have a look on the different examples activating Zigbee on our ST Github

Also, you have to flash your device with Zigbee M0 binary to be able to run zigbee stack.

Regards,

Ouadi

Name
Associate III

Hey Ouadi,

Newest RFD Zigbee stack is flashed. I copied the settings from the Zigbee_OnOff_Client_SED example, including all pinout&config, clock, project manager. No output on the serial. I also tried uploading the example project directly, which gives compilation errors on two different machines (fresh cloned repository).

Best regards

Ouadi
ST Employee

Hi,

Zigbee SED application uses the Full Low Power mode with CFG_DEBUG_TRACE disabled by default as mentioned previously to save the consumption, You have to enable this setting to be able to activate the trace.

Kind regards,

Ouadi

Name
Associate III

Hello Ouadi,

I found a possibility to read the serial output from the micromod development board.

I started with a fresh project to eliminate possible errors or incompatibilities from the old project.

First, I set up only the standard USART1 output on STM32WB5MMGHx PA9 and PA10. Serial output works as expected in this simple setup.

Now, I want to continue as simple as possible to get the debug traces to work when running Zigbee. For this, I set up the device to work as coordinator/reduced function device, with all settings left to standard (no sleep mode), except the ones to get the debug traces to work. The projects builds without errors or warnings. Result: no output at all, despite the serial working before.

I appended my configuration here:

zigbee1.JPG

zigbee2.JPG

functioncalls.JPG

usart1.JPG

usart2.JPG

 

I appreciate any help!

 

Best reagards

Name
Associate III

Hello Ouadi,

I tried changing Advanced Settings in Project Manager without success. What could be the issue of traces not being working here?

Thanks and best regards

Name
Associate III

Hello Ouadi,

I solved to enable the traces on the sleepy end device (as mentioned in my other post) and now want to go back to the original problem of the sleepy end device not waking up after connection to the coordinator.

I appended the log below.

Best regards

SleepyLog.JPG

Hello,

Nice to hear that you were able to solve the traces. 

Now for the LPM mode, I assume that there is something wrong on your application avoiding the device to wake up from sleep mode.

I recommend to look at the example Zigbee_OnOff_Client_SED  where the sleep mode is activated and the device wakes up periodically with no issues. 

Regards,

Ouadi