micropython / micropython

MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems
https://micropython.org
Other
18.76k stars 7.5k forks source link

Firmware 1.19.1 on NUCLEO-WB55 is failing on BLE functions #11025

Open Yannick-Marietti opened 1 year ago

Yannick-Marietti commented 1 year ago

Hello

MicroPython Firmware : 1.19.1 Board : STMicrolectronics NUCLEO-WB55

Since recent STMicroelectronics releases of _stm32wb5x_BLE_HCILayerfw.bin, available here :

https://github.com/STMicroelectronics/STM32CubeWB/tree/master/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x

all BLE scripts run on NUCLEO-WB55 boards are failing with message :

tl_ble_wait_resp: timeout.

Please help ! I did not found any way to restore BLE functions, even while downgrading _stm32wb5x_BLE_HCILayerfw.bin to rev 1.13 which was the one used for MicroPython firmware developement.

Best regards

Yannick

dpgeorge commented 1 year ago

I tried recently with HCILayer firmware from v1.14.0 of the STM32CubeWB repository and it works with the latest MicroPython commit (ie after the stable 1.19.1 release).

Sometimes after programming the FUS/WS and/or MicroPython firwmare you can get tl_ble_wait_resp: timeout errors. A full power cycle will fix that case.

Yannick-Marietti commented 1 year ago

Hello Damien

Thanks for your reply !

What do you mean with "A full power cycle will fix that case." ? Do you suggest I have to switch on/off the board after programming the FUS/WS and/or MicroPython firwmare ? I am very interested on that point as I spent many hours searching a workaround for this nasty bug.

I had several discussions since with my colleagues in ST working on NUCLEO-WB55. There is another incoming problem : latest releases of the NUCLEO-WB55 (the ones sold in cardboard boxes) are factory programmed with a BLE stack stripped from HCI interface.

This is why I spent a lot of time writing this tutorial (in french) explaining how to reprogram the right BLE stack for MicroPython:

https://stm32python.gitlab.io/fr/docs/tools/cubeprog/cube_prog_firmware_ble_hci

Best regards

Yannick