Hi,
I am working on the ble app peripheral project, wherein the device is in GAP_ROLE_ALL role. The device scans for BLE packets and retransmits them at regular intervals of time. My query is about the scan interval and window parameter to be set. What is the maximum value which can be given for these parameters?
Thanks
Wisilica
Device:
Hi wisilica,
The maximum value that the scan window and the scan interval can get is 10.24 seconds meaning 16384 slots, all values above this will produce an error as soon as you start scanning. But in the case of the GAP_ROLE_ALL the scan procedure will be automatically be cancelled in about 7.5 seconds, so you wont be scanning for all the 10.24 seconds. This kind of scanning amount is only available for the Observer mode, since there is no timeout in the scanning operation.
Thanks MT_dialog
Hi,
So if after 7.5 seconds, scan is cancelled automatically, after what duration, will scan be reinitiated or resumed ?
Thanks
Wisilica
Hi wisillica,
When the scan procedure times out then its not resumed automatically, the scan end handler will occur, and from there you can restart the scanning.
Thanks MT_dialog
Hi ,
If the value for scan_interval and scan_window is given as follows:
scan_interval = 0x180, scan_window = 0x180,
What does these values actually correspond to? Also suggest the unit of these values.
Thanks
Wisilica
Hi wisilica,
In the GAPM_START_SCAN_CMD the parameters Scan interval and Scan window size are in units of BLE slots 0.625 ms that means that the 0x180 corresponds to 240 ms scan window and scan interval.
Thanks MT_dialog