This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2540, Device Discovery Scan & GAP parameters.



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);       // 20ms
GAP_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.