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

can not creat my own characteristic

HI ALL i have successfully creat my own service referring to the example ble_app_lbs and reference nAN-36. but when i tried to creat my own characteristic in my service, it did not wrok(the device became unable to advertise, and the reason is that sd_ble_gatts_characteristic_add() return an error) i creat my characteristic according to the 'static uint32_t button_char_add(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init)' in ble_app_lbs (almost copying all its content)

can someone give me a favor? thank you for your time!

Parents
  • Sorry,everyone,i think i find out the problem. the problem is: If i use the following codes: // ble_uuid.type = p_myservice->uuid_type; // ble_uuid.uuid = MYDATA_UUID_CHAR; my device will came out the problem i have said above but if i replace them with this code: // BLE_UUID_BLE_ASSIGN(ble_uuid, MYDATA_UUID_CHAR); the problem sloved !

    i really do not konw why, can someone explain it? thank you for your time!

Reply
  • Sorry,everyone,i think i find out the problem. the problem is: If i use the following codes: // ble_uuid.type = p_myservice->uuid_type; // ble_uuid.uuid = MYDATA_UUID_CHAR; my device will came out the problem i have said above but if i replace them with this code: // BLE_UUID_BLE_ASSIGN(ble_uuid, MYDATA_UUID_CHAR); the problem sloved !

    i really do not konw why, can someone explain it? thank you for your time!

Children
No Data
Related