cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug STM32WB55 Zigbee application ?

APEYR
Associate II

Hello,

I'm working on a project using Zigbee as main communication network.

In this project we develop two devices :

  • One as server and coordinator
  • One as client and router

We based our hardware on STM32WB5MMG.

I used the examples of Zigbee_OnOff_Client_Router and Zigbee_OnOff_Server_Coord to understand how to develop our application.

I'm actually stuck at a point where mu client router cannot connect to the coordinator and the join status is ZB_APS_STATUS_SECURITY_FAIL.

I don't know how to solve this error, the preconfiguredLinkKey are the same, exactly as in the examples.

I think the problem come from the coordinator because if I use the coord example in a nucleo board, my router device is able to connect to it... but I haven't been able to find th differences between my coord and the example and I can't find a lot of documentation on how to debug this kind off errors.

Can anybody help me ?

Thanks in advance and have a nice day.

17 REPLIES 17
Imen.D
ST Employee

Hello @APEYR​ and welcome to the Community 🙂

Did you tried to follow this AN5506 Getting started with Zigbee® on STM32WB Series ?

This application note guides you through the steps required to build specific Zigbee® applications based on STM32WB Series microcontrollers.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
APEYR
Associate II

Hello and thank you for your answer.

Yes I tried to use almost every documents related to the development of Zigbee devices.

The main problem is I can't find any information about the error code I get, I don't know what it corresponds to so I can't find a solution.

Also the available examples on the WB5MMG are very limited compared to those available for the WB55xx series.

Do you have any document explaining the diferent Zigbee status codes, with details and some hints to debug ?

Thanks again and have a nice day.

APEYR
Associate II

Moreover, I can't figure out to enable UART debug trace via STM32CubeIDE because CFG_DEBUG_TRACE_UART need to be enabled but is not available any where in the configuration tool and it tells me that the CFG_FULL_LOW_POWER is enables but it's not

Here is a screenshot...

0693W00000BZyA0QAL.pngThanks in advance.

Have a nice day.

Imen.D
ST Employee

Hi @APEYR​ 

You are right, I have the same behavior with the latest release of CubeMX.

I added the CubeMx expert to check the configuration and take the necessary action.

Hello @Khouloud ZEMMELI​ , @Khouloud OTHMAN​ ,

Kindly look in to this matter and do what is take the necessary action to this post.

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Thank you for your answer.

Regarding the Zigbee application development, I found something weird, I tried debugging my application code on an stm32wb5mmg and the example application Zigbee_OnOff_server_coord trying to find the differences and the code is exactly the same, but, In the example, after all the zigbee initializations, it periodically receive an interrupt comming from the M0 via IPCC_C1_RX_IRQHandler (which seems quite logical for me), while in my application I never receive any interrupts from the M0.

Moreover, in my application, I'm not able to add or configure IPCC in the code generator configuration (i's not available in the peripherals as shown in the screenshot),

0693W00000Ba0COQAZ.png 

So I manually add the handlers in the stm32wbxx_it.c file :

void IPCC_C1_TX_IRQHandler(void)
{
  HW_IPCC_Tx_Handler();
}
 
void IPCC_C1_RX_IRQHandler(void)
{
  HW_IPCC_Rx_Handler();
}

Thanks again for your help.

Have a nice day.

APEYR
Associate II

Hello,

Sorry to spam, but would it be possible to have some support ? This is a project for a customer which should be delivered this week.

We really didn't expect to have so much trouble to get it working as we were able to make it work quite fast on the nucleo kit based on WB55.

We put all our ressources on it for the past 2 weeks, we are still at the same point and we don't have any idea how to fix our bug.

Thanks in avdance.

Have a nice day.

Hello @APEYR​ ,

Please excuse the somewhat late reply and thank you for having reported.

Concerning the problems related to the STM32CubeMX tool:

  • For the first point you raised, you're absolutely right, CFG_DEBUG_TRACE_UART is not listed in Application parameters when ZIGBEE mode is selected. This is will be reported internally to be fixed as soon as possible.

Note that starting a project based on Zigbee_OnOff_Server_Coord / Zigbee_OnOff_Client_Router examples, CFG_DEBUG_TRACE parameter will be enabled by default:

0693W00000BaSMaQAN.png

  • For the second issue, IPCC will be supported for STM32WB5MMGHx MCU in a near future release of STM32CubeMX.

Noting that Zigbee_OnOff_Server_Coord / Zigbee_OnOff_Client_Router are based on STM32WB55RGVx MCU supporting IPCC in the current CubeMX version.

Sorry for any inconvenience that this may cause. I'll definitively keep you posted with the updates.

Khouloud.

bhushan912
Associate II

Hi,

I'm facing a similar issue, trying to form network between two STM325MMG Development Kits. The End Device is not joining the network formed by the Coordinator with error status being ZB_APS_STATUS_SECURITY_FAIL. I've gone through all documentation and tried various things, not able to resolve it.

I think we need more documentation regarding STM32WPAN stack. The Application note AN5289 (building wireless applications with STM32WB) doesn't have Zigbee in it.

Please provide some support.

Regards,

Bhushan.

Jonny
Associate III

Honestly, I'm facing the same problem with my system; the only application note available is the AN5289 and it doesn't cover a lot of things I need to implement in my system.

I receive the status ZB_APS_STATUS_SECURITY_FAIL when I try to reconnect to the network after a reset; for 1-2 minutes if I retry to reconnect I receive every time the same status; after that randomly I stop receiving that error and my device connect to the network without any issue.

Anyone else with the same issue?