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.

Changing characteristics authorization from the firmware

Other Parts Discussed in Thread: CC2540

CC2540 with stack 1.4

Is it possible to change the characteristic properties from the firmware dynamically

By example changing the GATT_PERMIT_AUTHEN_READ to GATT_PERMIT_READ when pressing the button

  • I have the same problem.  I want to dynamically change the permission from GATT_PERMIT_ENCRYPT_READ to GATT_PERMIT_READ after certain conditions are met.  I've searched the forum and found nothing.

  • It could be possible.

    You could  deregister the service and registering it again after changing its properties. However, this will put the service at the bottom of the service list which might cause issues on the application side.

    You could also try to modify the attribute table directly (simpleProfileAttrTbl) as the services are not copied into the stack, it keeps only pointers to where the services are located.

    However the client might have made a copy of the attribute table, so you need to force it to do a new service discovery after updating the table. This might be done by sending a Service changed indication to the client (GATTServApp_SendServiceChangedInd).

    It is also unsure if doing this will violate the BLE specifications so you would have to figure this out as well.

    Regards,
    Svend