From ee624a0a806b574cd105bae9023ba520c6d6ff0e Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Sun, 22 Dec 2019 20:40:06 +0100 Subject: [PATCH] auto-pts: add GAP Service with GAP Name Characteristic --- test/auto-pts/btpclient.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/auto-pts/btpclient.c b/test/auto-pts/btpclient.c index f5f9a8c74..8d0ae5ef8 100644 --- a/test/auto-pts/btpclient.c +++ b/test/auto-pts/btpclient.c @@ -189,7 +189,11 @@ static void reset_gap(void){ } static void reset_gatt(void){ + static const char * btp_name = "tester"; att_db_util_init(); + // setup gap service with gap name characteristic "tester" + att_db_util_add_service_uuid16(ORG_BLUETOOTH_SERVICE_GENERIC_ACCESS); + att_db_util_add_characteristic_uuid16(ORG_BLUETOOTH_CHARACTERISTIC_GAP_DEVICE_NAME, ATT_PROPERTY_READ, ATT_SECURITY_NONE, ATT_SECURITY_NONE, (uint8_t *) btp_name, 6); } static void btstack_packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){