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

custom service/client init Order

hi, In my device(nr51), have multi service and one client. when i initial the client first ,then to setup service. this follow is O.K. But, if i initial the service, and setup client . get a error when sd_ble_gattc_primary_services_discover(Attribute Not Found Error Code)

We do(deal with) it in order?

service: (sd_ble_uuid_vs_add,sd_ble_gatts_service_add and sd_ble_gatts_characteristic_add)

client: (sd_ble_uuid_vs_add,sd_ble_gattc_primary_services_discover,sd_ble_gattc_characteristics_discover and sd_ble_gattc_descriptors_discover)

Parents
  • It isn't easy to say this for sure without seeing your code, but you should make sure that you handle the UUID types correctly. You must store the type that is returned by uuid_vs_add(), and make sure that you set the ble_uuid_t-s correctly before doing discovery calls. The not-found error you're seeing could be caused by a wrong UUID used.

    If you still have trouble, could you edit your question, and show the complete code you're using?

Reply
  • It isn't easy to say this for sure without seeing your code, but you should make sure that you handle the UUID types correctly. You must store the type that is returned by uuid_vs_add(), and make sure that you set the ble_uuid_t-s correctly before doing discovery calls. The not-found error you're seeing could be caused by a wrong UUID used.

    If you still have trouble, could you edit your question, and show the complete code you're using?

Children
Related