Skip to main content
Associate II
November 11, 2024
Question

Reducing BLE scan time in STM32WBMMG

  • November 11, 2024
  • 1 reply
  • 713 views

Hello,

In my project, the initial Bluetooth scanning time(I am using STM32WB5MMG) takes 10 seconds (gap discovery procedure). Is it possible to reduce this to 5 seconds or less? Although I have adjusted the scan interval and scan window values, they don't seem to have any impact, and the scanning still takes 10 seconds. Can anyone please help?

Thanks in advance.

This topic has been closed for replies.

1 reply

STTwo-32
ST Technical Moderator
November 12, 2024

Hello @SaiGaneshCS and welcome to the ST Community.

The GAP procedure will scan during 10.24s. This scan duration is a (recommended) requirement from the BLE specification. (It cannot be changed (Hard coded in Host stack)). You may implement your own timeout (early than 10.24s) and use the aci_gap_terminate_gap_proc command with GAP_procedure parameter set to 2 (GAP_GENERAL_DISCOVERY_PROC). This will stop the ongoing scan without any special side effect.

Take a look at this post for more details.

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.