Skip to main content
Associate II
November 11, 2024
Question

Reducing BLE scan time in STM32WBMMG

  • November 11, 2024
  • 1 reply
  • 690 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.

1 reply

STTwo-32
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