mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-23 10:21:12 +00:00
hfp_hf_demo: add gatt_streamer gatt services and add SDP record
This commit is contained in:
parent
e0c5cbc78d
commit
04e91904b0
@ -82,8 +82,9 @@ set(EXAMPLES_GATT_FILES
|
|||||||
gatt_browser.gatt
|
gatt_browser.gatt
|
||||||
gatt_counter.gatt
|
gatt_counter.gatt
|
||||||
gatt_device_information_query.gatt
|
gatt_device_information_query.gatt
|
||||||
gatt_streamer_server.gatt
|
gatt_streamer_server.gatt
|
||||||
hog_keyboard_demo.gatt
|
hfp_hf_demo.gatt
|
||||||
|
hog_keyboard_demo.gatt
|
||||||
hog_mouse_demo.gatt
|
hog_mouse_demo.gatt
|
||||||
le_credit_based_flow_control_mode_server.gatt
|
le_credit_based_flow_control_mode_server.gatt
|
||||||
nordic_spp_le_counter.gatt
|
nordic_spp_le_counter.gatt
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
#include "btstack.h"
|
#include "btstack.h"
|
||||||
|
|
||||||
#include "sco_demo_util.h"
|
#include "sco_demo_util.h"
|
||||||
|
#include "hfp_hf_demo.h"
|
||||||
|
|
||||||
uint8_t hfp_service_buffer[150];
|
uint8_t hfp_service_buffer[150];
|
||||||
const uint8_t rfcomm_channel_nr = 1;
|
const uint8_t rfcomm_channel_nr = 1;
|
||||||
@ -799,6 +800,15 @@ int btstack_main(int argc, const char * argv[]){
|
|||||||
btstack_stdin_setup(stdin_process);
|
btstack_stdin_setup(stdin_process);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_GATT_OVER_CLASSIC
|
||||||
|
static uint8_t gatt_service_buffer[150];
|
||||||
|
// create record for GATT and register with SDP
|
||||||
|
memset(gatt_service_buffer, 0, sizeof(gatt_service_buffer));
|
||||||
|
gatt_create_sdp_record(gatt_service_buffer, sdp_create_service_record_handle(), ATT_SERVICE_GATT_SERVICE_START_HANDLE, ATT_SERVICE_GATT_SERVICE_END_HANDLE);
|
||||||
|
sdp_register_service(gatt_service_buffer);
|
||||||
|
printf("GATT SDP service record size: %u\n", de_get_len(gatt_service_buffer));
|
||||||
|
#endif
|
||||||
|
|
||||||
// turn on!
|
// turn on!
|
||||||
hci_power_control(HCI_POWER_ON);
|
hci_power_control(HCI_POWER_ON);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user