1 Reply Latest reply on Jan 16, 2020 10:04 PM by GaneshD_41

    How to tell a central device that a peripheral's name has changed?


      As I understand it, in order to force an iOS central device to use a new device name when an old one has been stored in it's BLE cash, the peripheral must tell it that a new name exists or that the name has been changed.  Can anyone please explain exactly how to do this?




        • 1. Re: How to tell a central device that a peripheral's name has changed?

          Hi Dennis,


          You can do this using a notification from peripheral to central. Before doing that you have to perform the following steps:


          1. You have a create a custom characteristic in your GATT server (peripheral) with number of bytes greater than or equal to the maximum length of your name.

          2. Once the peripheral changes its name, you have to update this new name characteristic and you can send the notification to the central sending the new name. The API for sending notification is:


          CYBLE_API_RESULT_T CyBle_GattsNotification (CYBLE_CONN_HANDLE_T connHandle, CYBLE_GATTS_HANDLE_VALUE_NTF_T *ntfParam)


          Please go through the structure CYBLE_GATTS_HANDLE_VALUE_NTF_T to understand what does a notification packet contain.


          You can find this API in the BLE component datasheet. You can refer the attached project to know how the above API can be used.


          By this way you can actually inform the name change to central.