libusb and posix ports: store bonding information in TLV

This commit is contained in:
Matthias Ringwald 2019-10-09 12:15:05 +02:00
parent 674b0e2007
commit 818629960d
28 changed files with 83 additions and 79 deletions

View File

@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Bluetooth and BTstack Error Codes and Events: collect status codes in bluetooth.h and events in btstack_defines.h
- bluetooth.h: extract internal defintitions to respective protocol layers
- Updated CC256x initscripts (CC256xB v1.8, CC256xC v1.2)
- libusb and posix ports: store bonding information in TLV
## Changes August 2019

View File

@ -3,7 +3,7 @@ BTSTACK_ROOT ?= ../..
CORE += main.c btstack_stdin_posix.c btstack_tlv_posix.c
COMMON += hci_transport_h2_libusb.c btstack_run_loop_posix.c le_device_db_fs.c btstack_link_key_db_fs.c wav_util.c btstack_network_posix.c
COMMON += hci_transport_h2_libusb.c btstack_run_loop_posix.c le_device_db_tlv.c btstack_link_key_db_tlv.c wav_util.c btstack_network_posix.c
COMMON += btstack_audio_portaudio.c btstack_chipset_intel_firmware.c
include ${BTSTACK_ROOT}/example/Makefile.inc

View File

@ -33,6 +33,8 @@
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof BNEP header, avoid memcpy
#define NVM_NUM_DEVICE_DB_ENTRIES 20
// Mesh Configuration
#define ENABLE_MESH
#define ENABLE_MESH_ADV_BEARER

View File

@ -53,7 +53,8 @@
#include "btstack_debug.h"
#include "btstack_event.h"
#include "btstack_link_key_db_fs.h"
#include "ble/le_device_db_tlv.h"
#include "classic/btstack_link_key_db_tlv.h"
#include "btstack_memory.h"
#include "btstack_run_loop.h"
#include "btstack_run_loop_posix.h"
@ -95,6 +96,12 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
strcat(tlv_db_path, TLV_DB_PATH_POSTFIX);
tlv_impl = btstack_tlv_posix_init_instance(&tlv_context, tlv_db_path);
btstack_tlv_set_instance(tlv_impl, &tlv_context);
#ifdef ENABLE_CLASSIC
hci_set_link_key_db(btstack_link_key_db_tlv_get_instance(tlv_impl, &tlv_context));
#endif
#ifdef ENABLE_BLE
le_device_db_tlv_configure(tlv_impl, &tlv_context);
#endif
break;
default:
break;
@ -135,10 +142,6 @@ static void intel_firmware_done(int result){
// init HCI
hci_init(transport, NULL);
#ifdef ENABLE_CLASSIC
hci_set_link_key_db(btstack_link_key_db_fs_instance());
#endif
#ifdef HAVE_PORTAUDIO
btstack_audio_set_instance(btstack_audio_portaudio_get_instance());
#endif

View File

@ -3,7 +3,7 @@ BTSTACK_ROOT ?= ../..
CORE += main.c btstack_stdin_posix.c btstack_tlv_posix.c
COMMON += hci_transport_h2_libusb.c btstack_run_loop_posix.c le_device_db_fs.c btstack_link_key_db_fs.c wav_util.c btstack_network_posix.c
COMMON += hci_transport_h2_libusb.c btstack_run_loop_posix.c le_device_db_tlv.c btstack_link_key_db_tlv.c wav_util.c btstack_network_posix.c
COMMON += btstack_audio_portaudio.c btstack_chipset_zephyr.c
include ${BTSTACK_ROOT}/example/Makefile.inc

View File

@ -32,7 +32,7 @@
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof BNEP header, avoid memcpy
#define MAX_NR_LE_DEVICE_DB_ENTRIES 4
#define NVM_NUM_DEVICE_DB_ENTRIES 20
// Mesh Configuration
#define ENABLE_MESH

View File

@ -54,7 +54,8 @@
#include "bluetooth_company_id.h"
#include "btstack_debug.h"
#include "btstack_event.h"
#include "btstack_link_key_db_fs.h"
#include "ble/le_device_db_tlv.h"
#include "classic/btstack_link_key_db_tlv.h"
#include "btstack_memory.h"
#include "btstack_run_loop.h"
#include "btstack_run_loop_posix.h"
@ -121,6 +122,12 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
strcat(tlv_db_path, TLV_DB_PATH_POSTFIX);
tlv_impl = btstack_tlv_posix_init_instance(&tlv_context, tlv_db_path);
btstack_tlv_set_instance(tlv_impl, &tlv_context);
#ifdef ENABLE_CLASSIC
hci_set_link_key_db(btstack_link_key_db_tlv_get_instance(tlv_impl, &tlv_context));
#endif
#ifdef ENABLE_BLE
le_device_db_tlv_configure(tlv_impl, &tlv_context);
#endif
break;
case HCI_EVENT_COMMAND_COMPLETE:
if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){
@ -207,10 +214,6 @@ int main(int argc, const char * argv[]){
// init HCI
hci_init(hci_transport_usb_instance(), NULL);
#ifdef ENABLE_CLASSIC
hci_set_link_key_db(btstack_link_key_db_fs_instance());
#endif
#ifdef HAVE_PORTAUDIO
btstack_audio_sink_set_instance(btstack_audio_portaudio_sink_get_instance());
btstack_audio_source_set_instance(btstack_audio_portaudio_source_get_instance());

View File

@ -3,12 +3,12 @@ BTSTACK_ROOT ?= ../..
CORE += \
btstack_chipset_atwilc3000.c \
btstack_link_key_db_fs.c \
btstack_link_key_db_tlv.c \
btstack_run_loop_posix.c \
btstack_tlv_posix.c \
btstack_uart_block_posix.c \
hci_transport_h4.c \
le_device_db_fs.c \
le_device_db_tlv.c \
main.c \
wav_util.c \
btstack_stdin_posix.c \

View File

@ -32,6 +32,7 @@
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define NVM_NUM_DEVICE_DB_ENTRIES 20
// Mesh Configuration
#define ENABLE_MESH

View File

@ -53,7 +53,8 @@
#include "btstack_debug.h"
#include "btstack_event.h"
#include "btstack_link_key_db_fs.h"
#include "ble/le_device_db_tlv.h"
#include "classic/btstack_link_key_db_tlv.h"
#include "btstack_memory.h"
#include "btstack_run_loop.h"
#include "btstack_run_loop_posix.h"
@ -103,6 +104,12 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
strcat(tlv_db_path, TLV_DB_PATH_POSTFIX);
tlv_impl = btstack_tlv_posix_init_instance(&tlv_context, tlv_db_path);
btstack_tlv_set_instance(tlv_impl, &tlv_context);
#ifdef ENABLE_CLASSIC
hci_set_link_key_db(btstack_link_key_db_tlv_get_instance(tlv_impl, &tlv_context));
#endif
#ifdef ENABLE_BLE
le_device_db_tlv_configure(tlv_impl, &tlv_context);
#endif
break;
default:
break;
@ -142,10 +149,8 @@ static void phase2(int status){
// init HCI
const hci_transport_t * transport = hci_transport_h4_instance(uart_driver);
const btstack_link_key_db_t * link_key_db = btstack_link_key_db_fs_instance();
hci_init(transport, (void*) &transport_config);
hci_set_chipset(btstack_chipset_atwilc3000_instance());
hci_set_link_key_db(link_key_db);
// inform about BTstack state
hci_event_callback_registration.callback = &packet_handler;

View File

@ -4,12 +4,11 @@ BTSTACK_ROOT ?= ../..
CORE += \
btstack_chipset_da14581.c \
hci_581_active_uart.c \
btstack_link_key_db_fs.c \
btstack_run_loop_posix.c \
btstack_tlv_posix.c \
btstack_uart_block_posix.c \
hci_transport_h4.c \
le_device_db_fs.c \
le_device_db_tlv.c \
main.c \
wav_util.c \
btstack_stdin_posix.c \
@ -28,12 +27,5 @@ VPATH += ${BTSTACK_ROOT}/chipset/da14581
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_LE_ONLY}
# use pkg-config for portaudio
# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
# hard coded flags for portaudio in /usr/local/lib
# CFLAGS += -I/usr/local/include -DHAVE_PORTAUDIO
# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
all: ${EXAMPLES}

View File

@ -31,6 +31,8 @@
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define NVM_NUM_DEVICE_DB_ENTRIES 20
// Mesh Configuration
#define ENABLE_MESH
#define ENABLE_MESH_ADV_BEARER

View File

@ -53,10 +53,10 @@
#include "btstack_debug.h"
#include "btstack_event.h"
#include "btstack_link_key_db_fs.h"
#include "btstack_memory.h"
#include "btstack_run_loop.h"
#include "btstack_run_loop_posix.h"
#include "ble/le_device_db_tlv.h"
#include "hci.h"
#include "hci_dump.h"
#include "btstack_stdin.h"
@ -102,6 +102,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
strcat(tlv_db_path, TLV_DB_PATH_POSTFIX);
tlv_impl = btstack_tlv_posix_init_instance(&tlv_context, tlv_db_path);
btstack_tlv_set_instance(tlv_impl, &tlv_context);
le_device_db_tlv_configure(tlv_impl, &tlv_context);
break;
default:
break;
@ -141,9 +142,7 @@ static void phase2(int status){
// init HCI
const hci_transport_t * transport = hci_transport_h4_instance(uart_driver);
const btstack_link_key_db_t * link_key_db = btstack_link_key_db_fs_instance();
hci_init(transport, (void*) &transport_config);
hci_set_link_key_db(link_key_db);
// inform about BTstack state
hci_event_callback_registration.callback = &packet_handler;

View File

@ -3,14 +3,12 @@ BTSTACK_ROOT ?= ../..
CORE += \
btstack_chipset_da14581.c \
btstack_link_key_db_fs.c \
btstack_run_loop_posix.c \
btstack_tlv_posix.c \
btstack_uart_block_posix.c \
hci_transport_h4.c \
le_device_db_fs.c \
le_device_db_tlv.c \
main.c \
wav_util.c \
btstack_stdin_posix.c \
hci_585.c \
# hci_581_active_uart.c \
@ -27,21 +25,7 @@ CFLAGS += -g -Wall -Werror \
VPATH += ${BTSTACK_ROOT}/platform/posix
VPATH += ${BTSTACK_ROOT}/chipset/da14581
ifeq ($(OS),Windows_NT)
LDFLAGS += -lws2_32
endif
# Command Line examples require porting to win32, so only build on other unix-ish hosts
ifneq ($(OS),Windows_NT)
EXAMPLES += ${EXAMPLES_CLI}
endif
# use pkg-config for portaudio
# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
# hard coded flags for portaudio in /usr/local/lib
# CFLAGS += -I/usr/local/include -DHAVE_PORTAUDIO
# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_LE_ONLY}
all: ${EXAMPLES}

View File

@ -31,6 +31,7 @@
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define NVM_NUM_DEVICE_DB_ENTRIES 20
// Mesh Configuration
#define ENABLE_MESH

View File

@ -53,10 +53,10 @@
#include "btstack_debug.h"
#include "btstack_event.h"
#include "btstack_link_key_db_fs.h"
#include "btstack_memory.h"
#include "btstack_run_loop.h"
#include "btstack_run_loop_posix.h"
#include "ble/le_device_db_tlv.h"
#include "hci.h"
#include "hci_dump.h"
#include "btstack_stdin.h"
@ -102,13 +102,13 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
strcat(tlv_db_path, TLV_DB_PATH_POSTFIX);
tlv_impl = btstack_tlv_posix_init_instance(&tlv_context, tlv_db_path);
btstack_tlv_set_instance(tlv_impl, &tlv_context);
le_device_db_tlv_configure(tlv_impl, &tlv_context);
break;
default:
break;
}
}
static void sigint_handler(int param){
UNUSED(param);
@ -142,9 +142,7 @@ static void phase2(int status){
// init HCI
const hci_transport_t * transport = hci_transport_h4_instance(uart_driver);
const btstack_link_key_db_t * link_key_db = btstack_link_key_db_fs_instance();
hci_init(transport, (void*) &transport_config);
hci_set_link_key_db(link_key_db);
// inform about BTstack state
hci_event_callback_registration.callback = &packet_handler;

View File

@ -2,12 +2,11 @@
BTSTACK_ROOT ?= ../..
CORE += \
btstack_link_key_db_fs.c \
btstack_run_loop_posix.c \
btstack_tlv_posix.c \
btstack_uart_block_posix.c \
hci_transport_h4.c \
le_device_db_fs.c \
le_device_db_tlv.c \
main.c \
btstack_stdin_posix.c \
btstack_chipset_zephyr.c \
@ -25,12 +24,5 @@ VPATH += ${BTSTACK_ROOT}/platform/posix
VPATH += ${BTSTACK_ROOT}/platform/embedded
VPATH += ${BTSTACK_ROOT}/chipset/zephyr
# use pkg-config for portaudio
# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
# hard coded flags for portaudio in /usr/local/lib
# CFLAGS += -I/usr/local/include -DHAVE_PORTAUDIO
# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
all: ${EXAMPLES_LE_ONLY}

View File

@ -31,6 +31,8 @@
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define NVM_NUM_DEVICE_DB_ENTRIES 20
// Mesh Configuration
#define ENABLE_MESH
#define ENABLE_MESH_ADV_BEARER

View File

@ -53,11 +53,11 @@
#include "btstack_debug.h"
#include "btstack_event.h"
#include "btstack_link_key_db_fs.h"
#include "btstack_memory.h"
#include "btstack_run_loop.h"
#include "btstack_run_loop_posix.h"
#include "bluetooth_company_id.h"
#include "ble/le_device_db_tlv.h"
#include "hci.h"
#include "hci_dump.h"
#include "btstack_stdin.h"
@ -97,6 +97,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
strcat(tlv_db_path, TLV_DB_PATH_POSTFIX);
tlv_impl = btstack_tlv_posix_init_instance(&tlv_context, tlv_db_path);
btstack_tlv_set_instance(tlv_impl, &tlv_context);
le_device_db_tlv_configure(tlv_impl, &tlv_context);
break;
case HCI_EVENT_COMMAND_COMPLETE:
if (memcmp(packet, read_static_address_command_complete_prefix, sizeof(read_static_address_command_complete_prefix)) == 0){
@ -156,9 +157,7 @@ int main(int argc, const char * argv[]){
// init HCI
const btstack_uart_block_t * uart_driver = btstack_uart_block_posix_instance();
const hci_transport_t * transport = hci_transport_h4_instance(uart_driver);
const btstack_link_key_db_t * link_key_db = btstack_link_key_db_fs_instance();
hci_init(transport, (void*) &config);
hci_set_link_key_db(link_key_db);
hci_set_chipset(btstack_chipset_zephyr_instance());
// inform about BTstack state

View File

@ -9,12 +9,12 @@ CORE += \
btstack_chipset_em9301.c \
btstack_chipset_stlc2500d.c \
btstack_chipset_tc3566x.c \
btstack_link_key_db_fs.c \
btstack_link_key_db_tlv.c \
btstack_run_loop_posix.c \
btstack_tlv_posix.c \
btstack_uart_block_posix.c \
hci_transport_h4.c \
le_device_db_fs.c \
le_device_db_tlv.c \
main.c \
btstack_stdin_posix.c \
wav_util.c \

View File

@ -34,6 +34,7 @@
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define NVM_NUM_DEVICE_DB_ENTRIES 20
// Mesh Configuration
#define ENABLE_MESH

View File

@ -53,7 +53,8 @@
#include "btstack_debug.h"
#include "btstack_event.h"
#include "btstack_link_key_db_fs.h"
#include "ble/le_device_db_tlv.h"
#include "classic/btstack_link_key_db_tlv.h"
#include "btstack_memory.h"
#include "btstack_run_loop.h"
#include "btstack_run_loop_posix.h"
@ -105,6 +106,12 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
strcat(tlv_db_path, TLV_DB_PATH_POSTFIX);
tlv_impl = btstack_tlv_posix_init_instance(&tlv_context, tlv_db_path);
btstack_tlv_set_instance(tlv_impl, &tlv_context);
#ifdef ENABLE_CLASSIC
hci_set_link_key_db(btstack_link_key_db_tlv_get_instance(tlv_impl, &tlv_context));
#endif
#ifdef ENABLE_BLE
le_device_db_tlv_configure(tlv_impl, &tlv_context);
#endif
break;
case HCI_EVENT_COMMAND_COMPLETE:
if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_name)){
@ -252,9 +259,7 @@ int main(int argc, const char * argv[]){
// init HCI
const btstack_uart_block_t * uart_driver = btstack_uart_block_posix_instance();
const hci_transport_t * transport = hci_transport_h4_instance(uart_driver);
const btstack_link_key_db_t * link_key_db = btstack_link_key_db_fs_instance();
hci_init(transport, (void*) &config);
hci_set_link_key_db(link_key_db);
// set BD_ADDR for CSR without Flash/unique address
// bd_addr_t own_address = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66};

View File

@ -4,13 +4,13 @@ BTSTACK_ROOT ?= ../..
CORE += \
btstack_chipset_bcm.c \
btstack_chipset_bcm_download_firmware.c \
btstack_link_key_db_fs.c \
btstack_link_key_db_tlv.c \
btstack_run_loop_posix.c \
btstack_tlv_posix.c \
btstack_uart_block_posix.c \
btstack_slip.c \
hci_transport_h5.c \
le_device_db_fs.c \
le_device_db_tlv.c \
main.c \
wav_util.c \
btstack_stdin_posix.c \

View File

@ -31,6 +31,8 @@
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define NVM_NUM_DEVICE_DB_ENTRIES 20
// Mesh Configuration
#define ENABLE_MESH

View File

@ -53,7 +53,8 @@
#include "btstack_debug.h"
#include "btstack_event.h"
#include "btstack_link_key_db_fs.h"
#include "ble/le_device_db_tlv.h"
#include "classic/btstack_link_key_db_tlv.h"
#include "btstack_memory.h"
#include "btstack_run_loop.h"
#include "btstack_run_loop_posix.h"
@ -124,6 +125,12 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
strcat(tlv_db_path, TLV_DB_PATH_POSTFIX);
tlv_impl = btstack_tlv_posix_init_instance(&tlv_context, tlv_db_path);
btstack_tlv_set_instance(tlv_impl, &tlv_context);
#ifdef ENABLE_CLASSIC
hci_set_link_key_db(btstack_link_key_db_tlv_get_instance(tlv_impl, &tlv_context));
#endif
#ifdef ENABLE_BLE
le_device_db_tlv_configure(tlv_impl, &tlv_context);
#endif
break;
default:
break;
@ -166,9 +173,7 @@ int main(int argc, const char * argv[]){
// setup HCI (to be able to use bcm chipset driver)
// init HCI
const hci_transport_t * transport = hci_transport_h5_instance(uart_driver);
const btstack_link_key_db_t * link_key_db = btstack_link_key_db_fs_instance();
hci_init(transport, (void*) &transport_config);
hci_set_link_key_db(link_key_db);
hci_set_chipset(btstack_chipset_bcm_instance());
// inform about BTstack state

View File

@ -8,13 +8,13 @@ CORE += \
btstack_chipset_em9301.c \
btstack_chipset_stlc2500d.c \
btstack_chipset_tc3566x.c \
btstack_link_key_db_fs.c \
btstack_link_key_db_tlv.c \
btstack_run_loop_posix.c \
btstack_tlv_posix.c \
btstack_uart_block_posix.c \
btstack_slip.c \
hci_transport_h5.c \
le_device_db_fs.c \
le_device_db_tlv.c \
main.c \
wav_util.c \
btstack_stdin_posix.c \

View File

@ -31,6 +31,8 @@
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define NVM_NUM_DEVICE_DB_ENTRIES 4
// Mesh Configuration
#define ENABLE_MESH

View File

@ -53,7 +53,8 @@
#include "btstack_debug.h"
#include "btstack_event.h"
#include "btstack_link_key_db_fs.h"
#include "ble/le_device_db_tlv.h"
#include "classic/btstack_link_key_db_tlv.h"
#include "btstack_memory.h"
#include "btstack_run_loop.h"
#include "btstack_run_loop_posix.h"
@ -170,6 +171,12 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
strcat(tlv_db_path, TLV_DB_PATH_POSTFIX);
tlv_impl = btstack_tlv_posix_init_instance(&tlv_context, tlv_db_path);
btstack_tlv_set_instance(tlv_impl, &tlv_context);
#ifdef ENABLE_CLASSIC
hci_set_link_key_db(btstack_link_key_db_tlv_get_instance(tlv_impl, &tlv_context));
#endif
#ifdef ENABLE_BLE
le_device_db_tlv_configure(tlv_impl, &tlv_context);
#endif
break;
case HCI_EVENT_COMMAND_COMPLETE:
if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_name)){
@ -215,9 +222,7 @@ int main(int argc, const char * argv[]){
// init HCI
const btstack_uart_block_t * uart_driver = btstack_uart_block_posix_instance();
const hci_transport_t * transport = hci_transport_h5_instance(uart_driver);
const btstack_link_key_db_t * link_key_db = btstack_link_key_db_fs_instance();
hci_init(transport, (void*) &config);
hci_set_link_key_db(link_key_db);
// enable BCSP mode for CSR chipsets - auto detect might not work
// hci_transport_h5_enable_bcsp_mode();