diff --git a/examples/pico_w/CMakeLists.txt b/examples/pico_w/CMakeLists.txt index 89083d2e..c193ce7e 100644 --- a/examples/pico_w/CMakeLists.txt +++ b/examples/pico_w/CMakeLists.txt @@ -48,6 +48,13 @@ target_include_directories(bluepad32_picow_example_app PRIVATE src ${BLUEPAD32_ROOT}/src/components/bluepad32/include) +# Useful for debugging +#target_compile_definitions(bluepad32_picow_example_app INTERFACE +# PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS=3000 +# WANT_HCI_DUMP=1 # This enables btstack debug +# ENABLE_SEGGER_RTT=1 +#) + # Needed for btstack_config.h / sdkconfig.h # so that libbluepad32 can include them include_directories(bluepad32_picow_example_app src) diff --git a/src/components/bluepad32/bt/uni_bt_le.c b/src/components/bluepad32/bt/uni_bt_le.c index 1ccfe88c..757b4829 100644 --- a/src/components/bluepad32/bt/uni_bt_le.c +++ b/src/components/bluepad32/bt/uni_bt_le.c @@ -45,8 +45,11 @@ * uni_bt_le_on_gap_event_advertising_report() * -> hog_connect() * sm_packet_handler() + * wait for SM_EVENT_REENCRYPTION_COMPLETE or SM_EVENT_PAIRING_COMPLETE * device_information_packet_handler() + * wait for GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_DONE * hids_client_packet_handler() + * wait for GATTSERVICE_SUBEVENT_HID_SERVICE_CONNECTED * uni_hid_device_set_ready() */