ESP32C3 blufi例程循环connect/disconnect

meibao
Posts: 10
Joined: Thu Aug 27, 2020 8:43 am

ESP32C3 blufi例程循环connect/disconnect

Postby meibao » Wed Feb 15, 2023 6:50 am

各位好,在开始提问前已经根据关键词提前进行一些搜索,找到的内容皆对此问题无实质性帮助,同时发现在论坛内有个相似的帖子viewtopic.php?t=20347,该贴最终以重启设备解决问题,但是我这里尝试过更换ESP32-C3FN4、更换手机设备,皆无法正常使用BLUFI示例。
起初是由https://github.com/espressif/esp-qcloud中无法使用蓝牙配网,然后使用官方BLUFI示例尝试发现也无法成功配网。
ESP-IDF版本为4.3.4,使用的芯片为ESP32-C3FN4
更换过芯片以及分别在Android和iOS系统下进行BLUFI配网尝试,皆未成功,以下是bt_debug_log_level 使用verbose级别输出的日志内容

Code: Select all

I (30) boot: ESP-IDF v4.3.4 2nd stage bootloader
I (30) boot: compile time 13:42:19
I (30) boot: chip revision: 3
I (32) boot.esp32c3: SPI Speed      : 80MHz
I (37) boot.esp32c3: SPI Mode       : DIO
I (41) boot.esp32c3: SPI Flash Size : 4MB
I (46) boot: Enabling RNG early entropy source...
I (51) boot: Partition Table:
I (55) boot: ## Label            Usage          Type ST Offset   Length
I (62) boot:  0 nvs              WiFi data        01 02 00009000 00008000
I (70) boot:  1 phy_init         RF data          01 01 00011000 00004000
I (77) boot:  2 factory          factory app      00 00 00020000 00300000
I (85) boot: End of partition table
I (89) esp_image: segment 0: paddr=00020020 vaddr=3c100020 size=3c79ch (247708) map  
I (137) esp_image: segment 1: paddr=0005c7c4 vaddr=3fc90400 size=03854h ( 14420) load
I (140) esp_image: segment 2: paddr=00060020 vaddr=42000020 size=f5670h (1005168) map
I (303) esp_image: segment 3: paddr=00155698 vaddr=3fc93c54 size=00150h (   336) load
I (303) esp_image: segment 4: paddr=001557f0 vaddr=40380000 size=1022ch ( 66092) load
I (321) esp_image: segment 5: paddr=00165a24 vaddr=50000010 size=00010h (    16) load
I (326) boot: Loaded app from partition at offset 0x20000
I (327) boot: Disabling RNG early entropy source...
I (341) cpu_start: Pro cpu up.
I (405) cpu_start: Pro cpu start user code
I (405) cpu_start: cpu freq: 160000000     
I (405) cpu_start: Application information:
I (408) cpu_start: Project name:     blufi_demo
I (413) cpu_start: App version:      1
I (417) cpu_start: Compile time:     Feb 15 2023 14:14:27
I (423) cpu_start: ELF file SHA256:  a15eec0eee97ae95...
I (429) cpu_start: ESP-IDF:          v4.3.4
I (434) heap_init: Initializing. RAM available for dynamic allocation:
I (441) heap_init: At 3FC9B440 len 00024BC0 (146 KiB): DRAM
I (448) heap_init: At 3FCC0000 len 0001F060 (124 KiB): STACK/DRAM     
I (454) heap_init: At 50000020 len 00001FE0 (7 KiB): RTCRAM
I (461) spi_flash: detected chip: generic
I (465) spi_flash: flash io: dio
I (470) sleep: Configure to isolate all GPIO pins in sleep state
I (476) sleep: Enable automatic switching of GPIO sleep configuration
I (483) cpu_start: Starting scheduler.
I (494) coexist: coexist rom version 9387209
I (494) pp: pp rom version: 9387209
I (494) net80211: net80211 rom version: 9387209
I (514) wifi:wifi driver task: 3fca502c, prio:23, stack:6656, core=0
I (514) system_api: Base MAC address is not set
I (514) system_api: read default base MAC address from EFUSE
I (524) wifi:wifi firmware version: 4ad6fcc
I (524) wifi:wifi certification version: v7.0
I (524) wifi:config NVS flash: enabled
I (534) wifi:config nano formating: disabled
I (534) wifi:Init data frame dynamic rx buffer num: 32
I (544) wifi:Init management frame dynamic rx buffer num: 32
I (544) wifi:Init management short buffer num: 32
I (554) wifi:Init dynamic tx buffer num: 32
I (554) wifi:Init static tx FG buffer num: 2
I (554) wifi:Init static rx buffer size: 1600
I (564) wifi:Init static rx buffer num: 10
I (564) wifi:Init dynamic rx buffer num: 32
I (574) wifi_init: rx ba win: 6
I (574) wifi_init: tcpip mbox: 32
I (574) wifi_init: udp mbox: 6
I (584) wifi_init: tcp mbox: 6
I (584) wifi_init: tcp tx win: 5744
I (594) wifi_init: tcp rx win: 5744
I (594) wifi_init: tcp mss: 1440
I (594) wifi_init: WiFi IRAM OP enabled
I (604) wifi_init: WiFi RX IRAM OP enabled
I (604) phy_init: phy_version 909,aa05aec,Apr 16 2022,13:42:08
I (694) wifi:set rx active PTI: 0, rx ack PTI: 12, and default PTI: 1
I (694) wifi:mode : sta (a0:76:4e:70:bf:84)
I (694) wifi:enable tsf
W (694) BTDM_INIT: esp_bt_controller_mem_release not implemented, return OK
I (704) BTDM_INIT: BT controller compile version [3a49744]
I (714) coexist: coexist rom version 9387209
I (714) BTDM_INIT: Bluetooth MAC: a0:76:4e:70:bf:85

D (724) BT_BTC: btc_transfer_context msg 0 0 0 0x0

D (724) BT_BTC: btc_thread_handler msg 0 0 0 0x0

D (734) BT_BTC: btc_main_call_handler act 0

D (734) BT_APPL: Enable HCI

D (744) BT_OSI: alarm_cbs_lookfor_available 0 0x3fc95b08

D (744) BT_OSI: alarm_cbs_lookfor_available 1 0x3fc95b20

D (754) BT_HCI: btu_free_timer Unable to find expected alarm in hashmap
D (754) BT_HCI: btu_free_timer Unable to find expected alarm in hashmap
D (764) BT_BTM: btm_acl_init

D (764) BT_L2CAP: L2CA_RegisterFixedChannel()  CID: 0x0004, 0x3fcb7554
I (774) BT_BTM: btm_sec_set_security_level : sec: 0x0

I (784) BT_BTM: BTM_SEC_REG[0]: id 50, is_orig 1, psm 0x001f, proto_id 0, chan_id 0

I (784) BT_BTM:                : sec: 0x80, service name [] (up to 21 chars saved)

I (794) BT_BTM: btm_sec_set_security_level : sec: 0x0

I (804) BT_BTM: BTM_SEC_REG[0]: id 50, is_orig 0, psm 0x001f, proto_id 0, chan_id 0

I (814) BT_BTM:                : sec: 0x80, service name [] (up to 21 chars saved)

I (824) BT_GATT: GATT_Register
D (824) BT_GATT: UUID=[0x81818181818181818181818181818181]
I (824) BT_GATT: allocated gatt_if=1

I (834) BT_GATT: GATT_StartIf gatt_if=1
D (834) BT_GATT: gatt_find_the_connected_bda start_idx=0
I (844) BT_GATT: GATTS_CreateService

D (844) BT_GATT: allocate_svc_db_buf allocating extra buffer
D (854) BT_GATT: gatts_init_service_db

D (854) BT_GATT: s_hdl = 1 num_handle = 5

D (864) BT_GATT: add_service_declaration
D (864) BT_GATT: allocate attr 20 bytes

D (874) BT_GATT: =====> handle = [0x0001] uuid16 = [0x2800] perm=0x01

D (874) BT_GATT: GATTS_CreateService:  handle of service handle1
D (884) BT_GATT: gatts_add_characteristic perm=0x0 property=0x20

D (884) BT_GATT: allocate attr 20 bytes

D (894) BT_GATT: =====> handle = [0x0002] uuid16 = [0x2803] perm=0x01

D (904) BT_GATT: allocate attr 20 bytes

D (904) BT_GATT: =====> handle = [0x0003] uuid16 = [0x2a05] perm=0x00

D (914) BT_GATT: gatt_profile_db_init:  handle of service changed3

D (914) BT_GATT: gatts_add_char_descr uuid=0x2902

D (924) BT_GATT: allocate attr 20 bytes

D (924) BT_GATT: =====> handle = [0x0004] uuid16 = [0x2902] perm=0x11

I (934) BT_GATT: GATTS_StartService
D (934) BT_GATT: total buffer in db [1]
D (944) BT_GATT: allocated i_sreg=0

D (944) BT_GATT: s_hdl=1 e_hdl=5 type=0x2800 svc_inst=0 sdp_hdl=0x0

D (954) BT_GATT: gatt_profile_db_init:  gatt_if=1   start status0

D (954) BT_SMP: SMP_Init
D (964) BT_SMP: SMDBG l2c smp_l2cap_if_init
D (964) BT_L2CAP: L2CA_RegisterFixedChannel()  CID: 0x0006, 0x3fcb7544
D (974) BT_BTM: btm_ble_init
D (974) BT_HCI: btu_free_timer Unable to find expected alarm in hashmap
D (984) BT_HCI: btu_free_timer Unable to find expected alarm in hashmap
D (984) BT_HCI: btu_free_timer Unable to find expected alarm in hashmap
I (994) BT_GATT: GATT_Register
D (994) BT_GATT: UUID=[0x82828282828282828282828282828282]
I (1004) BT_GATT: allocated gatt_if=2

I (1004) BT_GATT: GATT_StartIf gatt_if=2
D (1014) BT_GATT: gatt_find_the_connected_bda start_idx=0
I (1014) BT_GATT: GATTS_CreateService

D (1024) BT_GATT: allocate_svc_db_buf allocating extra buffer
D (1024) BT_GATT: gatts_init_service_db

D (1034) BT_GATT: s_hdl = 20 num_handle = 9

D (1034) BT_GATT: add_service_declaration
D (1044) BT_GATT: allocate attr 20 bytes

D (1044) BT_GATT: =====> handle = [0x0014] uuid16 = [0x2800] perm=0x01

D (1054) BT_GAP: gap_attr_db_init service_handle = 20
D (1054) BT_GATT: gatts_add_characteristic perm=0x1 property=0x2

D (1064) BT_GATT: allocate attr 20 bytes

D (1064) BT_GATT: =====> handle = [0x0015] uuid16 = [0x2803] perm=0x01

D (1074) BT_GATT: allocate attr 20 bytes

D (1074) BT_GATT: =====> handle = [0x0016] uuid16 = [0x2a00] perm=0x01

D (1084) BT_GATT: gatts_add_characteristic perm=0x1 property=0x2

D (1094) BT_GATT: allocate attr 20 bytes

D (1094) BT_GATT: =====> handle = [0x0017] uuid16 = [0x2803] perm=0x01

D (1104) BT_GATT: allocate attr 20 bytes

D (1104) BT_GATT: =====> handle = [0x0018] uuid16 = [0x2a01] perm=0x01

D (1114) BT_GATT: gatts_add_characteristic perm=0x1 property=0x2

D (1114) BT_GATT: allocate attr 20 bytes

D (1124) BT_GATT: allocate_svc_db_buf allocating extra buffer
D (1124) BT_GATT: =====> handle = [0x0019] uuid16 = [0x2803] perm=0x01

D (1134) BT_GATT: allocate attr 20 bytes

D (1144) BT_GATT: =====> handle = [0x001a] uuid16 = [0x2aa6] perm=0x01

I (1144) BT_GATT: GATTS_StartService
D (1154) BT_GATT: total buffer in db [2]
D (1154) BT_GATT: allocated i_sreg=1

D (1154) BT_GATT: s_hdl=20 e_hdl=28 type=0x2800 svc_inst=0 sdp_hdl=0x0

D (1164) BT_GAP: GAP App gatt_if: 2  s_hdl = 20 start_status=0
D (1174) BT_OSI: section name: Adapter, w_cnt + w_cnt_total = 10

D (1174) BT_OSI: (key, val): (LE_LOCAL_KEY_IRK, e3eedb5e8eccb8e37a48edc945005d6a)

D (1184) BT_OSI: config_save, w_cnt + w_cnt_total = 62
D (1194) BT_OSI: (key, val): (LE_LOCAL_KEY_IR, 9ba81af597ed2d9438ab3eeda4fcca68)

D (1194) BT_OSI: config_save, w_cnt + w_cnt_total = 113
D (1204) BT_OSI: (key, val): (LE_LOCAL_KEY_DHK, be1426500c38955a2f65e6fa524e45fa)

D (1214) BT_OSI: config_save, w_cnt + w_cnt_total = 165
D (1214) BT_OSI: (key, val): (LE_LOCAL_KEY_ER, 32148029075e5e7e71e005404b086110)

D (1224) BT_OSI: config_save, w_cnt + w_cnt_total = 216
D (1234) BT_BTC: btc_dm_load_ble_local_keys BLE ER key loaded
D (1234) BT_BTC: btc_dm_load_ble_local_keys BLE ID keys loaded
D (1244) BT_BTC: btc_transfer_context msg 0 0 2 0x0

D (1244) BT_BTC: btc_thread_handler msg 0 0 2 0x0

D (1254) BT_BTC: btc_main_call_handler act 2

D (1254) BT_APPL: BTA got event 0x100

D (1264) BT_APPL: bta_dm_sm_execute event:0x0
D (1264) BT_APPL: BTA got event 0x0

D (1264) BT_APPL: bta_sys_sm_execute state:0, event:0x0

D (1274) BT_APPL: bta_sys_hw_api_enable for 0, active modules 0x0001

D (1284) BT_APPL: BTA got event 0x1

D (1284) BT_APPL: bta_sys_sm_execute state:1, event:0x1

D (1284) BT_APPL: bta_sys_hw_evt_enabled for 0

D (1294) BT_BTM: btm_acl_device_down

D (1294) BT_HCI: Receive packet event_code=0xe

D (1304) BT_HCI: Receive packet event_code=0xe

D (1304) BT_HCI: Receive packet event_code=0xe

D (1314) BT_HCI: Receive packet event_code=0xe

D (1314) BT_HCI: Receive packet event_code=0xe

D (1324) BT_HCI: Receive packet event_code=0xe

D (1324) BT_HCI: Receive packet event_code=0xe

D (1334) BT_HCI: Receive packet event_code=0xe

D (1334) BT_HCI: Receive packet event_code=0xe

D (1344) BT_HCI: Receive packet event_code=0xe

D (1344) BT_HCI: Receive packet event_code=0xe

D (1354) BT_HCI: Receive packet event_code=0xe

D (1354) BT_HCI: Receive packet event_code=0xe

D (1354) BT_HCI: Receive packet event_code=0xe

D (1364) BT_HCI: Receive packet event_code=0xe

D (1364) BT_HCI: Receive packet event_code=0xe

D (1374) BT_BTM: BTM Register For VSEvents is successfully
D (1374) BT_BTM: btm_ble_resolving_list_init max_irk_list_sz = 10
D (1384) BT_HCI: HCI Enqueue Comamnd opcode=0x2029

D (1394) BT_HCI: Receive packet event_code=0xe

D (1394) BT_HCI: btu_hcif_command_complete_evt

D (1394) BT_HCI: HCI Enqueue Comamnd opcode=0x202e

D (1404) BT_HCI: Receive packet event_code=0xe

D (1404) BT_HCI: btu_hcif_command_complete_evt

D (1414) BT_BTM: btm_ble_white_list_init white_list_size = 12
D (1414) BT_L2CAP: num_lm_ble_bufs = 12
D (1424) BT_BTM: btm_decode_ext_features_page page: 0
D (1424) BT_BTM: Local supported ACL packet types: 0x331e
D (1434) BT_BTM: Local supported SCO packet types: 0x0000
D (1434) BT_BTM: btm_sec_dev_reset sec mode: 2

I (1444) BT_BTM: BTM_SetPageScanType

I (1444) BT_BTM: BTM_SetInquiryScanType

D (1454) BT_APPL:  bta_sys_hw_btm_cback was called with parameter: 0
D (1464) BT_BTM: btm_ble_clear_resolving_list_complete status=0
D (1464) BT_BTM: btm_ble_clear_resolving_list_complete resolving_list_avail_size=10
D (1474) BT_APPL: BTA got event 0x2

D (1474) BT_APPL: bta_sys_sm_execute state:1, event:0x2

D (1484) BT_APPL:  bta_sys_hw_evt_stack_enabled!notify the callers

D (1484) BT_APPL: bta_dm_sys_hw_cback with event: 1
D (1494) BT_APPL: bta_sys_free_timer expected alarm was not in bta alarm hash map.
D (1504) BT_BTC: btc_dm_get_ble_local_keys  *p_key_mask=0x03
D (1504) BT_BTM: BTM_BleLoadLocalKeys
D (1514) BT_BTM: BTM_BleLoadLocalKeys
D (1514) BT_BTM: BTM_SecRegister application registered

D (1524) BT_BTM: BTM_SecRegister p_cb_info->p_le_callback == 0x0x4206ace6
0x4206ace6: bta_dm_ble_smp_cback at D:/Project/iot/esp/esp-idf/4.3.4/components/bt/host/bluedroid/bta/dm/bta_dm_act.c:4615


D (1524) BT_BTM: BTM_SecRegister SMP_Register( btm_proc_smp_cback )

D (1534) BT_SMP: SMP_Register state=0
D (1534) BT_BTM: BTM_SecRegister btm_cb.api.p_le_callback = 0x0x4206ace6
0x4206ace6: bta_dm_ble_smp_cback at D:/Project/iot/esp/esp-idf/4.3.4/components/bt/host/bluedroid/bta/dm/bta_dm_act.c:4615


D (1544) BT_BTM: BTM_SecRegister application registered

D (1554) BT_BTM: BTM_SetDefaultLinkSuperTout

D (1554) BT_BTM: BTM_RegBusyLevelNotif

D (1554) BT_HCI: HCI Enqueue Comamnd opcode=0xc14

D (1564) BT_HCI: Receive packet event_code=0xe

D (1564) BT_HCI: btu_hcif_command_complete_evt

D (1574) BT_OSI: alarm_cbs_lookfor_available 2 0x3fc95b38

D (1574) BT_OSI: osi_alarm_cancel failed to stop timer, err 0x103

D (1584) BT_BTC: btc_transfer_context msg 1 9 0 0x3fcb7438

D (1594) BT_BTC: btc_thread_handler msg 1 9 0 0x3fcb8a5c

D (1594) BT_BTC: btc_dm_upstreams_cback  ev: 0

D (1604) BT_BTC: Storage load rslt 0

D (1604) BT_BTC: Storage load rslt 1

D (1604) BT_APPL: BTA got event 0x102

D (1614) BT_APPL: bta_dm_sm_execute event:0x2
I (1614) BLUFI_EXAMPLE: BD ADDR: a0:76:4e:70:bf:85

D (1624) BT_BTC: btc_transfer_context msg 0 8 0 0x0

D (1624) BT_BTC: btc_thread_handler msg 0 8 0 0x0

D (1634) BT_APPL: BTA got event 0x2000

D (1634) BT_APPL: bta_gatts_enable: num of handle range added=0
D (1644) BT_GATT: gatt_init_srv_chg
V (1644) BT_APPL: register application first_unuse rcb_idx = 0
I (1654) BT_GATT: GATT_Register
D (1654) BT_GATT: UUID=[0xffff]
I (1654) BT_GATT: allocated gatt_if=3

D (1664) BT_BLUFI: blufi profile cb event = 0

D (1664) BT_BLUFI: REG: status 0, app_uuid ffff, gatt_if 3

D (1674) BT_BLUFI: blufi_profile_cb 125

D (1674) BT_APPL: BTA got event 0x2001

I (1684) BT_GATT: GATT_StartIf gatt_if=3
D (1684) BT_GATT: gatt_find_the_connected_bda start_idx=0
D (1694) BT_APPL: BTA got event 0x2003

D (1694) BT_APPL: create service rcb_idx = 0
I (1704) BT_GATT: GATTS_CreateService

D (1704) BT_GATT: gatt_add_pending_new_srv_start
D (1704) BT_GATT: enqueue a new pending new srv start
D (1714) BT_GATT: Add a new srv chg item

D (1714) BT_GATT: allocate_svc_db_buf allocating extra buffer
D (1724) BT_GATT: gatts_init_service_db

D (1724) BT_GATT: s_hdl = 40 num_handle = 6

D (1734) BT_GATT: add_service_declaration
D (1734) BT_GATT: allocate attr 20 bytes

D (1744) BT_GATT: =====> handle = [0x0028] uuid16 = [0x2800] perm=0x01

D (1744) BT_BLUFI: blufi profile cb event = 7

D (1754) BT_APPL: BTA got event 0x2006

D (1754) BT_APPL: bta_gatts_find_srvc_cb_by_srvc_id  service_id=40
D (1764) BT_APPL: bta_gatts_find_srvc_cb_by_srvc_id  found service cb index =0
D (1774) BT_GATT: gatts_add_characteristic perm=0x10 property=0x8

D (1774) BT_GATT: allocate attr 20 bytes

D (1784) BT_GATT: =====> handle = [0x0029] uuid16 = [0x2803] perm=0x01

D (1784) BT_GATT: allocate attr 20 bytes

D (1794) BT_GATT: =====> handle = [0x002a] uuid16 = [0xff01] perm=0x10

D (1794) BT_BLUFI: blufi profile cb event = 9

D (1804) BT_APPL: BTA got event 0x2006

D (1804) BT_APPL: bta_gatts_find_srvc_cb_by_srvc_id  service_id=40
D (1814) BT_APPL: bta_gatts_find_srvc_cb_by_srvc_id  found service cb index =0
D (1824) BT_GATT: gatts_add_characteristic perm=0x1 property=0x12

D (1824) BT_GATT: allocate attr 20 bytes

D (1834) BT_GATT: =====> handle = [0x002b] uuid16 = [0x2803] perm=0x01

D (1834) BT_GATT: allocate attr 20 bytes

D (1844) BT_GATT: =====> handle = [0x002c] uuid16 = [0xff02] perm=0x01

D (1844) BT_BLUFI: blufi profile cb event = 9

D (1854) BT_APPL: BTA got event 0x2007

D (1854) BT_APPL: bta_gatts_find_srvc_cb_by_srvc_id  service_id=40
D (1864) BT_APPL: bta_gatts_find_srvc_cb_by_srvc_id  found service cb index =0
D (1874) BT_GATT: gatts_add_char_descr uuid=0x2902

D (1874) BT_GATT: allocate attr 20 bytes

D (1884) BT_GATT: allocate_svc_db_buf allocating extra buffer
D (1884) BT_GATT: =====> handle = [0x002d] uuid16 = [0x2902] perm=0x11

D (1894) BT_BLUFI: blufi profile cb event = a

D (1894) BT_BTC: btc_transfer_context msg 1 8 0 0x3fcb72c0

D (1904) BT_APPL: BTA got event 0x2009

D (1904) BT_APPL: bta_gatts_find_srvc_cb_by_srvc_id  service_id=40
D (1914) BT_APPL: bta_gatts_find_srvc_cb_by_srvc_id  found service cb index =0
I (1924) BT_GATT: GATTS_StartService
D (1924) BT_GATT: total buffer in db [2]
D (1924) BT_GATT: allocated i_sreg=2

D (1934) BT_GATT: s_hdl=40 e_hdl=45 type=0x2800 svc_inst=0 sdp_hdl=0x0

D (1934) BT_GATT: gatt_sr_is_new_srv_chg: Yes
D (1944) BT_GATT: gatt_proc_srv_chg
D (1944) BT_GATT: gatt_set_srv_chg
D (1954) BT_GATT: gatt_find_the_connected_bda start_idx=0
D (1954) BT_APPL: bta_gatts_start_service service_id= 40
D (1964) BT_BLUFI: blufi profile cb event = c

D (1964) BT_BTC: btc_thread_handler msg 1 8 0 0x3fcb46f0

I (1974) BLUFI_EXAMPLE: BLUFI init finish

D (1974) BT_BTC: btc_transfer_context msg 0 1 0 0x3fcb4384

D (1984) BT_BTC: btc_transfer_context msg 0 5 0 0x3fcb436c

D (1984) BT_BTC: btc_thread_handler msg 0 1 0 0x3fcb3674

D (1994) BT_BTC: btc_dev_call_handler act 0

D (1994) BT_APPL: BTA got event 0x102

D (2004) BT_APPL: bta_dm_sm_execute event:0x2
D (2004) BT_BTC: btc_dev_arg_deep_free 

D (2014) BT_BTC: btc_thread_handler msg 0 5 0 0x3fcb8c70

D (2014) BT_BTC: btc_gap_ble_call_handler act 0

D (2024) BT_BTC: btc_to_bta_adv_data - In 16-UUID_data
D (2024) BT_APPL: BTA got event 0x127

D (2034) BT_APPL: bta_dm_sm_execute event:0x27
D (2034) BT_BTM: BTM_BleWriteAdvData
D (2034) BT_BTM:  btm_ble_build_adv_data
D (2044) BT_HCI: p_data[0] = 2

D (2044) BT_HCI: p_data[1] = 1

D (2044) BT_HCI: p_data[2] = 6

D (2054) BT_HCI: p_data[3] = d

D (2054) BT_HCI: p_data[4] = 9

D (2054) BT_HCI: p_data[5] = 42

D (2064) BT_HCI: p_data[6] = 4c

D (2064) BT_HCI: p_data[7] = 55

D (2064) BT_HCI: p_data[8] = 46

D (2074) BT_HCI: p_data[9] = 49

D (2074) BT_HCI: p_data[10] = 5f

D (2074) BT_HCI: p_data[11] = 44

D (2084) BT_HCI: p_data[12] = 45

D (2084) BT_HCI: p_data[13] = 56

D (2084) BT_HCI: p_data[14] = 49

D (2094) BT_HCI: p_data[15] = 43

D (2094) BT_HCI: p_data[16] = 45

D (2104) BT_HCI: p_data[17] = 2

D (2104) BT_HCI: p_data[18] = a

D (2104) BT_HCI: p_data[19] = 9

D (2114) BT_HCI: p_data[20] = 3

D (2114) BT_HCI: p_data[21] = 3

D (2114) BT_HCI: p_data[22] = ff

D (2124) BT_HCI: p_data[23] = ff

D (2124) BT_HCI: p_data[24] = 5

D (2124) BT_HCI: p_data[25] = 12

D (2134) BT_HCI: p_data[26] = 6

D (2134) BT_HCI: p_data[27] = 0

D (2134) BT_HCI: p_data[28] = 10

D (2144) BT_HCI: p_data[29] = 0

D (2144) BT_HCI: HCI Enqueue Comamnd opcode=0x2008

D (2154) BT_HCI: Receive packet event_code=0xe

D (2154) BT_HCI: btu_hcif_command_complete_evt

D (2154) BT_BTC: btc_transfer_context msg 1 5 0 0x3fcb744c

D (2164) BT_BTC: btc_gap_ble_arg_deep_free 

D (2164) BT_BTC: btc_thread_handler msg 1 5 0 0x3fcb8d2c

D (2174) BT_BTC: btc_transfer_context msg 0 5 4 0x3fcb43cc

D (2184) BT_BTC: btc_gap_ble_cb_deep_free
D (2184) BT_BTC: Unhandled deep free 0
D (2184) BT_BTC: btc_thread_handler msg 0 5 4 0x3fcb8c70

D (2194) BT_BTC: btc_gap_ble_call_handler act 4

D (2194) BT_BTC: API_Ble_AppStartAdvertising

I (2204) BT_APPL: BTA_DmSetBleAdvParamsAll: 256, 256

I (2204) BT_APPL: adv_type = 0, addr_type_own = 0, chnl_map = 7, adv_fil_pol = 0

D (2214) BT_APPL: BTA got event 0x126

D (2224) BT_APPL: bta_dm_sm_execute event:0x26
D (2224) BT_BTM: BTM_BleSetAdvParamsAll

D (2224) BT_HCI: HCI Enqueue Comamnd opcode=0x200a

D (2234) BT_HCI: Receive packet event_code=0xe

D (2234) BT_HCI: btu_hcif_command_complete_evt

D (2244) BT_BTM: update params for an active adv

D (2244) BT_HCI: HCI Enqueue Comamnd opcode=0x2006

D (2254) BT_HCI: Receive packet event_code=0xe

D (2254) BT_HCI: btu_hcif_command_complete_evt

D (2264) BT_APPL: bta_dm_ble_set_adv_params_all(), success to set ble adv params.
D (2274) BT_HCI: HCI Enqueue Comamnd opcode=0x200a

D (2274) BT_HCI: Receive packet event_code=0xe

D (2284) BT_HCI: btu_hcif_command_complete_evt

D (2284) BT_BTM: btm_ble_start_adv

D (2284) BT_HCI: HCI Enqueue Comamnd opcode=0x200a

D (2294) BT_HCI: Receive packet event_code=0xe

D (2294) BT_HCI: btu_hcif_command_complete_evt

D (2304) BT_BTM: BTM_SUCCESS

D (2304) BT_BTC: btc_transfer_context msg 1 5 6 0x3fcb744c

D (2314) BT_BTC: btc_gap_ble_arg_deep_free

D (2314) BT_BTC: Unhandled deep free 4

D (2324) BT_BTC: btc_thread_handler msg 1 5 6 0x3fcb8d7c

D (2324) BT_BTC: btc_gap_ble_cb_deep_free
D (2334) BT_BTC: Unhandled deep free 6
I (2334) BLUFI_EXAMPLE: BLUFI VERSION 0102

D (51144) BT_HCI: Receive packet event_code=0x3e

D (51144) BT_HCI: Receive packet event_code=0x3e

D (51144) BT_HCI: BLE HCI(id=62) event = 0x0a)
D (51154) BT_BTM: status = 0, handle = 1, role = 1, bda_type = 1
D (51154) BT_BTM: btm_identity_addr_to_random_pseudo
D (51164) BT_BTM: btm_ble_resolve_random_addr
D (51164) BT_BTM: btm_ble_resolve_address_cmpl p_mgnt_cb->p_dev_rec = 0x00000000
D (51174) BT_BTM: btm_ble_resolve_random_addr_on_conn_cmpl

D (51174) BT_BTM: btm_ble_resolve_random_addr_on_conn_cmpl unable to match and resolve random address
D (51184) BT_BTM: btm_ble_connected
D (51194) BT_BTM: btm_sec_alloc_dev

I (51194) BT_BTM: BTM_InqDbRead: bd addr [708f186b89ae]

D (51204) BT_BTM: BTM_GetHCIConnHandle

D (51204) BT_BTM: BTM_GetHCIConnHandle

D (51204) BT_HCI: btu_free_timer Unable to find expected alarm in hashmap
D (51214) BT_HCI: btu_free_timer Unable to find expected alarm in hashmap
D (51224) BT_HCI: btu_free_timer Unable to find expected alarm in hashmap
D (51234) BT_L2CAP: l2c_ble_link_adjust_allocation  num_hipri: 0  num_lowpri: 1  low_quota: 12  round_robin_quota: 0  qq: 12
D (51244) BT_L2CAP: l2c_ble_link_adjust_allocation   Priority: 0  XmitQuota: 12
D (51244) BT_L2CAP:         SentNotAcked: 0  RRUnacked: 0
D (51254) BT_L2CAP: l2cu_allocate_ccb: cid 0x0000
D (51254) BT_HCI: btu_free_quick_timer Unable to find expected alarm in hashmap
D (51264) BT_HCI: btu_free_quick_timer Unable to find expected alarm in hashmap
D (51274) BT_HCI: btu_free_timer Unable to find expected alarm in hashmap
D (51284) BT_L2CAP: l2c_link_adjust_chnl_allocation
D (51284) BT_L2CAP: CID:0x0040 FCR Mode:0 Priority:2 TxDataRate:1 RxDataRate:1 Quota:20
D (51294) BT_BTM: btm_find_or_alloc_dev

D (51294) BT_BTM: btm_acl_created hci_handle=1 link_role=1  transport=2

D (51304) BT_BTM: device_type=0x2

D (51304) BT_HCI: HCI Enqueue Comamnd opcode=0x41d

D (51314) BT_HCI: Receive packet event_code=0xf

D (51314) BT_HCI: BLE HCI(id=62) event = 0x14)
D (56344) BT_HCI: Receive packet event_code=0xc

D (56344) BT_HCI: Receive packet event_code=0x5

D (56344) BT_BTM: btm_read_remote_version_complete

D (56344) BT_BTM: btm_handle_to_acl_index: 1

D (56354) BT_HCI: HCI Enqueue Comamnd opcode=0x2016

D (56354) BT_HCI: Receive packet event_code=0xf

W (56364) BT_HCI: hcif disc complete: hdl 0x1, rsn 0x8
D (56364) BT_HCI: btu_free_timer Unable to find expected alarm in hashmap
D (56374) BT_HCI: btu_free_timer Unable to find expected alarm in hashmap
D (56384) BT_HCI: btu_free_timer Unable to find expected alarm in hashmap
D (56384) BT_L2CAP: l2cu_release_ccb: cid 0x0004  in_use: 1
D (56394) BT_HCI: btu_free_timer Unable to find expected alarm in hashmap
D (56394) BT_GATT: GATT   ATT protocol channel with BDA: 708f186b89ae is disconnected
D (56404) BT_GATT: gatt_is_bda_in_the_srv_chg_clt_list :70-8f-18-6b-89-ae
D (56414) BT_BTM: btm_sec_is_a_bonded_dev() is_bonded=0

D (56414) BT_GATT: gatt_cleanup_upon_disc
D (56424) BT_GATT: exit gatt_cleanup_upon_disc 
D (56424) BT_HCI: HCI Enqueue Comamnd opcode=0x200a

D (56434) BT_HCI: Receive packet event_code=0xe

D (56434) BT_HCI: btu_hcif_command_complete_evt

D (56444) BT_BTM: btm_ble_start_adv

D (56444) BT_HCI: HCI Enqueue Comamnd opcode=0x200a

D (56454) BT_HCI: Receive packet event_code=0xe

D (56454) BT_HCI: btu_hcif_command_complete_evt

D (56464) BT_BTM: BTM_SUCCESS

D (56464) BT_GATT: gatt_delete_dev_from_srv_chg_clt_list
D (56474) BT_GATT: gatt_is_bda_in_the_srv_chg_clt_list :70-8f-18-6b-89-ae
D (56474) BT_GATT: ATT disconnected
D (56484) BT_SMP: SMDBG l2c smp_connect_callback

D (56484) BT_HCI: btu_free_timer Unable to find expected alarm in hashmap
D (56494) BT_BTM: btm_acl_removed

D (56494) BT_BTM: btm_acl_report_role_change

D (56504) BT_BTM: acl hci_handle=1 transport=2 connectable_mode=0x0 link_role=1

D (56504) BT_BTM: before update p_dev_rec->sec_flags=0x80

D (56514) BT_BTM: LE link down

D (56514) BT_BTM: Not Bonded

D (56514) BT_BTM: after update p_dev_rec->sec_flags=0x80

D (56524) BT_BTM: btm_sec_disconnected before update sec_flags=0x80

D (56534) BT_BTM: btm_sec_disconnected after update sec_flags=0x80
感谢您的任何回答。
Attachments
ios.jpg
ios.jpg (104.02 KiB) Viewed 1875 times
android.jpg
android.jpg (248.75 KiB) Viewed 1875 times

meibao
Posts: 10
Joined: Thu Aug 27, 2020 8:43 am

Re: ESP32C3 blufi例程循环connect/disconnect

Postby meibao » Thu Feb 16, 2023 7:04 am

各位好,请问有谁可以指点一下吗?产品现处于小批量生产状态卡在这里出问题,可以有偿付费解决

Who is online

Users browsing this forum: No registered users and 108 guests