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.

Dynamic Scan Response Data

Hi ,

I need to change the Scan Response Data dynamically.

Device Name characteristic in the Generic Access Service is enabled to write using,

uint8 devNamePermission = GATT_PERMIT_READ | GATT_PERMIT_WRITE;
GGS_SetParameter( GGS_W_PERMIT_DEVICE_NAME_ATT, sizeof ( uint8 ), &devNamePermission );

Is it possible to see the value written in attDeviceName into scanRspData of SimpleBlePeripheral ?

I am using TI BLE stack v2.1.1

Thanks in advance !

  • Hello,

    Scan Response data and GAP Device Name Characteristic are not related, thus updating one doesn't update the other. You will need to update both independently using their respective APIs / procedures. For Scan Response, use GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, xxx);

    Best wishes
  • Hi JXS,

    Thank you for the reply.

    I agree to it.

    So, when the device name is changed, ie. when ggs_WriteAttrCB() is called, scanRspData should also be updated by using GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, xxx);


    Is my approach right ?

    If so, how to do it ?

    Thanks and Regards.

  • Hi,

    Kindly reply to the above query.


    Thanks in Advance !

  • Yes, did you try and what are the results?

    You can follow the example for setting GAPROLE_SCAN_RSP_DATA in the SimpleBLEPeripheral sample application.

    Best wishes

  • Hi JXS,

    Thank you for the reply.

    In ggs_WriteAttrCB() of gapgattserver.c , I added the following, in the case DEVICE_NAME_UUID.

              VOID osal_memcpy(&scanRspData[2],pValue, GAP_DEVICE_NAME_LEN);
              GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData), scanRspData);

    And added this file for compilation.

    But I was not able to see the update in scan response data.

    In tried to do same in SimpleBLEPeripheral sample application. But this file(gapgattserver.c) is not present as part of the build process.

    ie., I am not sure if I am doing the change for scan response data with modified device name at the right place.

    Kindly guide me on this.

    Thanks and Regards.

  • Yes, gapgattserver.c is part of the library, hence it is not part of the build.

    I suggest making the call in the SimpleBLEPeripheral.c file (application task context).

    Best wishes