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.

CCS/CC2650STK: No advertizing after disconnect.

Part Number: CC2650STK

Tool/software: Code Composer Studio

Hello,

I am developping an application on the Sensortag based on the sensortag Firmware.

When the BLE connection is ended the sensortag goes on Advertizing mode for about 30s.

How can I modify the firmware to avoid this advertizing period after disconnection so that the sensortag goes directly into sleep mode upon disconnection.

Kind regards.

Frederic

  • Frederic,

    in sensortag_keys.c you can see in the function processGapStateChange() how the device behaves on disconnect using the keys/power button. Modify this function, which is processed in SensorTagKeys_processEvent() as you see fit. Please examine the comments in processGapStateChange() as it clearly dictates what actions it takes on a disconnect.
  • Hello Evan,

    Thanks for the very useful information.
    However when the connection is ended by the central device (no key involved) the Sensortag goes from the CONNECTED state to the WAITING state and then to the ADVERTIZING state.
    I would like to identify the mechanism that triggers this switch to ADVERTIZING state.

    Kind regards.

    Frederic
  • Frederic,

    I believe if you call the following in case GAPROLE_WAITING_AFTER_TIMEOUT: it will not advertise after the timeout. You can examine what happens in peripheral.c via GAPRole_setParameter when you do.

    uint8_t AdvertEnable = FALSE;

    GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t),
    &AdvertEnable);
  • Thanks a lot. This is what I used and it works well.

    Frederic