Alexa or Home Assistant and P-NUCLEO-WB55

If you like it, share it

Thanks to P-NUCLEO-WB55 and ZigBee stack, is possible connect the P-NUCLEO-WB55 with Home Assistant and/or Alexa.
Also is possible connect P-NUCLEO-WB55 theoretically with all ZigBee 3.0 hub, we tested only the compatibility with Home Assistant and Alexa.

This SW permit to On/Off the LED3 present on the P-NUCLEO-WB55 via Home Assistant and/or Alexa.

The hex file ready to use is here but is protected by a password.
For receive the password, send us an email and ask us the password for:
P-NUCLEO-WB55_ZB_hex
Please specify also your country and your city, this are only for our personal statistics.

If you need the source code, please send us an email and ask us the source code for:
P-NUCLEO-WB55_ZB_SourceCode
Please specify also:
Name and Surname, Country, Company (web site and complete address)
This is necessary because this SW is not yet officialy released from STM.
We will transfer your request to STM and STM will answer to you.
Probably STM will released this sw in Q1/2022.

NOTE:

Before to use the hex file or source file on P-NUCLEO-WB55 is necessary do some steps that are:

  • Download the package STM32CubeWB and unzip it where you prefer and read the Release_Notes.html that in in the directory:
    …\STM32Cube_FW_WB_V1.13.0RC2\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB5x
  • Download and install the STM32CubeProg
  • Check the FUS release, present on the P-NUCLEO-WB55
  • Upload the ZigBee Stack, present on the P-NUCLEO-WB55

For do this follow the steps below.

Read the FUS version

Now control the jumpers present on the P-NUCLEO-WB55 that must be as show below.

  • Connect the P-NUCLEO-WB55 to your PC via ST-LINK (see the image above)
  • Run the STM32CubeProg

From the page that appear press CONNECT, see below.

From the new page that appears press on the icon:

Now, from the new page that appears, press:

  • Start FUS (1), see image below
  • Read FUS (2), see image below

You must see:
FUS Versi… v1.2.0.0 or or higher
see below

NOTE n.1

You will almost certainly have different indications, if so you have to update the FUS on the P-NUCLEO-WB55 to the version v.1.2.0.0

Upgrade the FUS sw

For update the FUS enter in the directory where you had unzipped the STM32CubeWB, in particular in the sub-directory:

...\STM32Cube_FW_WB_V1.13.0RC2\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB5x

The file that must be load (using the STM32CubeProg) on P-NUCLEO-WB55 is the:
stm32wb5x_FUS_fw_for_fus_0_5_3.bin
and the address must be:
0x080EC000
and press:
Firmware Upgrade
See below

Load the ZigBee Stack

For update the ZigBee Stack enter in the directory where you had unzipped the STM32CubeWB, in particular in the sub-directory:

...\STM32Cube_FW_WB_V1.13.0RC2\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB5x

The file that must be load (using the STM32CubeProg) on P-NUCLEO-WB55 is the: stm32wb5x_Zigbee_FFD_fw.bin
and the address must be:
0x080A4000
and press:
Firmware Upgrade
See below

This firmware update is long but at the end, if all is OK, you must see the message below

Now press again
START FUS
and
READ FUS INFOS
see below

Last but not least Start the Stack by pressing the button:
START WIRELESS STACK
See below


Load the P-NUCLEO-WB55_ZB_hex

For load the hex file that you had downloaded do the steps below.

Press the PROGRAM icon (1) and next the + icon (2)

Now select OPEN FILE, see below

From the select window that appears choose the:
Zigbee_OnOff_Router_NVM.hex
and press DOWNLOAD
see below

If all is OK you must see the message below

Now exit from the STM32CubeProgrammer
Disconnect the P-NUCLEO-WB55 from your PC
Waiting 2…3 seconds and reconnect the P-NUCLEO-WB55 to the PC

That’s all, now you will probably see the LEDs on the P-NUCLEO-WB55 flashing in sequence indicating that the NUCLEO is not connected to anything.

For further confirmation that everything is working, open TeraTerm or any terminal emulation program and configure it as follows

Restart the P-NUCLEO-WB55 and on TeraTerm you must see the messages that P-NUCLEO-WB55 send to the PC.

Below is the example of our P-NUCLEO-WB55 when it is started on while it is connecting to our Home Assistant.

Below is our Home Assistant screenshot with the P-NUCLEO-WB55 being connected and seen as a light bulb with On / Off functionality.



NOTE n.1

FUS is a SW used for update the STM32WB series microcontrollers.
On P-NUCLEO-WB55 there is preprogrammed FUS sw.
Below there is a table with the differents release of FUS (December 2021).

The upgrade of FUS is possible but must respect the below table, see the AN5185 (pg.4).


NOTE n.2

Very important to read is the file:
Release_Notes.html
that in in the directory:
…\STM32Cube_FW_WB_V1.13.0RC2\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB5x
below is a small excerpt of the file

If you want, the Release_Notes.html file, in a slightly different format from the original one, can also be found here.