cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Bluetooth

user_2195381
New Contributor II

Could you tell me how to change the device name characteristic from GATT database to other device name stored in NVRAM

const UINT8 gatt_database[]= // Define GATT database

{

// ***** Primary service 'Generic Access'

    //<Name>Generic Access</Name>

    //<Uuid>1800</Uuid>

    //Service handle: HDLS_GENERIC_ACCESS

    //Service UUID: UUID_SERVICE_GAP

    PRIMARY_SERVICE_UUID16 (HDLS_GENERIC_ACCESS, UUID_SERVICE_GAP),

    //<Name>Device Name</Name>

    //<Uuid>2A00</Uuid>

    CHARACTERISTIC_UUID16 (HDLC_GENERIC_ACCESS_DEVICE_NAME,

                           HDLC_GENERIC_ACCESS_DEVICE_NAME_VALUE,

                           UUID_CHARACTERISTIC_DEVICE_NAME,

                           LEGATTDB_CHAR_PROP_READ,

                           LEGATTDB_PERM_READABLE,

                           6),

    'a','b','c','d','e','f',

}

APPLICATION_INIT()

{

    bleapp_set_cfg((UINT8 *)gatt_database,

                   gatt_database_len,

                   (void *)&homedoor_cfg,

                   (void *)&homedoor_puart_cfg,

                   (void *)&homedoor_gpio_cfg,

                   homedoor_create);

    BLE_APP_ENABLE_TRACING_ON_PUART(); 

}

void homedoor_create(void)

{

     if (bleprofile_ReadNVRAM(VS_BLE_HOST_LIST, sizeof(homedoor_devicename), (UINT8 *)&homedoor_devicename))

     {

          @// I will want to change device name "abcdef" to homedoor_devicename. How I can do it ????????????????

0 Likes
1 Solution
2 Replies