From 08e5a654d42afbc34c044fa65ba9f1d23e7a6bff Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 25 Apr 2018 12:25:59 +0200 Subject: [PATCH] test/pts: add device id service record for DID tests --- test/pts/Makefile | 13 +------------ test/pts/iopt.c | 6 ++++++ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/test/pts/Makefile b/test/pts/Makefile index 25fe2a2d3..c4c834818 100644 --- a/test/pts/Makefile +++ b/test/pts/Makefile @@ -1,17 +1,6 @@ # Makefile for libusb based PTS tests BTSTACK_ROOT = ../.. - -CLASSIC += \ - btstack_link_key_db_memory.c \ - sdp_util.c \ - spp_server.c \ - rfcomm.c \ - bnep.c \ - sdp_server.c \ - device_id_server.c \ - - CORE += \ btstack_memory.c \ btstack_linked_list.c \ @@ -25,6 +14,7 @@ CORE += \ COMMON += \ hci.c \ + device_id_server.c \ ad_parser.c \ hci_cmd.c \ hci_dump.c \ @@ -128,7 +118,6 @@ ATT_OBJ = $(ATT:.c=.o) SM_OBJ = $(SM:.c=.o) $(MICROECC:.c=.o) GATT_CLIENT_OBJ = $(GATT_CLIENT:.c=.o) GATT_SERVER_OBJ = $(GATT_SERVER:.c=.o) -CLASSIC_OBJ = $(CLASSIC:.c=.o) SBC_DECODER_OBJ = $(SBC_DECODER:.c=.o) SBC_ENCODER_OBJ = $(SBC_ENCODER:.c=.o) AVDTP_OBJ = $(AVDTP:.c=.o) diff --git a/test/pts/iopt.c b/test/pts/iopt.c index dc8860ac3..a08bb4e55 100644 --- a/test/pts/iopt.c +++ b/test/pts/iopt.c @@ -74,6 +74,7 @@ static void stdin_process(char buffer){ } } +static uint8_t device_id_sdp_service_buffer[100]; static uint8_t pan_service_buffer[200]; static uint8_t spp_service_buffer[200]; // rfcomm 1 static uint8_t hsp_ag_service_buffer[200]; // rfcomm 2 @@ -91,6 +92,11 @@ int btstack_main(int argc, const char * argv[]){ sdp_init(); // Create and register SDP records + + // See https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers if you don't have a USB Vendor ID and need a Bluetooth Vendor ID + // device info: BlueKitchen GmbH, product 1, version 1 + device_id_create_sdp_record(device_id_sdp_service_buffer, 0x10003, DEVICE_ID_VENDOR_ID_SOURCE_BLUETOOTH, BLUETOOTH_COMPANY_ID_BLUEKITCHEN_GMBH, 1, 1); + sdp_register_service(device_id_sdp_service_buffer); spp_create_sdp_record((uint8_t*) spp_service_buffer, 0x10001, 1, "SPP"); sdp_register_service((uint8_t*)spp_service_buffer);