-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【求助】在测试蓝牙1对8时,第一次扫描8个成功,就没问题,但若第一次扫描连接了比如7个,然后报错,再扫描也连接不上最后一个了,报这种错误 (IDFGH-14077) #14891
Comments
有时还会报W (1887) BT_L2CAP: L2CAP - LE - cannot start new connection at conn st: 1 这个警告,但是也连接成功8个设备了 |
@beautifulpeer |
您好,HCI log已开启,辛苦您帮我看看,此次连接8个异常 2024-11-15 16:28:29 ESP-ROM:esp32s3-20210327 |
@beautifulpeer 好的,我来看一下 |
Answers checklist.
General issue report
ESP-IDF版本 5.3.1
芯片ESP32-S3 PICO
BLE5.0
正常log:成功扫描到8个设备
2024-11-15 15:02:24 ESP-ROM:esp32s3-20210327
2024-11-15 15:02:24 Build:Mar 27 2021
2024-11-15 15:02:24 rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
2024-11-15 15:02:24 SPIWP:0xee
2024-11-15 15:02:24 mode:DIO, clock div:1
2024-11-15 15:02:24 load:0x3fce2820,len:0x1918
2024-11-15 15:02:24 load:0x403c8700,len:0x4
2024-11-15 15:02:24 load:0x403c8704,len:0xe04
2024-11-15 15:02:24 load:0x403cb700,len:0x3014
2024-11-15 15:02:24 entry 0x403c8930
2024-11-15 15:02:24 I (27) boot: ESP-IDF v5.3.1-dirty 2nd stage bootloader
2024-11-15 15:02:24 I (27) boot: compile time Nov 14 2024 17:53:11
2024-11-15 15:02:24 I (27) boot: Multicore bootloader
2024-11-15 15:02:24 I (30) boot: chip revision: v0.2
2024-11-15 15:02:24 I (34) qio_mode: Enabling default flash chip QIO
2024-11-15 15:02:24 I (39) boot.esp32s3: Boot SPI Speed : 80MHz
2024-11-15 15:02:24 I (44) boot.esp32s3: SPI Mode : QIO
2024-11-15 15:02:24 I (49) boot.esp32s3: SPI Flash Size : 8MB
2024-11-15 15:02:24 I (54) boot: Enabling RNG early entropy source...
2024-11-15 15:02:24 I (59) boot: Partition Table:
2024-11-15 15:02:24 I (63) boot: ## Label Usage Type ST Offset Length
2024-11-15 15:02:24 I (70) boot: 0 nvs WiFi data 01 02 00009000 00006000
2024-11-15 15:02:24 I (77) boot: 1 factory factory app 00 00 00010000 00200000
2024-11-15 15:02:24 I (85) boot: 2 custom_nvs WiFi data 01 02 00210000 00100000
2024-11-15 15:02:24 I (92) boot: End of partition table
2024-11-15 15:02:24 I (97) esp_image: segment 0: paddr=00010020 vaddr=3c070020 size=1ec24h (125988) map
2024-11-15 15:02:24 I (124) esp_image: segment 1: paddr=0002ec4c vaddr=3fc98700 size=013cch ( 5068) load
2024-11-15 15:02:24 I (125) esp_image: segment 2: paddr=00030020 vaddr=42000020 size=6e334h (451380) map
2024-11-15 15:02:24 I (198) esp_image: segment 3: paddr=0009e35c vaddr=3fc99acc size=02d00h ( 11520) load
2024-11-15 15:02:24 I (201) esp_image: segment 4: paddr=000a1064 vaddr=40374000 size=14678h ( 83576) load
2024-11-15 15:02:24 I (228) boot: Loaded app from partition at offset 0x10000
2024-11-15 15:02:24 I (228) boot: Disabling RNG early entropy source...
2024-11-15 15:02:24 I (240) cpu_start: Multicore app
2024-11-15 15:02:24 I (249) cpu_start: Pro cpu start user code
2024-11-15 15:02:24 I (249) cpu_start: cpu freq: 240000000 Hz
2024-11-15 15:02:24 I (249) app_init: Application information:
2024-11-15 15:02:24 I (252) app_init: Project name: tests
2024-11-15 15:02:24 I (257) app_init: App version: 35be65f-dirty
2024-11-15 15:02:24 I (262) app_init: Compile time: Nov 14 2024 19:15:00
2024-11-15 15:02:24 I (268) app_init: ELF file SHA256: 2d124f9cf329f5be...
2024-11-15 15:02:24 I (274) app_init: ESP-IDF: v5.3.1-dirty
2024-11-15 15:02:24 I (279) efuse_init: Min chip rev: v0.0
2024-11-15 15:02:24 I (284) efuse_init: Max chip rev: v0.99
2024-11-15 15:02:24 I (289) efuse_init: Chip rev: v0.2
2024-11-15 15:02:24 I (294) heap_init: Initializing. RAM available for dynamic allocation:
2024-11-15 15:02:24 I (301) heap_init: At 3FCA0590 len 00049180 (292 KiB): RAM
2024-11-15 15:02:24 I (307) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
2024-11-15 15:02:24 I (313) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
2024-11-15 15:02:24 I (320) heap_init: At 600FE100 len 00001EE8 (7 KiB): RTCRAM
2024-11-15 15:02:24 I (327) spi_flash: detected chip: generic
2024-11-15 15:02:24 I (330) spi_flash: flash io: qio
2024-11-15 15:02:25 I (335) sleep: Configure to isolate all GPIO pins in sleep state
2024-11-15 15:02:25 I (341) sleep: Enable automatic switching of GPIO sleep configuration
2024-11-15 15:02:25 I (348) coexist: coex firmware version: 4482466
2024-11-15 15:02:25 I (376) coexist: coexist rom version e7ae62f
2024-11-15 15:02:25 I (377) main_task: Started on CPU0
2024-11-15 15:02:25 I (387) main_task: Calling app_main()
2024-11-15 15:02:25 I (447) gpio: GPIO[12]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:02:25 I (457) gpio: GPIO[13]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:02:25 I (467) gpio: GPIO[15]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:02:25 I (477) gpio: GPIO[16]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:02:25 I (487) gpio: GPIO[17]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:02:25 I (497) gpio: GPIO[18]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:02:25 I (507) gpio: GPIO[36]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:02:25 I (517) gpio: GPIO[37]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:02:25 I (527) gpio: GPIO[38]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:02:25 I (537) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:2
2024-11-15 15:02:25 E (537) test_ble_c: - - - - - - - - - - - - - - - - - - - - - -
2024-11-15 15:02:25 E (547) test_ble_c: >>>>>>>>>> test_ble_c <<<<<<<<<<
2024-11-15 15:02:25 E (557) test_ble_c: - - - - - - - - - - - - - - - - - - - - - -
2024-11-15 15:02:25 I (567) BLE_INIT: BT controller compile version [aa16a46]
2024-11-15 15:02:25 I (567) BLE_INIT: Bluetooth MAC: 3c:84:27:d8:84:d2
2024-11-15 15:02:25 I (577) phy_init: phy_version 680,a6008b2,Jun 4 2024,16:41:10
2024-11-15 15:02:25 I (637) main_task: Returned from app_main()
2024-11-15 15:02:26 I (2057) test_ble_c: most [8] sensor to scan
2024-11-15 15:02:28 I (4107) test_ble_c: 8 [1000]ms to get info
2024-11-15 15:02:28 I (4107) test_ble_c: request [8] sensor info once
2024-11-15 15:02:28 W (4107) test_ble_c: send [cmd_scan]
异常log:只连接了7个设备,第8个报警
2024-11-15 15:03:02 ESP-ROM:esp32s3-20210327
2024-11-15 15:03:02 Build:Mar 27 2021
2024-11-15 15:03:02 rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
2024-11-15 15:03:02 SPIWP:0xee
2024-11-15 15:03:02 mode:DIO, clock div:1
2024-11-15 15:03:02 load:0x3fce2820,len:0x1918
2024-11-15 15:03:02 load:0x403c8700,len:0x4
2024-11-15 15:03:02 load:0x403c8704,len:0xe04
2024-11-15 15:03:02 load:0x403cb700,len:0x3014
2024-11-15 15:03:02 entry 0x403c8930
2024-11-15 15:03:02 I (27) boot: ESP-IDF v5.3.1-dirty 2nd stage bootloader
2024-11-15 15:03:02 I (27) boot: compile time Nov 14 2024 17:53:11
2024-11-15 15:03:02 I (27) boot: Multicore bootloader
2024-11-15 15:03:02 I (30) boot: chip revision: v0.2
2024-11-15 15:03:02 I (34) qio_mode: Enabling default flash chip QIO
2024-11-15 15:03:02 I (39) boot.esp32s3: Boot SPI Speed : 80MHz
2024-11-15 15:03:02 I (44) boot.esp32s3: SPI Mode : QIO
2024-11-15 15:03:02 I (49) boot.esp32s3: SPI Flash Size : 8MB
2024-11-15 15:03:02 I (54) boot: Enabling RNG early entropy source...
2024-11-15 15:03:02 I (59) boot: Partition Table:
2024-11-15 15:03:02 I (63) boot: ## Label Usage Type ST Offset Length
2024-11-15 15:03:02 I (70) boot: 0 nvs WiFi data 01 02 00009000 00006000
2024-11-15 15:03:02 I (77) boot: 1 factory factory app 00 00 00010000 00200000
2024-11-15 15:03:02 I (85) boot: 2 custom_nvs WiFi data 01 02 00210000 00100000
2024-11-15 15:03:02 I (92) boot: End of partition table
2024-11-15 15:03:02 I (97) esp_image: segment 0: paddr=00010020 vaddr=3c070020 size=1ec24h (125988) map
2024-11-15 15:03:02 I (124) esp_image: segment 1: paddr=0002ec4c vaddr=3fc98700 size=013cch ( 5068) load
2024-11-15 15:03:02 I (125) esp_image: segment 2: paddr=00030020 vaddr=42000020 size=6e334h (451380) map
2024-11-15 15:03:02 I (198) esp_image: segment 3: paddr=0009e35c vaddr=3fc99acc size=02d00h ( 11520) load
2024-11-15 15:03:02 I (201) esp_image: segment 4: paddr=000a1064 vaddr=40374000 size=14678h ( 83576) load
2024-11-15 15:03:02 I (228) boot: Loaded app from partition at offset 0x10000
2024-11-15 15:03:02 I (228) boot: Disabling RNG early entropy source...
2024-11-15 15:03:02 I (240) cpu_start: Multicore app
2024-11-15 15:03:02 I (249) cpu_start: Pro cpu start user code
2024-11-15 15:03:02 I (249) cpu_start: cpu freq: 240000000 Hz
2024-11-15 15:03:02 I (249) app_init: Application information:
2024-11-15 15:03:02 I (252) app_init: Project name: tests
2024-11-15 15:03:02 I (257) app_init: App version: 35be65f-dirty
2024-11-15 15:03:02 I (262) app_init: Compile time: Nov 14 2024 19:15:00
2024-11-15 15:03:02 I (268) app_init: ELF file SHA256: 2d124f9cf329f5be...
2024-11-15 15:03:02 I (274) app_init: ESP-IDF: v5.3.1-dirty
2024-11-15 15:03:02 I (279) efuse_init: Min chip rev: v0.0
2024-11-15 15:03:02 I (284) efuse_init: Max chip rev: v0.99
2024-11-15 15:03:02 I (289) efuse_init: Chip rev: v0.2
2024-11-15 15:03:02 I (294) heap_init: Initializing. RAM available for dynamic allocation:
2024-11-15 15:03:02 I (301) heap_init: At 3FCA0590 len 00049180 (292 KiB): RAM
2024-11-15 15:03:02 I (307) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
2024-11-15 15:03:02 I (313) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
2024-11-15 15:03:02 I (320) heap_init: At 600FE100 len 00001EE8 (7 KiB): RTCRAM
2024-11-15 15:03:02 I (327) spi_flash: detected chip: generic
2024-11-15 15:03:02 I (330) spi_flash: flash io: qio
2024-11-15 15:03:02 I (335) sleep: Configure to isolate all GPIO pins in sleep state
2024-11-15 15:03:02 I (341) sleep: Enable automatic switching of GPIO sleep configuration
2024-11-15 15:03:02 I (348) coexist: coex firmware version: 4482466
2024-11-15 15:03:02 I (376) coexist: coexist rom version e7ae62f
2024-11-15 15:03:02 I (377) main_task: Started on CPU0
2024-11-15 15:03:02 I (387) main_task: Calling app_main()
2024-11-15 15:03:02 I (447) gpio: GPIO[12]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:03:02 I (457) gpio: GPIO[13]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:03:02 I (467) gpio: GPIO[15]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:03:02 I (477) gpio: GPIO[16]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:03:02 I (487) gpio: GPIO[17]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:03:02 I (497) gpio: GPIO[18]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:03:02 I (507) gpio: GPIO[36]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:03:02 I (517) gpio: GPIO[37]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:03:03 I (527) gpio: GPIO[38]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
2024-11-15 15:03:03 I (537) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:2
2024-11-15 15:03:03 E (537) test_ble_c: - - - - - - - - - - - - - - - - - - - - - -
2024-11-15 15:03:03 E (547) test_ble_c: >>>>>>>>>> test_ble_c <<<<<<<<<<
2024-11-15 15:03:03 E (557) test_ble_c: - - - - - - - - - - - - - - - - - - - - - -
2024-11-15 15:03:03 I (567) BLE_INIT: BT controller compile version [aa16a46]
2024-11-15 15:03:03 I (567) BLE_INIT: Bluetooth MAC: 3c:84:27:d8:84:d2
2024-11-15 15:03:03 I (577) phy_init: phy_version 680,a6008b2,Jun 4 2024,16:41:10
2024-11-15 15:03:03 I (637) main_task: Returned from app_main()
2024-11-15 15:03:04 I (1617) test_ble_c: most [8] sensor to scan
2024-11-15 15:03:06 W (4277) BT_HCI: btu_hcif_hdl_command_status,opcode:0x2043,status:0x3b
2024-11-15 15:03:06 W (4277) BT_APPL: gattc_conn_cb: if=1 st=0 id=1793 rsn=0x100
2024-11-15 15:03:06 W (4287) BT_APPL: gattc_conn_cb: if=2 st=0 id=1794 rsn=0x100
2024-11-15 15:03:06 W (4297) BT_APPL: gattc_conn_cb: if=3 st=0 id=1795 rsn=0x100
2024-11-15 15:03:06 W (4297) BT_APPL: gattc_conn_cb: if=4 st=0 id=1796 rsn=0x100
2024-11-15 15:03:06 W (4307) BT_APPL: gattc_conn_cb: if=5 st=0 id=1797 rsn=0x100
2024-11-15 15:03:06 W (4317) BT_APPL: gattc_conn_cb: if=6 st=0 id=1798 rsn=0x100
2024-11-15 15:03:06 W (4317) BT_APPL: gattc_conn_cb: if=7 st=0 id=1799 rsn=0x100
2024-11-15 15:03:06 W (4327) BT_APPL: gattc_conn_cb: if=8 st=0 id=1800 rsn=0x100
2024-11-15 15:03:06 E (4337) egl_ble_c: p_data->disconnect.conn_id :7 disconnect
3.BT_HCI: btu_hcif_hdl_command_status,opcode:0x2043,status:0x3b这个警告是由于连接参数不对导致,但我正常和异常时使用的都是同一组参数,参入如下:
static esp_ble_ext_scan_params_t m_scan_params = {
.own_addr_type = BLE_ADDR_TYPE_PUBLIC,
.filter_policy = BLE_SCAN_FILTER_ALLOW_ALL,
.scan_duplicate = BLE_SCAN_DUPLICATE_ENABLE,
.cfg_mask = ESP_BLE_GAP_EXT_SCAN_CFG_UNCODE_MASK,
.uncoded_cfg = {BLE_SCAN_TYPE_ACTIVE, 160, 160}, // 400ms 20ms : 640, 32 100ms 50ms : 160, 80 (625 us units)
.coded_cfg = {BLE_SCAN_TYPE_ACTIVE, 160, 160},
};
const esp_ble_gap_conn_params_t phy_1m_conn_params = {
.scan_interval = 0x50, // 扫描间隔,单位:0.625ms
.scan_window = 0x50, // 扫描窗口,单位:0.625ms
.interval_min = 0x10, // 最小连接间隔,单位:1.25ms
.interval_max = 0x30, // 最大连接间隔,单位:1.25ms
.latency = 0, // 连接延迟,单位:连接事件
.supervision_timeout = 100, // 连接监督超时,单位:10ms
.min_ce_len = 0, // 最小连接事件长度,单位:0.625ms
.max_ce_len = 0 // 最大连接事件长度,单位:0.625ms
};
4.这种情况很不稳定,有时行,有时不行,如何才能避免此种情况?
@esp-zhp
The text was updated successfully, but these errors were encountered: