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.

BLE-STACK-2-2-0 with multi-role example

Hi,

i just downloaded multi-role project from Github and built with BLE stack SDK 2.2.

I found that the advertising interval of ble device changed to 1280ms after first connection in which it is not the desired value. 

Can anyone tell me how to fix it or it can not be changed with API in application level?

Thank you.

  • please file a bug with a clear description of steps to replicate, along with any code modifications at the github issues page: github.com/.../issues
  • Hi Tim,

    Just use the original example code and connect with iPhone as central, the advertising interval changed after first connection.

    Thank you

    Regards, 

    Wallace

  • I have replicated and filed a bug in our system. It's likely a library fix so a fix won't be available until the next maintenance release.
  • After some debugging, it turns out this is not actually a bug. There is a seperate GAP parameter (TGAP_CONN_ADV_INT_MIN / TGAP_CONN_ADV_INT_MAX) which controls the advertising interval during a connection that defaults to 1280 ms.
  • Hi Tim,

    Thanks for the reply, i got following questions.

    Q1.Can you specify which function call to this change (with the file directory).

    Q2. How can i change the GAP parameter other than the default value 1280ms?

    Thank you

    Best Regards, 

    Wallace

  • The parameters are TGAP_CONN_ADV_INT_MIN and TGAP_CONN_ADV_INT_MAX. You should set this in the application initialization function (multi_role_init) similar to all the other gap parameters:  

        /*-------------------PERIPHERAL-------------------*/
        uint16_t advInt = DEFAULT_ADVERTISING_INTERVAL;
        GAP_SetParamValue(TGAP_CONN_PAUSE_PERIPHERAL, DEFAULT_CONN_PAUSE_PERIPHERAL);    
        GAP_SetParamValue(TGAP_LIM_DISC_ADV_INT_MIN, advInt);
        GAP_SetParamValue(TGAP_LIM_DISC_ADV_INT_MAX, advInt);
        GAP_SetParamValue(TGAP_GEN_DISC_ADV_INT_MIN, advInt);
        GAP_SetParamValue(TGAP_GEN_DISC_ADV_INT_MAX, advInt);    
        GAP_SetParamValue(TGAP_CONN_ADV_INT_MIN, advInt);
        GAP_SetParamValue(TGAP_CONN_ADV_INT_MAX, advInt); 

    This will be updated when the next version of multirole is pushed out.

    See the GAP API of the SDG for more information on the configurable parameters of the GAP module: www.ti.com/.../swru393