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.

Long advertising interval

1. I want to change the time between advertisments in limited discovery mode.

When I set the TGAP_LIM_DISC_ADV_INT_MIN and TGAP_LIM_DISC_ADV_INT_MAX values, I get longer intervals, but they do not match the requested ones.

I understand the value is in milliseconds.

When I set the value to 3000 for example, I see in the packet sniffer that the advertisments are in intervals of ~1880 milliseconds.

Why is this happening ?

2. And another question : When working in this advertising mode, the packte sniffer fails to follow the established connection.

I see in the BTool that the connection is established and I can read handles.

But the packet sniffer doesn't show the connect request message, nor the subsequent messages between the two sides.

Sometimes there an FCS error in the last advertising PDU that is shown in the sniffer.

Any ideas what is wrong ?

Thanks.

  • Sasha Kalmanovich said:

    1. I want to change the time between advertisments in limited discovery mode.

    When I set the TGAP_LIM_DISC_ADV_INT_MIN and TGAP_LIM_DISC_ADV_INT_MAX values, I get longer intervals, but they do not match the requested ones.

    I understand the value is in milliseconds.

    When I set the value to 3000 for example, I see in the packet sniffer that the advertisments are in intervals of ~1880 milliseconds.

    Why is this happening ?

    There is an error in the documentation of GAP. The value is not in milliseconds, but actually in units of 625us. A value of 3000ms therefore corresponds to a time of 1875ms. Note that the BLE spec requires a random delay of 0 to 10ms added to each advertisement interval. Therefore with that setting an advertisement event should occur between 1875ms and 1885ms after the previous one.

    Sasha Kalmanovich said:

    2. And another question : When working in this advertising mode, the packte sniffer fails to follow the established connection.

    I see in the BTool that the connection is established and I can read handles.

    But the packet sniffer doesn't show the connect request message, nor the subsequent messages between the two sides.

    Sometimes there an FCS error in the last advertising PDU that is shown in the sniffer.

    Any ideas what is wrong ?

    The sniffer can only sniff on one advertising channel, but your application is probably advertising on all three advertising channels: 37, 28, and 39. The easiest way to fix this is to set your advertiser to advertise only on channel 37. You can do this by adding the following lines of code to your application initialization routine:

    uint8 advChannels = GAP_ADVCHAN_37;

    GAPRole_SetParameter( GAPROLE_ADV_CHANNEL_MAP, &advChannels, sizeof ( uint8 ) );