espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.37k stars 7.21k forks source link

iBeacon example can not scan beacon signals from others in the receiver mode. (IDFGH-11549) #12670

Closed meko0917 closed 9 months ago

meko0917 commented 9 months ago

Answers checklist.

IDF version.

v5.1.2

Espressif SoC revision.

ESP32

Operating System used.

Windows

How did you build your project?

Command line with Make

If you are using Windows, please specify command line type.

PowerShell

Development Kit.

ESP32-WROOM-32E-N8

Power Supply used.

USB

What is the expected behavior?

I have tested ble_ibeacon example for the first time of using ESP32-WROOM-32E with ESP-IDF v5.1.2 newly installation. I expected the result as described in that example's git page. I (384) boot: Loaded app from partition at offset 0x10000 I (384) boot: Disabling RNG early entropy source... I (385) cpu_start: Pro cpu up.\0x1b[0m I (389) cpu_start: Starting app cpu, entry point is 0x40081010 I (0) cpu_start: App cpu up. I (400) heap_init: Initializing. RAM available for dynamic allocation: I (406) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM I (412) heap_init: At 3FFCCC88 len 00013378 (76 KiB): DRAM I (418) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM I (425) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (431) heap_init: At 40090E58 len 0000F1A8 (60 KiB): IRAM I (437) cpu_start: Pro cpu start user code\0x1b[0m I (120) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (243) BTDM_INIT: BT controller compile version [44d04c1]

I (243) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (633) phy: phy_version: 3910, c0c45a3, May 21 2018, 18:07:06, 0, 0 I (663) IBEACON_DEMO: register callback I (329203) IBEACON_DEMO: ----------iBeacon Found----------

What is the actual behavior?

I (409) boot: Loaded app from partition at offset 0x10000 I (409) boot: Disabling RNG early entropy source... I (420) cpu_start: Multicore app I (420) cpu_start: Pro cpu up. I (421) cpu_start: Starting app cpu, entry point is 0x4008137c 0x4008137c: call_start_cpu1 at C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system/port/cpu_start.c:157

I (0) cpu_start: App cpu up. I (438) cpu_start: Pro cpu start user code I (438) cpu_start: cpu freq: 160000000 Hz I (439) cpu_start: Application information: I (443) cpu_start: Project name: ble_ibeacon_demo I (449) cpu_start: App version: 1 I (453) cpu_start: Compile time: Nov 26 2023 22:37:37 I (459) cpu_start: ELF file SHA256: 48b755f8185c093e... I (465) cpu_start: ESP-IDF: v5.1.2 I (470) cpu_start: Min chip rev: v0.0 I (475) cpu_start: Max chip rev: v3.99 I (480) cpu_start: Chip rev: v3.1 I (485) heap_init: Initializing. RAM available for dynamic allocation: I (492) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM I (498) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM I (504) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM I (510) heap_init: At 3FFC6E88 len 00019178 (100 KiB): DRAM I (516) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (523) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (529) heap_init: At 400987C0 len 00007840 (30 KiB): IRAM I (537) spi_flash: detected chip: gd I (539) spi_flash: flash io: dio I (544) coexist: coex firmware version: b6d5e8c I (549) app_start: Starting scheduler on CPU0 I (554) app_start: Starting scheduler on CPU1 I (554) main_task: Started on CPU0 I (564) main_task: Calling app_main() I (584) BTDM_INIT: BT controller compile version [ec4ac65] I (584) BTDM_INIT: Bluetooth MAC: 64:b7:08:d5:14:46 I (594) phy_init: phy_version 4780,16b31a7,Sep 22 2023,20:42:16 I (984) IBEACON_DEMO: register callback I (984) main_task: Returned from app_main()

Steps to reproduce.

My procedures are belows

  1. idf.py menuconfig (To set receiver..)
  2. idf.py -p COM9 flash monitor

Debug Logs.

PS D:\work\FGC_KWF_br\WiFiBT\ble_ibeacon> idf.py menuconfig
Executing action: menuconfig
Running ninja in directory D:\Work\FGC_KWF_br\WiFiBT\ble_ibeacon\build
Executing "ninja menuconfig"...
[0/1] cmd.exe /C "cd /D D:\Work\FGC_KWF_br\WiFiBT\ble_ibea...ut config D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/sdkconfig"
Loading defaults file D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/sdkconfig.defaults...
C:/Espressif/frameworks/esp-idf-v5.1.2/Kconfig:16: warning: IDF_ENV_FPGA has 'option env="IDF_ENV_FPGA"', but the environment variable IDF_ENV_FPGA is not set
Loaded configuration 'D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/sdkconfig'
Configuration saved to 'D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/sdkconfig'
Loading defaults file D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/sdkconfig.defaults...
PS D:\work\FGC_KWF_br\WiFiBT\ble_ibeacon> idf.py build
Executing action: all (aliases: build)
Running ninja in directory D:\Work\FGC_KWF_br\WiFiBT\ble_ibeacon\build
Executing "ninja all"...
[0/1] Re-running CMake...-- ccache will be used for faster recompilation
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/sdkconfig
Loading defaults file D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/sdkconfig.defaults...
Compiler supported targets: xtensa-esp32-elf

-- App "ble_ibeacon_demo" version: 1
-- Adding linker script D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system/ld/esp32/sections.ld.in
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/soc/esp32/ld/esp32.peripherals.ld
-- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: C:/Espressif/frameworks/esp-idf-v5.1.2/components/app_trace C:/Espressif/frameworks/esp-idf-v5.1.2/components/app_update C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader_support C:/Espressif/frameworks/esp-idf-v5.1.2/components/bt C:/Espressif/frameworks/esp-idf-v5.1.2/components/cmock C:/Espressif/frameworks/esp-idf-v5.1.2/components/console C:/Espressif/frameworks/esp-idf-v5.1.2/components/cxx C:/Espressif/frameworks/esp-idf-v5.1.2/components/driver C:/Espressif/frameworks/esp-idf-v5.1.2/components/efuse C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp-tls C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_adc C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_app_format C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_coex C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_common C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_eth C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_event C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_gdbstub C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_hid C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_http_client C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_http_server C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_https_ota C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_https_server C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_hw_support C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_lcd C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_local_ctrl C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_mm C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_netif C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_netif_stack C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_partition C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_phy C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_pm C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_psram C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_ringbuf C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_timer C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_wifi C:/Espressif/frameworks/esp-idf-v5.1.2/components/espcoredump C:/Espressif/frameworks/esp-idf-v5.1.2/components/esptool_py C:/Espressif/frameworks/esp-idf-v5.1.2/components/fatfs C:/Espressif/frameworks/esp-idf-v5.1.2/components/freertos C:/Espressif/frameworks/esp-idf-v5.1.2/components/hal C:/Espressif/frameworks/esp-idf-v5.1.2/components/heap C:/Espressif/frameworks/esp-idf-v5.1.2/components/http_parser C:/Espressif/frameworks/esp-idf-v5.1.2/components/idf_test C:/Espressif/frameworks/esp-idf-v5.1.2/components/ieee802154 C:/Espressif/frameworks/esp-idf-v5.1.2/components/json C:/Espressif/frameworks/esp-idf-v5.1.2/components/log C:/Espressif/frameworks/esp-idf-v5.1.2/components/lwip D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/main C:/Espressif/frameworks/esp-idf-v5.1.2/components/mbedtls C:/Espressif/frameworks/esp-idf-v5.1.2/components/mqtt C:/Espressif/frameworks/esp-idf-v5.1.2/components/newlib C:/Espressif/frameworks/esp-idf-v5.1.2/components/nvs_flash C:/Espressif/frameworks/esp-idf-v5.1.2/components/openthread C:/Espressif/frameworks/esp-idf-v5.1.2/components/partition_table C:/Espressif/frameworks/esp-idf-v5.1.2/components/perfmon C:/Espressif/frameworks/esp-idf-v5.1.2/components/protobuf-c C:/Espressif/frameworks/esp-idf-v5.1.2/components/protocomm C:/Espressif/frameworks/esp-idf-v5.1.2/components/pthread C:/Espressif/frameworks/esp-idf-v5.1.2/components/sdmmc C:/Espressif/frameworks/esp-idf-v5.1.2/components/soc C:/Espressif/frameworks/esp-idf-v5.1.2/components/spi_flash C:/Espressif/frameworks/esp-idf-v5.1.2/components/spiffs C:/Espressif/frameworks/esp-idf-v5.1.2/components/tcp_transport C:/Espressif/frameworks/esp-idf-v5.1.2/components/ulp C:/Espressif/frameworks/esp-idf-v5.1.2/components/unity C:/Espressif/frameworks/esp-idf-v5.1.2/components/usb C:/Espressif/frameworks/esp-idf-v5.1.2/components/vfs C:/Espressif/frameworks/esp-idf-v5.1.2/components/wear_levelling C:/Espressif/frameworks/esp-idf-v5.1.2/components/wifi_provisioning C:/Espressif/frameworks/esp-idf-v5.1.2/components/wpa_supplicant C:/Espressif/frameworks/esp-idf-v5.1.2/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/build
[0/1] Re-running CMake...-- Building ESP-IDF components for target esp32
-- Project sdkconfig file D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/sdkconfig
Compiler supported targets: xtensa-esp32-elf

-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/soc/esp32/ld/esp32.peripherals.ld
-- App "bootloader" version: v5.1.2
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp_app_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa
-- Component paths: C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader_support C:/Espressif/frameworks/esp-idf-v5.1.2/components/efuse C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_app_format C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_common C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_hw_support C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system C:/Espressif/frameworks/esp-idf-v5.1.2/components/esptool_py C:/Espressif/frameworks/esp-idf-v5.1.2/components/freertos C:/Espressif/frameworks/esp-idf-v5.1.2/components/hal C:/Espressif/frameworks/esp-idf-v5.1.2/components/log C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader/subproject/main C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader/subproject/components/micro-ecc C:/Espressif/frameworks/esp-idf-v5.1.2/components/newlib C:/Espressif/frameworks/esp-idf-v5.1.2/components/partition_table C:/Espressif/frameworks/esp-idf-v5.1.2/components/soc C:/Espressif/frameworks/esp-idf-v5.1.2/components/spi_flash C:/Espressif/frameworks/esp-idf-v5.1.2/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/build/bootloader
[1/1] cmd.exe /C "cd /D D:\Work\FGC_KWF_br\WiFiBT\ble_ibea...KWF_br/WiFiBT/ble_ibeacon/build/bootloader/bootloader.bin"Bootloader binary size 0x6810 bytes. 0x7f0 bytes (7%) free.
[1170/1171] Generating binary image from built executableesptool.py v4.7.dev3
Creating esp32 image...
Merged 27 ELF sections
Successfully created esp32 image.
Generated D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/build/ble_ibeacon_demo.bin
[1171/1171] cmd.exe /C "cd /D D:\Work\FGC_KWF_br\WiFiBT\bl.../FGC_KWF_br/WiFiBT/ble_ibeacon/build/ble_ibeacon_demo.bin"ble_ibeacon_demo.bin binary size 0xbd4c0 bytes. Smallest app partition is 0x100000 bytes. 0x42b40 bytes (26%) free.

Project build complete. To flash, run this command:
C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.1.2\components\esptool_py\esptool\esptool.py -p (PORT) -b 460800 --before default_reset --after hard_reset --chip esp32  write_flash --flash_mode dio --flash_size 8MB --flash_freq 40m 0x1000 build\bootloader\bootloader.bin 0x8000 build\partition_table\partition-table.bin 0x10000 build\ble_ibeacon_demo.bin
or run 'idf.py -p (PORT) flash'
PS D:\work\FGC_KWF_br\WiFiBT\ble_ibeacon> idf.py -p COM9 flash monitor
Executing action: flash
Running ninja in directory D:\Work\FGC_KWF_br\WiFiBT\ble_ibeacon\build
Executing "ninja flash"...
[1/5] cmd.exe /C "cd /D D:\Work\FGC_KWF_br\WiFiBT\ble_ibeacon\build\esp-idf\esptool_py && C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.2/components/partition_table/check_sizes.py --offset 0x8000 partition --type app D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/build/partition_table/partition-table.bin D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/build/ble_ibeacon_demo.bin"
ble_ibeacon_demo.bin binary size 0xbd4c0 bytes. Smallest app partition is 0x100000 bytes. 0x42b40 bytes (26%) free.
[2/5] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D D:\Work\FGC_KWF_br\WiFiBT\ble_ibeacon\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.2/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/build/bootloader/bootloader.bin"
Bootloader binary size 0x6810 bytes. 0x7f0 bytes (7%) free.
[2/3] cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.1.2\components\esptool_py && C:\Espressif\tools\cmake\3.24.0\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-v5.1.2 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.1_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.1.2/components/esptool_py/esptool/esptool.py;--chip;esp32 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=D:/Work/FGC_KWF_br/WiFiBT/ble_ibeacon/build -P C:/Espressif/frameworks/esp-idf-v5.1.2/components/esptool_py/run_serial_tool.cmake"
esptool.py --chip esp32 -p COM9 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 8MB 0x1000 bootloader/bootloader.bin 0x10000 ble_ibeacon_demo.bin 0x8000 partition_table/partition-table.bin
esptool.py v4.7.dev3
Serial port COM9
Connecting....
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 64:b7:08:d5:14:44
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x000cdfff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 26640 bytes to 16685...
Writing at 0x00001000... (50 %)
Writing at 0x0000768e... (100 %)
Wrote 26640 bytes (16685 compressed) at 0x00001000 in 0.7 seconds (effective 311.1 kbit/s)...
Hash of data verified.
Compressed 775360 bytes to 461541...
Writing at 0x00010000... (3 %)
Writing at 0x0001db43... (6 %)
Writing at 0x0002a172... (10 %)
Writing at 0x00033454... (13 %)
Writing at 0x00038f18... (17 %)
Writing at 0x0003e78f... (20 %)
Writing at 0x00043e13... (24 %)
Writing at 0x00049831... (27 %)
Writing at 0x0004ee09... (31 %)
Writing at 0x0005547e... (34 %)
Writing at 0x0005b1aa... (37 %)
Writing at 0x00061189... (41 %)
Writing at 0x00066f49... (44 %)
Writing at 0x0006ccd9... (48 %)
Writing at 0x00072a48... (51 %)
Writing at 0x00078b71... (55 %)
Writing at 0x0007e7e7... (58 %)
Writing at 0x00084b6e... (62 %)
Writing at 0x0008a9ee... (65 %)
Writing at 0x00090466... (68 %)
Writing at 0x00095f80... (72 %)
Writing at 0x0009c28e... (75 %)
Writing at 0x000a4422... (79 %)
Writing at 0x000ac870... (82 %)
Writing at 0x000b5864... (86 %)
Writing at 0x000baf1e... (89 %)
Writing at 0x000c0ca0... (93 %)
Writing at 0x000c6583... (96 %)
Writing at 0x000cc330... (100 %)
Wrote 775360 bytes (461541 compressed) at 0x00010000 in 11.1 seconds (effective 557.6 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (effective 398.7 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Executing action: monitor
Running idf_monitor in directory D:\Work\FGC_KWF_br\WiFiBT\ble_ibeacon
Executing "C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.1.2\tools/idf_monitor.py -p COM9 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 --revision 0 D:\Work\FGC_KWF_br\WiFiBT\ble_ibeacon\build\ble_ibeacon_demo.elf --force-color -m 'C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe' 'C:\Espressif\frameworks\esp-idf-v5.1.2\tools\idf.py' '-p' 'COM9'"...
--- WARNING: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM9 instead...
--- esp-idf-monitor 1.3.3 on \\.\COM9 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jul 29 2019 12:21:46

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:7080
load:0x40078000,len:15584
load:0x40080400,len:4
0x40080400: _init at ??:?

ho 8 tail 4 room 4
load:0x40080404,len:3876
entry 0x4008064c
I (31) boot: ESP-IDF v5.1.2 2nd stage bootloader
I (31) boot: compile time Nov 26 2023 22:02:37
I (31) boot: Multicore bootloader
I (35) boot: chip revision: v3.1
I (39) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (48) boot.esp32: SPI Flash Size : 8MB
I (53) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (96) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=1fd94h (130452) map
I (151) esp_image: segment 1: paddr=0002fdbc vaddr=3ffbdb60 size=0025ch (   604) load
I (152) esp_image: segment 2: paddr=00030020 vaddr=400d0020 size=80718h (526104) map
I (347) esp_image: segment 3: paddr=000b0740 vaddr=3ffbddbc size=04594h ( 17812) load
I (354) esp_image: segment 4: paddr=000b4cdc vaddr=40080000 size=187c0h (100288) load
I (409) boot: Loaded app from partition at offset 0x10000
I (409) boot: Disabling RNG early entropy source...
I (420) cpu_start: Multicore app
I (420) cpu_start: Pro cpu up.
I (421) cpu_start: Starting app cpu, entry point is 0x4008137c
0x4008137c: call_start_cpu1 at C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system/port/cpu_start.c:157

I (0) cpu_start: App cpu up.
I (438) cpu_start: Pro cpu start user code
I (438) cpu_start: cpu freq: 160000000 Hz
I (439) cpu_start: Application information:
I (443) cpu_start: Project name:     ble_ibeacon_demo
I (449) cpu_start: App version:      1
I (453) cpu_start: Compile time:     Nov 26 2023 22:37:37
I (459) cpu_start: ELF file SHA256:  48b755f8185c093e...
I (465) cpu_start: ESP-IDF:          v5.1.2
I (470) cpu_start: Min chip rev:     v0.0
I (475) cpu_start: Max chip rev:     v3.99
I (480) cpu_start: Chip rev:         v3.1
I (485) heap_init: Initializing. RAM available for dynamic allocation:
I (492) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (498) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (504) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (510) heap_init: At 3FFC6E88 len 00019178 (100 KiB): DRAM
I (516) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (523) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (529) heap_init: At 400987C0 len 00007840 (30 KiB): IRAM
I (537) spi_flash: detected chip: gd
I (539) spi_flash: flash io: dio
I (544) coexist: coex firmware version: b6d5e8c
I (549) app_start: Starting scheduler on CPU0
I (554) app_start: Starting scheduler on CPU1
I (554) main_task: Started on CPU0
I (564) main_task: Calling app_main()
I (584) BTDM_INIT: BT controller compile version [ec4ac65]
I (584) BTDM_INIT: Bluetooth MAC: 64:b7:08:d5:14:46
I (594) phy_init: phy_version 4780,16b31a7,Sep 22 2023,20:42:16
I (984) IBEACON_DEMO: register callback
I (984) main_task: Returned from app_main()

More Information.

No response

esp-zhp commented 9 months ago

Thank you for reporting the issue; I will check it.

esp-zhp commented 9 months ago

I tested using the version you provided, with one instance in the sender role and another in the receiver role. In the sender role, the sender calls the esp_ble_gap_start_advertising API for broadcasting, while in the receiver role, it uses the esp_ble_gap_start_scanning API for scanning.

The test results indicate that the receiver successfully received the data, which is as expected.

Could you please check if there is no sender role nearby on your end?

image

log: I (31) boot: ESP-IDF v5.1.1-700-ge20f68d773-dirty 2nd stage bootloader I (31) boot: compile time Nov 28 2023 16:25:29 I (33) boot: Multicore bootloader I (37) boot: chip revision: v3.1 I (41) boot.esp32: SPI Speed : 40MHz I (46) boot.esp32: SPI Mode : DIO I (50) boot.esp32: SPI Flash Size : 2MB I (55) boot: Enabling RNG early entropy source... I (60) boot: Partition Table: I (64) boot: ## Label Usage Type ST Offset Length I (71) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (79) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (86) boot: 2 factory factory app 00 00 00010000 00100000 I (94) boot: End of partition table I (98) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=1fd74h (130420) map I (153) esp_image: segment 1: paddr=0002fd9c vaddr=3ffbdb60 size=0027ch ( 636) load I (154) esp_image: segment 2: paddr=00030020 vaddr=400d0020 size=80700h (526080) map I (349) esp_image: segment 3: paddr=000b0728 vaddr=3ffbdddc size=045b0h ( 17840) load I (356) esp_image: segment 4: paddr=000b4ce0 vaddr=40080000 size=187c0h (100288) load I (411) boot: Loaded app from partition at offset 0x10000 I (411) boot: Disabling RNG early entropy source... I (422) cpu_start: Multicore app I (422) cpu_start: Pro cpu up. I (423) cpu_start: Starting app cpu, entry point is 0x4008137c 0x4008137c: call_start_cpu1 at /home/zhanghaipeng/esp/esp-idf/components/esp_system/port/cpu_start.c:157

I (0) cpu_start: App cpu up. I (440) cpu_start: Pro cpu start user code I (440) cpu_start: cpu freq: 160000000 Hz I (440) cpu_start: Application information: I (445) cpu_start: Project name: ble_ibeacon_demo I (451) cpu_start: App version: qa-test-v5.1.2-20231020-22-ge20 I (458) cpu_start: Compile time: Nov 28 2023 16:25:27 I (464) cpu_start: ELF file SHA256: f09aa1e1fdb083e1... I (470) cpu_start: ESP-IDF: v5.1.1-700-ge20f68d773-dirty I (477) cpu_start: Min chip rev: v0.0 I (481) cpu_start: Max chip rev: v3.99 I (486) cpu_start: Chip rev: v3.1 I (491) heap_init: Initializing. RAM available for dynamic allocation: I (498) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM I (504) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM I (510) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM I (517) heap_init: At 3FFC6EC8 len 00019138 (100 KiB): DRAM I (523) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (529) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (536) heap_init: At 400987C0 len 00007840 (30 KiB): IRAM I (543) spi_flash: detected chip: generic I (546) spi_flash: flash io: dio W (550) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header. I (564) coexist: coex firmware version: b6d5e8c I (569) app_start: Starting scheduler on CPU0 I (574) app_start: Starting scheduler on CPU1 mI (574) main_task: Started on CPU0 I (584) main_task: Calling app_main() I (604) BTDM_INIT: BT controller compile version [ec4ac65] I (604) BTDM_INIT: Bluetooth MAC: 08:3a:8d:0d:9c:62 I (604) phy_init: phy_version 4780,16b31a7,Sep 22 2023,20:42:16 W (614) phy_init: failed to load RF calibration data (0xffffffff), falling back to full calibration I (994) IBEACON_DEMO: register callback I (994) main_task: Returned from app_main() I (1044) IBEACON_DEMO: ----------iBeacon Found---------- I (1044) IBEACON_DEMO: Device address:: 30 ae a4 80 56 0e I (1044) IBEACON_DEMO: Proximity UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 I (1054) IBEACON_DEMO: Major: 0x27b7 (10167) I (1054) IBEACON_DEMO: Minor: 0xf206 (61958) I (1064) IBEACON_DEMO: Measured power (RSSI at a 1m distance):-59 dbm I (1064) IBEACON_DEMO: RSSI of packet:-19 dbm I (1094) IBEACON_DEMO: ----------iBeacon Found---------- I (1094) IBEACON_DEMO: Device address:: 30 ae a4 80 56 0e I (1094) IBEACON_DEMO: Proximity UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 I (1104) IBEACON_DEMO: Major: 0x27b7 (10167) I (1104) IBEACON_DEMO: Minor: 0xf206 (61958) I (1104) IBEACON_DEMO: Measured power (RSSI at a 1m distance):-59 dbm I (1114) IBEACON_DEMO: RSSI of packet:-19 dbm I (1144) IBEACON_DEMO: ----------iBeacon Found---------- I (1144) IBEACON_DEMO: Device address:: 30 ae a4 80 56 0e I (1144) IBEACON_DEMO: Proximity UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 I (1154) IBEACON_DEMO: Major: 0x27b7 (10167) I (1154) IBEACON_DEMO: Minor: 0xf206 (61958) I (1154) IBEACON_DEMO: Measured power (RSSI at a 1m distance):-59 dbm I (1164) IBEACON_DEMO: RSSI of packet:-14 dbm I (1184) IBEACON_DEMO: ----------iBeacon Found---------- I (1194) IBEACON_DEMO: Device address:: 30 ae a4 80 56 0e I (1194) IBEACON_DEMO: Proximity UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 I (1204) IBEACON_DEMO: Major: 0x27b7 (10167) I (1204) IBEACON_DEMO: Minor: 0xf206 (61958) I (1204) IBEACON_DEMO: Measured power (RSSI at a 1m distance):-59 dbm I (1214) IBEACON_DEMO: RSSI of packet:-19 dbm I (1244) IBEACON_DEMO: ----------iBeacon Found---------- I (1244) IBEACON_DEMO: Device address:: 30 ae a4 80 56 0e I (1244) IBEACON_DEMO: Proximity UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 I (1254) IBEACON_DEMO: Major: 0x27b7 (10167) I (1254) IBEACON_DEMO: Minor: 0xf206 (61958) I (1254) IBEACON_DEMO: Measured power (RSSI at a 1m distance):-59 dbm I (1264) IBEACON_DEMO: RSSI of packet:-19 dbm I (1284) IBEACON_DEMO: ----------iBeacon Found---------- I (1294) IBEACON_DEMO: Device address:: 30 ae a4 80 56 0e I (1294) IBEACON_DEMO: Proximity UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 I (1304) IBEACON_DEMO: Major: 0x27b7 (10167) I (1304) IBEACON_DEMO: Minor: 0xf206 (61958) I (1304) IBEACON_DEMO: Measured power (RSSI at a 1m distance):-59 dbm I (1314) IBEACON_DEMO: RSSI of packet:-15 dbm I (1344) IBEACON_DEMO: ----------iBeacon Found---------- I (1344) IBEACON_DEMO: Device address:: 30 ae a4 80 56 0e I (1344) IBEACON_DEMO: Proximity UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 I (1354) IBEACON_DEMO: Major: 0x27b7 (10167) I (1354) IBEACON_DEMO: Minor: 0xf206 (61958) I (1354) IBEACON_DEMO: Measured power (RSSI at a 1m distance):-59 dbm I (1364) IBEACON_DEMO: RSSI of packet:-19 dbm I (1644) IBEACON_DEMO: ----------iBeacon Found---------- I (1644) IBEACON_DEMO: Device address:: 30 ae a4 80 56 0e I (1644) IBEACON_DEMO: Proximity UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 I (1654) IBEACON_DEMO: Major: 0x27b7 (10167) I (1654) IBEACON_DEMO: Minor: 0xf206 (61958) I (1664) IBEACON_DEMO: Measured power (RSSI at a 1m distance):-59 dbm I (1664) IBEACON_DEMO: RSSI of packet:-19 dbm I (1694) IBEACON_DEMO: ----------iBeacon Found---------- I (1694) IBEACON_DEMO: Device address:: 30 ae a4 80 56 0e I (1694) IBEACON_DEMO: Proximity UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 I (1704) IBEACON_DEMO: Major: 0x27b7 (10167) I (1704) IBEACON_DEMO: Minor: 0xf206 (61958) I (1714) IBEACON_DEMO: Measured power (RSSI at a 1m distance):-59 dbm I (1714) IBEACON_DEMO: RSSI of packet:-19 dbm I (1744) IBEACON_DEMO: ----------iBeacon Found---------- I (1744) IBEACON_DEMO: Device address:: 30 ae a4 80 56 0e I (1744) IBEACON_DEMO: Proximity UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 I (1754) IBEACON_DEMO: Major: 0x27b7 (10167) I (1754) IBEACON_DEMO: Minor: 0xf206 (61958) I (1754) IBEACON_DEMO: Measured power (RSSI at a 1m distance):-59 dbm I (1764) IBEACON_DEMO: RSSI of packet:-14 dbm I (1794) IBEACON_DEMO: ----------iBeacon Found---------- I (1794) IBEACON_DEMO: Device address:: 30 ae a4 80 56 0e I (1794) IBEACON_DEMO: Proximity UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 I (1804) IBEACON_DEMO: Major: 0x27b7 (10167) I (1804) IBEACON_DEMO: Minor: 0xf206 (61958) I (1804) IBEACON_DEMO: Measured power (RSSI at a 1m distance):-59 dbm I (1814) IBEACON_DEMO: RSSI of packet:-19 dbm I (1844) IBEACON_DEMO: ----------iBeacon Found---------- I (1844) IBEACON_DEMO: Device address:: 30 ae a4 80 56 0e I (1844) IBEACON_DEMO: Proximity UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 I (1854) IBEACON_DEMO: Major: 0x27b7 (10167) I (1854) IBEACON_DEMO: Minor: 0xf206 (61958) I (1854) IBEACON_DEMO: Measured power (RSSI at a 1m distance):-59 dbm I (1864) IBEACON_DEMO: RSSI of packet:-19 dbm I (1894) IBEACON_DEMO: ----------iBeacon Found----------

meko0917 commented 9 months ago

I tested again on the other PC, the result is same as yours. I guess It was the problem by the PC environment. Sorry and thanks.

Alvin1Zhang commented 9 months ago

Thanks for reporting, feel free to reopen.