esp_ble_gatts_create_attr_tab() with multiple Services
Posted: Sun Jan 06, 2019 11:55 pm
I am trying to set up a GATT server which has multiple service.
I did this by adding my services to the end of the current esp_gatts_attr_db_t. However when trying to pass them to the API I get:
E (620) BT_BTC: Each service table can only created one primary service or secondly service.
E (630) GATTS_TABLE_DEMO: create attribute table failed, error code=0x85
Do I need to call the routine with each service in its own esp_gatts_attr_db_t[]?
if so what do I set SVC_INST_ID to for the 2nd etc service please?
Any examples of how to use multiple services with esp_ble_gatts_create_attr_tab() would be very helpful.
Regards
Richard
I did this by adding my services to the end of the current esp_gatts_attr_db_t. However when trying to pass them to the API I get:
E (620) BT_BTC: Each service table can only created one primary service or secondly service.
E (630) GATTS_TABLE_DEMO: create attribute table failed, error code=0x85
Do I need to call the routine with each service in its own esp_gatts_attr_db_t[]?
if so what do I set SVC_INST_ID to for the 2nd etc service please?
Any examples of how to use multiple services with esp_ble_gatts_create_attr_tab() would be very helpful.
Regards
Richard