Help, got freezed after calling bt_conn_set_security T T

[00:01:35.073,852] <inf> MOCNordic: filterMatched
                                    3e 1b 64 40 2e 1a                                |>.d@..           
[00:01:35.076,660] <inf> MOCNordic: connecting
                                    3e 1b 64 40 2e 1a                                |>.d@..           
[00:01:35.107,025] <inf> MOCNordic: [operator().389] current WorkCnt: 34

[00:01:35.108,276] <inf> MOCNordic: [operator().406] Requested security level for 1A:2E:40:64:1B:3E (public)

[00:01:35.683,471] <inf> MOCNordic: [dm_discover_completed.71] dm_discover_completed

[00:01:35.684,173] <inf> MOCNordic: [dm_discover_completed.75] Service discovery completed, sourceIndex: 0

[00:01:35.758,483] <inf> MOCNordic: [operator().433] security_changed

[00:01:35.759,185] <inf> MOCNordic: [operator().439] Security changed: 1A:2E:40:64:1B:3E (public) level 2

[00:01:35.786,193] <inf> MOCNordic: [operator().342] pairing_complete

[00:01:35.786,895] <inf> MOCNordic: [operator().349] Pairing completed: 1A:2E:40:64:1B:3E (public), bonded: 1

[00:01:35.871,002] <inf> MOCNordic: [dm_discover_completed.71] dm_discover_completed

[00:01:35.871,704] <inf> MOCNordic: [dm_discover_completed.75] Service discovery completed, sourceIndex: 0

[00:01:35.990,997] <inf> MOCNordic: [dm_discover_completed.71] dm_discover_completed

[00:01:35.991,699] <inf> MOCNordic: [dm_discover_completed.75] Service discovery completed, sourceIndex: 0

[00:01:36.110,992] <inf> MOCNordic: [dm_discover_completed.71] dm_discover_completed

[00:01:36.111,694] <inf> MOCNordic: [dm_discover_completed.75] Service discovery completed, sourceIndex: 0

[00:01:36.112,884] <inf> MOCNordic: [dm_discover_completed.90] found report map.

[00:01:36.906,127] <inf> MOCNordic: [dm_discover_completed.71] dm_discover_completed

[00:01:36.906,951] <inf> MOCNordic: [dm_discover_completed.75] Service discovery completed, sourceIndex: 0

[00:01:37.056,976] <inf> MOCNordic: [notifySubscribe.201] get notify.

[00:01:37.057,617] <inf> MOCNordic: notification
                                    2d 04 01 01 00                                   |-....            
[00:01:37.059,265] <inf> MOCNordic: [notifySubscribe.201] get notify.

[00:01:37.059,936] <inf> MOCNordic: notification
                                    2d 06 01 01 03                                   |-....            
[00:01:37.116,119] <inf> MOCNordic: [dm_discover_completed.71] dm_discover_completed

[00:01:37.116,851] <inf> MOCNordic: [dm_discover_completed.75] Service discovery completed, sourceIndex: 0

[00:01:37.176,147] <inf> MOCNordic: [ServiceNotFound.224] Discovery service all done.

[00:01:37.177,459] <inf> MOCNordic: [ServiceNotFound.242] updated conn param successful, timeoutMs: 500

[00:01:37.178,283] <inf> main: [getReportMap.92] registered for hid device.

[00:01:37.178,955] <inf> MOCNordic: [ServiceNotFound.261] [TEST] total time: 2.07s

[00:01:37.180,175] <inf> MOCNordic: [notifySubscribe.201] get notify.

[00:01:37.180,999] <inf> MOCNordic: notification
                                    2d 07 01 01 01                                   |-....            
[00:01:37.183,135] <inf> main: [main.231] get report map successful, disconnect from device...

[00:01:37.186,706] <inf> MOCNordic: [notifySubscribe.201] get notify.

[00:01:37.187,316] <inf> MOCNordic: [notifySubscribe.201] get notify.

[00:01:37.188,262] <inf> MOCNordic: [notifySubscribe.201] get notify.

[00:01:37.188,842] <inf> MOCNordic: [notifySubscribe.201] get notify.

[00:01:37.189,758] <inf> MOCNordic: [notifySubscribe.201] get notify.

[00:01:37.191,497] <inf> MOCNordic: [notifySubscribe.201] get notify.

[00:01:37.192,749] <inf> MOCNordic: [notifySubscribe.201] get notify.

[00:01:37.193,695] <inf> MOCNordic: [notifySubscribe.201] get notify.

[00:01:37.221,557] <inf> MOCNordic: [operator().420] disconnected

[00:01:37.222,229] <inf> MOCNordic: [operator().426] Disconnected from addr 1A:2E:40:64:1B:3E (public) (reason 22) 

[00:01:37.737,030] <inf> MOCNordic: filterMatched
                                    3e 1b 64 40 2e 1a                                |>.d@..           
[00:01:37.742,492] <inf> MOCNordic: connecting
                                    3e 1b 64 40 2e 1a                                |>.d@..           
[00:01:37.807,830] <inf> MOCNordic: [operator().389] current WorkCnt: 35

[00:01:37.809,051] <inf> MOCNordic: [operator().406] Requested security level for 1A:2E:40:64:1B:3E (public)

Board: nrf52840dongle

sdk-nrf: v2.9.1

the dongle is central device, and I am using bt_scan_filter_add and connect_if_match = true to connect to my peripheral device, but I found that the system will be freezed randomly after calling bt_conn_set_security, sometimes after 40 loops, sometimes just 2 loops

loop means: add name to filter->connect->set security->service discovery and subscription / pair success->disconnected

my project set a button callback, I've tried click it after frozen happen, but nothing happens, so maybe the whole system got stucked

is there any way to figure out what caused the frozen...I only have this device for now and just able to see uart output, btw, here's my prj.conf:

CONFIG_LOG_DEFAULT_LEVEL=2
CONFIG_BT_CONN_LOG_LEVEL_ERR=y
CONFIG_BT_CONN_LOG_LEVEL_WRN=y
CONFIG_BT_SMP_LOG_LEVEL_ERR=y
CONFIG_BT_SMP_LOG_LEVEL_WRN=y
CONFIG_LOG_BUFFER_SIZE=1024
CONFIG_BT_HCI_CORE_LOG_LEVEL_WRN=y
CONFIG_BT_ATT_TX_COUNT=16
CONFIG_REQUIRES_FLOAT_PRINTF=y
CONFIG_BT_LOG_LEVEL_ERR=y
CONFIG_BT_LOG_LEVEL_WRN=y


CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_DK_LIBRARY=y
CONFIG_CPP=y
CONFIG_STD_CPP17=y
CONFIG_REQUIRES_FULL_LIBCPP=y
CONFIG_LOG=y
CONFIG_DEBUG=y
CONFIG_LOG_PRINTK=y

CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_HID=y
CONFIG_USB_DEVICE_PRODUCT="MTNordicDongle"

CONFIG_USB_DEVICE_VID=0x1529
CONFIG_USB_DEVICE_PID=0x2061
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
CONFIG_USB_HID_DEVICE_COUNT=5
CONFIG_USB_HID_POLL_INTERVAL_MS=1
CONFIG_USB_COMPOSITE_DEVICE=y
CONFIG_ENABLE_HID_INT_OUT_EP=y
CONFIG_HID_INTERRUPT_EP_MPS=64

CONFIG_USB_WORKQUEUE_STACK_SIZE=4096
CONFIG_USB_REQUEST_BUFFER_SIZE=512

CONFIG_USB_NRFX_WORK_QUEUE_STACK_SIZE=8192
CONFIG_USB_MAX_NUM_TRANSFERS=5



CONFIG_USB_DEVICE_BOS=n
CONFIG_USB_DEVICE_OS_DESC=n

CONFIG_SYSTEM_CLOCK_WAIT_FOR_STABILITY=y
CONFIG_SCHED_SCALABLE=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_BT=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_SMP=y

CONFIG_BT_FIXED_PASSKEY=y

CONFIG_BT_GATT_DM=y
CONFIG_BT_MAX_CONN=5
CONFIG_BT_MAX_PAIRED=10

CONFIG_BT_GATT_DM_DATA_PRINT=y

CONFIG_BT_GATT_DM_WORKQ_SYS=y

CONFIG_BT_GATT_AUTO_DISCOVER_CCC=y
CONFIG_BT_FILTER_ACCEPT_LIST=y
CONFIG_BT_SCAN=y
CONFIG_BT_SCAN_FILTER_ENABLE=y
CONFIG_BT_SCAN_UUID_CNT=5
CONFIG_BT_SCAN_NAME_CNT=5
CONFIG_BT_SCAN_SHORT_NAME_CNT=5
CONFIG_BT_SCAN_ADDRESS_CNT=5
CONFIG_BT_GATT_CLIENT=y

CONFIG_BT_GATT_DM_MAX_ATTRS=100
CONFIG_BT_GATT_AUTO_UPDATE_MTU=y
CONFIG_BT_L2CAP_TX_MTU=247
CONFIG_BT_L2CAP_TX_BUF_COUNT=8

CONFIG_BT_EXT_ADV=y

CONFIG_BT_EXT_SCAN_BUF_SIZE=128
CONFIG_BT_BUF_ACL_RX_SIZE=128
CONFIG_BT_BUF_ACL_TX_SIZE=128

CONFIG_BT_BUF_ACL_RX_COUNT=8

CONFIG_BT_HCI_TX_STACK_SIZE=2048
CONFIG_BT_RX_STACK_SIZE=2048

CONFIG_RING_BUFFER=y

CONFIG_HEAP_MEM_POOL_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

Parents Reply Children
No Data
Related