No HCI response to aci_gap_set_discoverable
Hello!
I am having issues with firmwares on the P-Nucleo-WB55. I started from blank code from CubeMX using AzureRTOS/ThreadX with an added layer of CMSIS and took inspiration from the HeartRateFreeRTOS sample (as it uses CMSIS too). I am currently using the BLE/ZigBee FF dynamic firmware as the project will include communication with ZB devices later on. The ZB stack is not initialized.
I refactored some of the code from the sample and have been able to see all the proper exchanges on the SHCI/HCI layers being successful: getting the firmware version, enabling the C2, resetting HCI, setting the default PHY, configuring various settings (public address, IR/ER, TX power level), enabling GATT then GAP, updating the device name and appearance, setting the IO capabilities and the authentication requirements.
Starting advertisement begins with `aci_gap_set_not_discoverable`, which fails (error 0xC/not allowed) as expected as the device is not discoverable by default.
The next call is to `aci_gap_set_discoverable`, which stops in `hci_send_req` at `hci_cmd_resp_wait` waiting for a response from C2.
After I added some logs, I can see that HCI packets were successfully sent to the C2, but that none were ever read back.
Following other posts in this forum, I also tried to look whether the C2 was in hardfault by reading the shared RAM; it seemed to be working properly.
What could be the cause of this issue? Is there some documentation on how the firmware should behave when they get erroneous HCI frames? Is there any way to get more detailed errors from the C2 so that I can understand what went wrong in my code?
