2024-01-10 01:59 AM
Hello,
I'm using the client/server example with two Nucleo-WB55 kit, it works without issue.
Now I'm working with my own board:
Client : STM32WB5MM module
Server: the same nucleo-WB55 as above
At starting, the client scans and detects the server(with the right BLE address). But during the Connect_Request(), the client never returns from aci_gap_create_connection().
I did a clean configuration from cubeMX and I get exactly the same problem, and I have tried with two differents boards.
I have no idea why there is no return (success or not)...
My BLE stack is 1.18.0
Thank you,
Pierre
2024-01-10 11:42 PM
Hello @PCu1
I suggest you take a look at the following post, it may be helpful. Else, can you share more details about the issue.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-01-11 01:44 AM
Hi @STTwo-32,
Thank you for your answer.
Unfortunately, I don't call ACI_GAP_START_CONNECTION_UPDATE as mentioned in the post you gave.
My initial firmware works in the router mode, but now I'm working on a clean configuration generated by CubeMX in CLIENT mode.
The only code I added is these lines at the end of APP_BLE_Init() to start the scan immediately (instead of a tactil switch with the Nucleo kit)
/* USER CODE BEGIN APP_BLE_Init_2 */
UTIL_SEQ_SetTask(1 << CFG_TASK_START_SCAN_ID, CFG_SCH_PRIO_0);
/* USER CODE END APP_BLE_Init_2 */
After that, the scan detects the server and at the end of the procedure (case ACI_GAP_PROC_COMPLETE_VSEVT_CODE), the UTIL_SEQ_SetTask(1 << CFG_TASK_CONN_DEV_1_ID, CFG_SCH_PRIO_0) task is called.
When the code enters aci_gap_create_connection() it goes in the subfunction hci_send_req() and blocks in hci_cmd_resp_wait(HCI_TL_DEFAULT_TIMEOUT);
The sequencer is still running but the never returns from aci_gap_create_connection().
Note: I removed the stack and flashed again to be sure.
On the server side, I can connect with another nucleo-WB55 or a smartphone so in my opinion the code is correct in that side.
kr,
Pierre
2024-01-15 06:51 AM
I think my problem is with enabling CFG_LPM_SUPPORTED.
It doesn't seem to be supported by the client or router board, but I couldn't find any information about it.
Maybe someone can confirm or not?
Pierre
2024-02-12 12:36 AM - edited 2024-02-12 12:37 AM
Hello again and sorry for my late feedback.
Could you please check this post. It may help you.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-02-15 12:01 AM
Thank you for your answer.
Yes I had checked a while ago.
At this point it works with CFG_LPM_SUPPORTED disabled.
But I will enable it again to confirm the origin of this issue.
Kr