mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 03:35:20 +00:00
set up GATT Server with empty ATT database
This commit is contained in:
parent
5b09aef38a
commit
92c41fe524
@ -40,6 +40,8 @@ BTdaemon_SOURCES = \
|
||||
$(BTSTACK_ROOT)/src/sdp_query_util.c \
|
||||
$(BTSTACK_ROOT)/ble/att_dispatch.c \
|
||||
$(BTSTACK_ROOT)/ble/gatt_client.c \
|
||||
$(BTSTACK_ROOT)/ble/att.c \
|
||||
$(BTSTACK_ROOT)/ble/att_server.c \
|
||||
$(BTSTACK_ROOT)/ble/sm.c \
|
||||
$(BTSTACK_ROOT)/ble/central_device_db_memory.c \
|
||||
$(usb_sources) \
|
||||
|
@ -72,7 +72,13 @@
|
||||
#include "sdp_query_util.h"
|
||||
#include "sdp_query_rfcomm.h"
|
||||
#include "socket_connection.h"
|
||||
|
||||
#ifdef HAVE_BLE
|
||||
#include "gatt_client.h"
|
||||
#include "att_server.h"
|
||||
#include "att.h"
|
||||
#include "central_device_db.h"
|
||||
#endif
|
||||
|
||||
#ifdef USE_BLUETOOL
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
@ -1543,8 +1549,14 @@ int main (int argc, char * const * argv){
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BLE
|
||||
// GATT Client
|
||||
gatt_client_init();
|
||||
gatt_client_register_packet_handler(&handle_gatt_client_event);
|
||||
|
||||
// GATT Server - empty attribute database
|
||||
central_device_db_init();
|
||||
att_server_init(NULL, NULL, NULL);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef USE_LAUNCHD
|
||||
|
Loading…
x
Reference in New Issue
Block a user