mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-29 03:32:49 +00:00
spp_and_le_counter: setup GATT over BR/EDR
This commit is contained in:
parent
32324834e4
commit
c76b4f5903
@ -77,6 +77,10 @@ static int counter_string_len;
|
||||
|
||||
static btstack_packet_callback_registration_t hci_event_callback_registration;
|
||||
|
||||
#ifdef ENABLE_GATT_OVER_CLASSIC
|
||||
static uint8_t gatt_service_buffer[70];
|
||||
#endif
|
||||
|
||||
/*
|
||||
* @section Advertisements
|
||||
*
|
||||
@ -273,6 +277,14 @@ int btstack_main(void)
|
||||
sdp_register_service(spp_service_buffer);
|
||||
printf("SDP service record size: %u\n", de_get_len(spp_service_buffer));
|
||||
|
||||
#ifdef ENABLE_GATT_OVER_CLASSIC
|
||||
// init SDP, create record for GATT and register with SDP
|
||||
memset(gatt_service_buffer, 0, sizeof(gatt_service_buffer));
|
||||
gatt_create_sdp_record(gatt_service_buffer, 0x10001, ATT_SERVICE_GATT_SERVICE_START_HANDLE, ATT_SERVICE_GATT_SERVICE_END_HANDLE);
|
||||
sdp_register_service(gatt_service_buffer);
|
||||
printf("SDP service record size: %u\n", de_get_len(gatt_service_buffer));
|
||||
#endif
|
||||
|
||||
gap_set_local_name("SPP and LE Counter 00:00:00:00:00:00");
|
||||
gap_ssp_set_io_capability(SSP_IO_CAPABILITY_DISPLAY_YES_NO);
|
||||
gap_discoverable_control(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user