This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Changing attribute value in main in SDK 6.1 in multilink peripheral example

Hello,

with SDK8 I just used ble_gatts_value_t but this struct isn't availabe in SDK 6.1 :(

  •         static uint8_t value = 0xAB;
            ble_gatts_hvx_params_t hvx_params;
            uint16_t               len = sizeof(uint8_t);
    
            memset(&hvx_params, 0, sizeof(hvx_params));
    
            hvx_params.handle = m_char_handles.value_handle;
            hvx_params.type   = BLE_GATT_HVX_NOTIFICATION;
            hvx_params.offset = 0;
            hvx_params.p_len  = &len;
            hvx_params.p_data = &value;
    
            sd_ble_gatts_hvx(m_conn_handle, &hvx_params);
    
Related