STM32WB55RG HCI Driver communication problems after BLE Stack upgrade to version 1.14.1
Hi community,
I have a device with STM32WB55 that has worked successfully with mbed-os for over two years (since the mbed-os 5 version). I decided to do an update of the FUS and STM BLE stack because I was using the old 1.2.0 version and started having problems with the firmware update by BLE_OTA with the new application from ST and from own BLE Web API tool and own Python CLI tool. I did an update of STM BLE stack to the current version 1.14.1.
[INFO][BLWB]: WIRELESS COPROCESSOR FW VERSION ID = 1.14.1
[INFO][BLWB]: WIRELESS COPROCESSOR FW STACK TYPE = 1 (ROM size 0xc3000)After this action, BLE stopped working with mbed-os, when other functionalities of the firmware work fine. To determine what happened I preapred 2 devices. One of them is with BLE stack 1.2.0 (how it worked for 2 years) and second one with BLE stack 1.14.1. and I began to make a comparison of this two.
During BLE initialization, the program exchanges information with the BLE Stack on the other core via HCIDriver. This is where I found the differences in the responses received by HCIDriver. To the point.
For the case of the BLE 1.2.0 stack, all responses (events) that the HCIDriver receives are of type ‘Command Complete event’ (HCI_COMMAND_COMPLETE_EVENT). Example below:
[DBG ][BLE_WB]: TX >> BLE CMD >> Type: 1 / Cmd: 202A / Len: 0
[DBG ][BLE_WB]: Payload:
[DBG ][BLE_WB]: Command complete event, cmd: 0e:05:01:2a:20:00:0f:00:94:26:00:20:00:00:00:00:00:00:00:00For the case of the BLE 1.14.1 stack, some of the responses (events) that HCIDriver receives are of type 'Command Status event' (HCI_COMMAND_STATUS_EVENT) instead of 'Command Complete event'. Example below:
[DBG ][BLE_WB]: TX >> BLE CMD >> Type: 1 / Cmd: 202A / Len: 0
[DBG ][BLE_WB]: Payload:
[DBG ][BLE_WB]: Command Status event, status:1, opcode=0x202A
0f:04:01:01:2a:20:00:00:94:26:00:20:00:00:00:00:00:00:00:00Below are the BLE all opcodes to which I get responses like ‘Command Status event’ instead of ‘Command Complete event’ how it was for BLE stack 1.2.0:
[INFO][BLWB]: Command Status event, status:1, opcode=0x2002
[INFO][BLWB]: Command Status event, status:1, opcode=0x201C
[INFO][BLWB]: Command Status event, status:1, opcode=0x200F
[INFO][BLWB]: Command Status event, status:1, opcode=0x2003
[INFO][BLWB]: Command Status event, status:1, opcode=0x202A
[INFO][BLWB]: Command Status event, status:1, opcode=0x2005The rest of the responses from HCIDriver for the tested stacks are the same.
Following up on this lead, I opened the official documentation from ST - AN5270 Rev 16 and responses for all commands shown above should be of type 'Command Complete event' (HCI_COMMAND_COMPLETE_EVENT) because that's where the information needed to initialize the BLE is located. What I receive, which is a 'Command Status event' do not have the required information and, moreover, is not what I should receive according to the documentation. In addition, all the responses I get as 'Command status event' are the same even though the queries through HCIDriver are different.
Want to launch a new BLE stack with mbed-os all commands that returned 'Command Status event' I captured in mbed-os and substituted the data needed for the configuration from a working device with stack 1.2.0. After that, the BLE initialized correctly, even started GATT Server. Although I had successes in the code the device does not broadcast.
- I'm asking for help because the type of responses (events) I'm getting from the HCI Driver don't match the type of responses (events) I should be getting according to the documentation. Is the problem known? Maybe someone has answers from HCI queries (0x2002, 0x201C, 0x200F, 0x2003, 0x202A, 0x2005) and whether the answers (events) are of type 'HCI_COMMAND_COMPLETE_EVENT' as the documentation describes or of type 'HCI_COMMAND_STATUS_EVENT' as in my case?
- Is there somewhere a documentation with a procedure and example of how to properly initialize the BLE so that I can compare it to how it happens in mbed-os and what kind of responses the HCIDriver gets? If so please provide a link?
- Or do events like 'HCI_COMMAND_STATUS_EVENT' instead of 'HCI_COMMAND_COMPLETE_EVENT' after specific queries occur because there is some other communication problem between cores?
