STM32(WB5) and ZHA integration

Hello,

I working on a custom Zigbee device which should allow me to control A/C with IR led. Note that this kind of device probably already exists but let’s consider it as a challenge too !

To do so, I choosed the STM32WB5MM chip which embed both GPIO features and Zigbee stack via a specific core, all packaged in a module with integrated antenna so, minimal PCB design.
For development purposes, I specifically choosed the STM32WB5MM-DK board which is a demonstration board designed by ST.

On software side, I’m using the ST’s tools for code generation, no special modifications from my side yet. On HA side, I’m using ZHA but I face the same issue that I describe below with Zigbee2MQTT stack. I use a raspbee (or conbee, I have both available) for my testing.

The issue is the following: From a new HA setup, if I put ZHA in pairing mode and power on the STM32, the chip sees the zigbee network and try to pair. Generally, this is succesful.
But if I then power off (or not, this as apparently no impact) the STM32 and delete it from the device list in ZHA and start again the pairing procedure, the STM32 sees the network, join it (according to its logs) but HA stay in pairing mode without handling the pairing.
But after some time, letting HA sleep a little, pairing can be successful. I have not yet correlated the delay between two successful pairing to any action from my side. This is clearly not related to STM32 as it does not use any non-volatile memory for Zigbee-related storage, my bet is that it is related to any HA, ZHA, Zigpy or any dependency cache refresh.

I opened an issue on Github: [ZHA] Irregular behavior with ZHA and STM32WB5 · Issue #111948 · home-assistant/core · GitHub
There is logs and Packet Captures from the Zigbee network, I see no difference between a failed and a succesful join in the negociation phase. You can download the .pcapng files if needed.

Have anyone of you already experienced with STM32WB5MM and HA ? Is there any particular thing I should know ?

Thanks !

Any progress on stm32wb55 with HA? I’m also working on this.