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

Yeah, I was having this issue, so I changed the security level to 0 from 5 (default). So that now the end device is joining the network successfully.

But this is just temporary workaround, we need to resolve the Security Key issue.

After doing so I'm facing new issue, where after calling ZbNwkGet to check whether end device has joined, the code gets stuck in the task "Wait_Getting_Ack_From_M0". No IPCC interrupt is received in this communication.

IPCC works fine for network formation and stack initialization but after that ZbNwkGet, ZbZclReadReq, etc are not functioning, as no IPCC interrupt is received.

I have no idea how to debug this issue now.

Please provide some support.

Jonny
Associate III

Ok thanks, I will try to apply this change so at least I can continue with my test.

Honestly, I also wrote to ST asking for some details about the procedure to create a network using the "Network Key"; the source code talk about this special startup parameter that should be set to ZbStartTypePreconfigured but then it is not clear how to set up a device to form a network or join a network while applying all the settings that I need (like network key, or PAN ID and ePAN ID, etc).

I would like to have more support on this device.

EDIT: I tried to change the security level but setting both to level 0x00 for me is event worst ...the send of the request for the endpoint doesn't work anymore

RPRS.1
Associate

Hi All,, Whether any solution for the above problem for Error Occurring as ZB_APS_STATUS_SECURITY_FAIL.

Im aslo facing same problem.

Please provide some support.

@Imen DAHMEN​  @Khouloud ZEMMELI (ST Employee)​ , @Khouloud OTHMAN

Jonny
Associate III

Did Someone actually solve this problem? I can't understand why using the example I can create and join the network without any issue.

I then create my own project for the server-side and now if the client tries to join the network after a "long" delay the startup callback gives me back ZB_APS_STATUS_SECURITY_FAIL.

Any luck with this error?

pdelrot
Associate III

Hello,

I have this behavior daily during my design phase : ZB_APS_STATUS_SECURITY_FAIL during join.

Each time a restart the software to test, I can't join the network, because the node previously joined it during the last debug session.

I have to :

  • power off my board
  • delete the note from my network through the coordinator interface (RPi4 + Phoscon RaspBeeII module)
  • restart

A bit painfull, waiting myself the design the network storing and rejoin features (there are examples for this).

Regards,

Pascal

Hi. Why do you use hardware debug UART in WPAN library? I have my own debug terminal which integrates in all project. Why just not work through printf()? Why is it so difficult and not flexible?

Remi QUINTIN
ST Employee

As far as I understood issue does not occurs if Nucleo boards are used. The issue occurs with STM32WB5MMG.

Looking at some other comments, observed behavior may be linked to replay attack protection mechanism.

If Router is reset several times, ZC will no more accept Join request as NWK Security Counters are out of range.

Only way to make it working is either to reset ZC or implement persistency on Router side.

As usual getting a Wirehshark log will definitely help.

pdelrot
Associate III

Hello, sure, if persistence (as ST examples) or similar (Zigbee network parameters) with ZbRejoin behavior, this not happening.

I had the time to add this feature, works well,

Such security protections are mandatory, but could be annoying at first for beginners or during design.

To avoid the persistence mecanism, or replace it by a similar behavior, these values could be stored securely and reused with ZbRejoin.

Pascal

 //! Zigbee network parameters, to be read after successfull join, and reused for ZbStartTypeRejoin
   enum ZbStatusCodeT status;
   struct ZbChannelListT channel;
   uint16_t network_pan_id;
   uint64_t network_extented_pan_id;
   uint16_t desired_short_addr;
   uint64_t zb_mac_addr;
 
     status = ZbNwkGet(zigbee_app_info.zb, ZB_NWK_NIB_ID_ActiveChannelList, &channel, sizeof(channel));
      read_zigbee_params.channel_mask = channel.list[0].channelMask;
 
     status = ZbNwkGet(zigbee_app_info.zb, ZB_NWK_NIB_ID_PanId, &network_pan_id, sizeof(network_pan_id));
 
    status = ZbNwkGet(zigbee_app_info.zb, ZB_NWK_NIB_ID_ExtendedPanId, &network_extented_pan_id, sizeof(network_extented_pan_id));
 
    desired_short_addr = ZbShortAddress(zigbee_app_info.zb);
 
    zb_mac_addr = ZbExtendedAddress(zigbee_app_info.zb);