Hi,I have some questions concerning the scan parameters for device discovery. In fact, in my project there are two devices : a central and a peripheral device. The peripheral device send during 4 seconds advertissements in limited mode after a key press. The central is continiously 'sniffing' for advertissements every 4 seconds with short shot. I search to set the minimal time for a scan shot.However, if the scan shot time is too short, sometimes it detetect advertissements, sometimes not.So today, the best configuration I found is (I want shorter time for the central, 1 or 2 ms) :
For the peripheral :
GAP_SetParamValue(TGAP_LIM_DISC_ADV_INT_MIN,32); // 20msGAP_SetParamValue(TGAP_LIM_DISC_ADV_INT_MAX,32);
GAPRole_SetParameter( GAPROLE_ADVERT_OFF_TIME, sizeof( uint16 ), 4000 ); //4 seconds
For the central :
GAP_SetParamValue( TGAP_LIM_DISC_SCAN, 60); // 60ms
The scan is called by an OSAL Timer every 4 seconds.
Schema :
A is GAPROLE_ADVERT_OFF_TIME = 4000 (4s)
B is TGAP_LIM_DISC_ADV_INT_X = 32 (20ms)
C is TGAP_LIM_DISC_SCAN = 60 (60ms)
D is the OSAL Timer delay (4s)
Now, some questions :
1) Have I understood the parameters meaning ?
2) What's mean the scan window ?
3) When I a set value lower than 32 for TGAP_LIM_DISC_ADV_INT_X, packets are not sent. Why ?
4) Maybe there are specials parameters for this type of scan ?
I feel lost with the scanning procedure...
Thank a lot for your answers, and sorry for my poor english (it isn't my mother tongue)...
Antoine.
I've finally found answers. But there still one question, I don't succeed to set the advertissement interval lower than 32 (20ms). Is this possible ? I think this is possible because the advertissement event is during only 4ms. I haven't found limitations durations in BLE specification, maybe I searched badly.Thank for your help !Antoine.
HI Antoine ,
Advertisement involves two terms one is Advertising interval and the other one is Advertising delay .
Advertising interval is the one that user can set from 20 ms to 10.24 seconds ,and the advertising delay is pseudo randomly generated by link layer (from 0 ms to 10 ms ).
So the minimum advertising interval is 20 ms and max is 10.24 seconds ,you can set any values between these .
I hope i have answered your questions.
Regards ,
Senthil kumar
NiceDay,
Senthil
Thank a lot for these clarifications
Regards,
If i answered your question , kindly press "verify answer " against my reply !
Thanks ,