diff --git a/platforms/arduino/BTstack.cpp b/platforms/arduino/BTstack.cpp index 57fab6550..d89dc2a21 100644 --- a/platforms/arduino/BTstack.cpp +++ b/platforms/arduino/BTstack.cpp @@ -712,12 +712,13 @@ void BTstackManager::setup(void){ btstack_memory_init(); run_loop_init(RUN_LOOP_EMBEDDED); - hci_dump_open(NULL, HCI_DUMP_STDOUT); - hci_transport_t * transport = hci_transport_h4_dma_instance(); bt_control_t * control = bt_control_em9301_instance(); hci_init(transport, NULL, control, NULL); + // disable LOG_INFO messages + hci_dump_enable_log_level(LOG_LEVEL_INFO, 0); + if (have_custom_addr){ hci_set_bd_addr(public_bd_addr); } @@ -748,6 +749,15 @@ void BTstackManager::setup(void){ printf("--> READY <--\n"); } +void BTstackManager::enablePacketLogger(void){ + hci_dump_open(NULL, HCI_DUMP_STDOUT); +} +void BTstackManager::enableDebugLogger(){ + // enable LOG_INFO messages + hci_dump_enable_log_level(LOG_LEVEL_INFO, 1); +} + + void BTstackManager::loop(void){ // process data from/to Bluetooth module hal_uart_dma_process(); diff --git a/platforms/arduino/BTstack.h b/platforms/arduino/BTstack.h index 1f5eb3964..a87cd88a4 100644 --- a/platforms/arduino/BTstack.h +++ b/platforms/arduino/BTstack.h @@ -128,6 +128,8 @@ public: void loop(void); void setPublicBdAddr(bd_addr_t addr); + void enablePacketLogger(); + void enableDebugLogger(); void setAdvData(uint16_t size, const uint8_t * data); void iBeaconConfigure(UUID * uuid, uint16_t major_id, uint16_t minor_id, uint8_t measured_power = 0xc6);