【已解决】编译V4.2.2例程中的blufi,蓝牙配网出现的问题

User avatar
山竹君_kk
Posts: 17
Joined: Mon Nov 01, 2021 2:33 am

【已解决】编译V4.2.2例程中的blufi,蓝牙配网出现的问题

Postby 山竹君_kk » Mon Nov 01, 2021 3:01 am

硬件使用的是HelloBug开发板,芯片版本是:ESP32-WROOM-32E,idf工具链是:esp-idf-v4.2
问题描述:
我是直接使用master分支v4.2.2中的blufi例程,Win7下的VScode环境。没有动过例程里面的任何代码包括menuconfig。
也试过其他分支的代码,这部分代码好像都是一样的。
烧录后上电运行没问题,蓝牙配网初始化也完成了:I (1250) BLUFI_EXAMPLE: BLUFI init finish,到这里等待配网。使用官方appEspBluFi来配网,能搜到设备,但是只要点击连接就会导致硬件重启,app报错误码:Disconnect A8:03:2A:E6:D3:02,status=133.

自己看了一下log,发现程序打印了“BLUFI ble connect”,说明已经建立连接了。但是紧接着芯片就报错:
D:/ESP32/esp-idf-v4.2/components/freertos/queue.c:1447 (xQueueGenericReceive)- assert failed!

abort() was called at PC 0x40090f2d on core 0
0x40090f2d: xQueueGenericReceive at D:/ESP32/esp-idf-v4.2/components/freertos/queue.c:1447 (discriminator 1)

查了一下queue.c这个文件第1447行,发现这行是一句断言:configASSERT( pxQueue );
到此我就没有思路了,希望个位大佬能帮忙提供写解决思路。




rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
load:0x3fff0034,len:7084
load:0x40078000,len:13696
load:0x40080400,len:4000
0x40080400: _init at ??:?

entry 0x40080688
I (29) boot: ESP-IDF v4.2-dev-1995-g636b964c8 2nd stage bootloader
I (29) boot: compile time 10:16:40
I (29) boot: chip revision: 3
I (34) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (41) boot.esp32: SPI Speed : 40MHz
I (45) boot.esp32: SPI Mode : DIO
I (50) boot.esp32: SPI Flash Size : 2MB
I (54) boot: Enabling RNG early entropy source...
I (60) boot: Partition Table:
I (63) boot: ## Label Usage Type ST Offset Length
I (71) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (78) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (86) boot: 2 factory factory app 00 00 00010000 00100000
I (93) boot: End of partition table
I (97) boot_comm: chip revision: 3, min. application chip revision: 0
I (104) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x24258 (148056) map
I (170) esp_image: segment 1: paddr=0x00034280 vaddr=0x3ffbdb60 size=0x04098 ( 16536) load
I (177) esp_image: segment 2: paddr=0x00038320 vaddr=0x40080000 size=0x00404 ( 1028) load
0x40080000: _WindowOverflow4 at D:/ESP32/esp-idf-v4.2/components/freertos/xtensa/xtensa_vectors.S:1730

I (178) esp_image: segment 3: paddr=0x0003872c vaddr=0x40080404 size=0x078ec ( 30956) load
I (199) esp_image: segment 4: paddr=0x00040020 vaddr=0x400d0020 size=0xa93c8 (693192) map
0x400d0020: _stext at ??:?

I (463) esp_image: segment 5: paddr=0x000e93f0 vaddr=0x40087cf0 size=0x15474 ( 87156) load
0x40087cf0: r_rwbt_isr at ??:?

I (517) boot: Loaded app from partition at offset 0x10000
I (517) boot: Disabling RNG early entropy source...
I (517) cpu_start: Pro cpu up.
I (521) cpu_start: Application information:
I (526) cpu_start: Project name: blufi_demo
I (531) cpu_start: App version: 1
I (535) cpu_start: Compile time: Nov 1 2021 10:16:21
I (541) cpu_start: ELF file SHA256: 185322e57a244473...
I (547) cpu_start: ESP-IDF: v4.2-dev-1995-g636b964c8
I (554) cpu_start: Starting app cpu, entry point is 0x400818d8
0x400818d8: call_start_cpu1 at D:/ESP32/esp-idf-v4.2/components/esp32/cpu_start.c:282

I (0) cpu_start: App cpu up.
I (564) heap_init: Initializing. RAM available for dynamic allocation:
I (571) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (577) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (583) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (589) heap_init: At 3FFCC6C8 len 00013938 (78 KiB): DRAM
I (595) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (602) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (608) heap_init: At 4009D164 len 00002E9C (11 KiB): IRAM
I (614) cpu_start: Pro cpu start user code
I (633) spi_flash: detected chip: generic
I (633) spi_flash: flash io: dio
W (634) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (644) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (750) wifi:wifi driver task: 3ffd0b4c, prio:23, stack:6656, core=0
I (750) system_api: Base MAC address is not set
I (750) system_api: read default base MAC address from EFUSE
I (770) wifi:wifi firmware version: 9f3395e
I (770) wifi:wifi certification version: v7.0
I (770) wifi:config NVS flash: enabled
I (770) wifi:config nano formating: disabled
I (780) wifi:Init data frame dynamic rx buffer num: 32
I (780) wifi:Init management frame dynamic rx buffer num: 32
I (790) wifi:Init management short buffer num: 32
I (790) wifi:Init dynamic tx buffer num: 32
I (800) wifi:Init static rx buffer size: 1600
I (800) wifi:Init static rx buffer num: 10
I (810) wifi:Init dynamic rx buffer num: 32
I (910) phy: phy_version: 4182, f1ba940, Jun 4 2020, 19:40:07, 0, 0
I (920) wifi:mode : sta (a8:03:2a:e6:d3:00)
I (920) BTDM_INIT: BT controller compile version [c293075]
I (1250) BLUFI_EXAMPLE: BD ADDR: a8:03:2a:e6:d3:02

I (1250) BLUFI_EXAMPLE: BLUFI VERSION 0102

I (1250) BLUFI_EXAMPLE: BLUFI init finish

I (5460) BLUFI_EXAMPLE: BLUFI ble connect

D:/ESP32/esp-idf-v4.2/components/freertos/queue.c:1447 (xQueueGenericReceive)- assert failed!

abort() was called at PC 0x40090f2d on core 0
0x40090f2d: xQueueGenericReceive at D:/ESP32/esp-idf-v4.2/components/freertos/queue.c:1447 (discriminator 1)


Backtrace:0x4008db27:0x3ffd6f60 0x4008e1c5:0x3ffd6f80 0x40094ea2:0x3ffd6fa0 0x40090f2d:0x3ffd7010 0x400eef11:0x3ffd7050 0x400f9474:0x3ffd7070 0x400f0a0d:0x3ffd7090 0x400f0894:0x3ffd70d0 0x400f0992:0x3ffd7100 0x400edeba:0x3ffd7120 0x400eefc4:0x3ffd7140 0x4008e1cd:0x3ffd7160

0x4008db27: panic_abort at D:/ESP32/esp-idf-v4.2/components/esp_system/panic.c:330

0x4008e1c5: esp_system_abort at D:/ESP32/esp-idf-v4.2/components/esp_system/system_api.c:106

0x40094ea2: abort at D:/ESP32/esp-idf-v4.2/components/newlib/abort.c:46

0x40090f2d: xQueueGenericReceive at D:/ESP32/esp-idf-v4.2/components/freertos/queue.c:1447 (discriminator 1)

0x400eef11: osi_mutex_lock at D:/ESP32/esp-idf-v4.2/components/bt/common/osi/mutex.c:49

0x400f9474: btc_config_lock at D:/ESP32/esp-idf-v4.2/components/bt/host/bluedroid/btc/core/btc_config.c:333

0x400f0a0d: btc_storage_remove_bonded_device at D:/ESP32/esp-idf-v4.2/components/bt/host/bluedroid/btc/core/btc_storage.c:158

0x400f0894: btc_dm_link_up_evt at D:/ESP32/esp-idf-v4.2/components/bt/host/bluedroid/btc/core/btc_dm.c:315

0x400f0992: btc_dm_sec_cb_handler at D:/ESP32/esp-idf-v4.2/components/bt/host/bluedroid/btc/core/btc_dm.c:702

0x400edeba: btc_thread_handler at D:/ESP32/esp-idf-v4.2/components/bt/common/btc/core/btc_task.c:158

0x400eefc4: osi_thread_run at D:/ESP32/esp-idf-v4.2/components/bt/common/osi/thread.c:68

0x4008e1cd: vPortTaskWrapper at D:/ESP32/esp-idf-v4.2/components/freertos/xtensa/port.c:143



ELF file SHA256: 185322e57a244473

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
load:0x3fff0034,len:7084
load:0x40078000,len:13696
load:0x40080400,len:4000
0x40080400: _init at ??:?
Last edited by 山竹君_kk on Thu Nov 04, 2021 2:29 am, edited 1 time in total.

User avatar
山竹君_kk
Posts: 17
Joined: Mon Nov 01, 2021 2:33 am

Re: 编译V4.2.2例程中的blufi,蓝牙配网出现的问题

Postby 山竹君_kk » Mon Nov 01, 2021 8:22 am

  1. 有没有人回复一下啊 :cry:

ESP_XuLZ
Posts: 173
Joined: Fri Mar 26, 2021 6:04 am

Re: 编译V4.2.2例程中的blufi,蓝牙配网出现的问题

Postby ESP_XuLZ » Tue Nov 02, 2021 2:52 am

你好,根据你所说的commit,我测试时确实发现有同样的问题,但在当前 idf v4.2.2 (commit: 7ab8f79) 上并未发现问题,所以请你更新下IDF,我看你所在的 commit 是2020年6月份的,这一年多的时间内我们肯定进行修复过的了

Who is online

Users browsing this forum: No registered users and 41 guests