Skip to content

Commit

Permalink
test/pts: add device id service record for DID tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mringwal committed Apr 25, 2018
1 parent 2bb3471 commit 08e5a65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
13 changes: 1 addition & 12 deletions 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 \
Expand All @@ -25,6 +14,7 @@ CORE += \

COMMON += \
hci.c \
device_id_server.c \
ad_parser.c \
hci_cmd.c \
hci_dump.c \
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions test/pts/iopt.c
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 08e5a65

Please sign in to comment.