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
Ouadi
ST Employee

Hello,

Please find below my answers to your questions :

1- We have raised an internal ticket 187674 to analyze the case where the reporting does not work with a data length >= 82 , we will reach out to you asap.

2-  To configure a Zigbee device as SED, you have to make sure first that your device is flashed with the M0 binary  stm32wb5x_Zigbee_RFD_fw.bin and to enable the flag CFG_LPM_SUPPORTED, if this is the case, please share the logs and wireshark capture to further analyze.

Best regards,

Ouadi

Name
Associate III

Hello Ouadi,

thanks for the help.

2- I uploaded the M0 binary stm32wb5x_Zigbee_RFD_fw.bin, enabled sleepy mode and and to enabled the flag CFG_LPM_SUPPORTED. Unfortunately also the logging does not work. This is my current configuration:

1JPG.JPG

2.JPG

3.JPG

 

Best regards

   

Hello,

The debug trace feature is disabled by default with the flag ( CFG_DBG_TRACE )  for applications that needs to activate the full low power mode, you may enable it manually on your code => CFG_DBG_TRACE with the desired level ( only for debug).

Best regards,

Ouadi

Name
Associate III

Hello,

reset the options from the sleepy mode from before. I made the following settings to get the traces up and running, but I dont receive any output.

Name_0-1723469332381.png

Name_1-1723469376084.png

Im wondering about this hint:

Name_2-1723469432768.png
Might I miss some detail here?

Best regards

 

Ouadi
ST Employee

Hi,

Could you please share your UART configuration and DMA settings ? 

You need to make sure that DMA is activated as the DbgOutputTraces function uses the DMA to transmit data. 

Regards,

Ouadi

Name
Associate III

Name_0-1723477441989.png

Name_1-1723477477534.png

Name_2-1723477535763.png

I followed the instructions given in the configuration interface.

Best regards

 

Hi,

Looking at your settings you have to disable the Hardware flow control RTS/CTS which is only used for RS232 communication. 

Best regards,

Ouadi

Name
Associate III

Hello Ouadi,

I have to apologize. I am working on a MicroMod Main Board and apparently the RX and TX lines are routed to an external connector, so I am not able to receive any logs from the device without further hardware. Is there any way to get some debug information of the Zigbee Stack via the SWD?
Best regards

Hi,

If the UART Tx and Rx are not configured as it should depending on your hardware this explains why the traces are not working..

The ZigBee stack debug information are sent over the IPCC to M4 and displayed through the UART, there is some other mechanisms to enable the traces as ITM / ETM you can explore, but this implies a code modification with no guarantee of its performance.

Best regards,

Ouadi