espressif / esp-idf

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

ble_mesh_server/client example failed (IDFGH-2788) #4851

Closed sheldon123z closed 4 years ago

sheldon123z commented 4 years ago

Environment

Problem Description

Hi, I am using ESP32 DevKitC to test the ble_mesh_server/client examples, everything looks like going well after I flashed the example into the board. However, I couldn't use my phone to detect the board in either the nRF Mesh application or the ESP-BLE-Prov application. When I use the cmd to monitor the board status, I found the board is rebooting all the time, and the log information is like below:

Debug Logs

C:\Users\zheng\Desktop\esp-idf\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_server>idf.py build
Executing action: all (aliases: build)
Running cmake in directory c:\users\zheng\desktop\esp-idf\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_server\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 --warn-uninitialized -DCCACHE_ENABLE=1 c:\users\zheng\desktop\esp-idf\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_server"...
Warn about uninitialized values.
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.25.1.windows.1")
-- IDF_TARGET not set, using default target: esp32
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/zheng/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/zheng/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/zheng/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Users/zheng/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe
-- Check for working CXX compiler: C:/Users/zheng/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
Loading defaults file C:/Users/zheng/Desktop/esp-idf/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/sdkconfig.defaults...
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs-time.ld
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Found PythonInterp: C:/Users/zheng/.espressif/python_env/idf4.2_py3.6_env/Scripts/python.exe (found version "3.6.5")
-- Could NOT find Perl (missing: PERL_EXECUTABLE)
-- App "onoff_server" version: v4.2-dev-459-ge36516372
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/components/esp32/ld/esp32.project.ld.in
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Components: app_trace app_update asio bootloader bootloader_support bt cbor coap console cxx driver efuse esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_http_client esp_http_server esp_https_ota esp_https_server esp_local_ctrl esp_netif esp_ringbuf esp_rom esp_serial_slave_link esp_timer esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos heap idf_test jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter ulp unity vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: C:/Users/zheng/Desktop/esp-idf/components/app_trace C:/Users/zheng/Desktop/esp-idf/components/app_update C:/Users/zheng/Desktop/esp-idf/components/asio C:/Users/zheng/Desktop/esp-idf/components/bootloader C:/Users/zheng/Desktop/esp-idf/components/bootloader_support C:/Users/zheng/Desktop/esp-idf/components/bt C:/Users/zheng/Desktop/esp-idf/components/cbor C:/Users/zheng/Desktop/esp-idf/components/coap C:/Users/zheng/Desktop/esp-idf/components/console C:/Users/zheng/Desktop/esp-idf/components/cxx C:/Users/zheng/Desktop/esp-idf/components/driver C:/Users/zheng/Desktop/esp-idf/components/efuse C:/Users/zheng/Desktop/esp-idf/components/esp-tls C:/Users/zheng/Desktop/esp-idf/components/esp32 C:/Users/zheng/Desktop/esp-idf/components/esp_adc_cal C:/Users/zheng/Desktop/esp-idf/components/esp_common C:/Users/zheng/Desktop/esp-idf/components/esp_eth C:/Users/zheng/Desktop/esp-idf/components/esp_event C:/Users/zheng/Desktop/esp-idf/components/esp_gdbstub C:/Users/zheng/Desktop/esp-idf/components/esp_http_client C:/Users/zheng/Desktop/esp-idf/components/esp_http_server C:/Users/zheng/Desktop/esp-idf/components/esp_https_ota C:/Users/zheng/Desktop/esp-idf/components/esp_https_server C:/Users/zheng/Desktop/esp-idf/components/esp_local_ctrl C:/Users/zheng/Desktop/esp-idf/components/esp_netif C:/Users/zheng/Desktop/esp-idf/components/esp_ringbuf C:/Users/zheng/Desktop/esp-idf/components/esp_rom C:/Users/zheng/Desktop/esp-idf/components/esp_serial_slave_link C:/Users/zheng/Desktop/esp-idf/components/esp_timer C:/Users/zheng/Desktop/esp-idf/components/esp_websocket_client C:/Users/zheng/Desktop/esp-idf/components/esp_wifi C:/Users/zheng/Desktop/esp-idf/components/espcoredump C:/Users/zheng/Desktop/esp-idf/components/esptool_py C:/Users/zheng/Desktop/esp-idf/components/expat C:/Users/zheng/Desktop/esp-idf/components/fatfs C:/Users/zheng/Desktop/esp-idf/components/freemodbus C:/Users/zheng/Desktop/esp-idf/components/freertos C:/Users/zheng/Desktop/esp-idf/components/heap C:/Users/zheng/Desktop/esp-idf/components/idf_test C:/Users/zheng/Desktop/esp-idf/components/jsmn C:/Users/zheng/Desktop/esp-idf/components/json C:/Users/zheng/Desktop/esp-idf/components/libsodium C:/Users/zheng/Desktop/esp-idf/components/log C:/Users/zheng/Desktop/esp-idf/components/lwip C:/Users/zheng/Desktop/esp-idf/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/main C:/Users/zheng/Desktop/esp-idf/components/mbedtls C:/Users/zheng/Desktop/esp-idf/components/mdns C:/Users/zheng/Desktop/esp-idf/components/mqtt C:/Users/zheng/Desktop/esp-idf/components/newlib C:/Users/zheng/Desktop/esp-idf/components/nghttp C:/Users/zheng/Desktop/esp-idf/components/nvs_flash C:/Users/zheng/Desktop/esp-idf/components/openssl C:/Users/zheng/Desktop/esp-idf/components/partition_table C:/Users/zheng/Desktop/esp-idf/components/perfmon C:/Users/zheng/Desktop/esp-idf/components/protobuf-c C:/Users/zheng/Desktop/esp-idf/components/protocomm C:/Users/zheng/Desktop/esp-idf/components/pthread C:/Users/zheng/Desktop/esp-idf/components/sdmmc C:/Users/zheng/Desktop/esp-idf/components/soc C:/Users/zheng/Desktop/esp-idf/components/spi_flash C:/Users/zheng/Desktop/esp-idf/components/spiffs C:/Users/zheng/Desktop/esp-idf/components/tcp_transport C:/Users/zheng/Desktop/esp-idf/components/tcpip_adapter C:/Users/zheng/Desktop/esp-idf/components/ulp C:/Users/zheng/Desktop/esp-idf/components/unity C:/Users/zheng/Desktop/esp-idf/components/vfs C:/Users/zheng/Desktop/esp-idf/components/wear_levelling C:/Users/zheng/Desktop/esp-idf/components/wifi_provisioning C:/Users/zheng/Desktop/esp-idf/components/wpa_supplicant C:/Users/zheng/Desktop/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/zheng/Desktop/esp-idf/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/build
Running ninja in directory c:\users\zheng\desktop\esp-idf\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_server\build
Executing "ninja all"...
[327/1233] Performing configure step for 'bootloader'
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.25.1.windows.1")
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/zheng/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/zheng/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/zheng/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Users/zheng/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe
-- Check for working CXX compiler: C:/Users/zheng/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script C:/Users/zheng/Desktop/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp32 esp_common esp_rom esptool_py log main micro-ecc partition_table soc spi_flash xtensa
-- Component paths: C:/Users/zheng/Desktop/esp-idf/components/bootloader C:/Users/zheng/Desktop/esp-idf/components/bootloader_support C:/Users/zheng/Desktop/esp-idf/components/efuse C:/Users/zheng/Desktop/esp-idf/components/esp32 C:/Users/zheng/Desktop/esp-idf/components/esp_common C:/Users/zheng/Desktop/esp-idf/components/esp_rom C:/Users/zheng/Desktop/esp-idf/components/esptool_py C:/Users/zheng/Desktop/esp-idf/components/log C:/Users/zheng/Desktop/esp-idf/components/bootloader/subproject/main C:/Users/zheng/Desktop/esp-idf/components/bootloader/subproject/components/micro-ecc C:/Users/zheng/Desktop/esp-idf/components/partition_table C:/Users/zheng/Desktop/esp-idf/components/soc C:/Users/zheng/Desktop/esp-idf/components/spi_flash C:/Users/zheng/Desktop/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/zheng/Desktop/esp-idf/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/build/bootloader
[381/1233] Performing build step for 'bootloader'
[1/97] Generating project_elf_src.c
[2/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/lldesc.c.obj
[3/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/rmt_hal.c.obj
[4/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/memory_layout_utils.c.obj
[5/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/adc_hal.c.obj
[6/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/rtc_io_hal.c.obj
[7/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/dac_hal.c.obj
[8/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/i2c_hal.c.obj
[9/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_slave_hal.c.obj
[10/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_hal.c.obj
[11/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_hal_iram.c.obj
[12/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_slave_hal_iram.c.obj
[13/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/soc_include_legacy_warn.c.obj
[14/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/touch_sensor_hal.c.obj
[15/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/ledc_hal_iram.c.obj
[16/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/sigmadelta_hal.c.obj
[17/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/timer_hal.c.obj
[18/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/pcnt_hal.c.obj
[19/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/i2s_hal.c.obj
[20/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/ledc_hal.c.obj
[21/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_flash_hal.c.obj
[22/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/i2c_hal_iram.c.obj
[23/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/uart_hal.c.obj
[24/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/uart_hal_iram.c.obj
[25/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/gpio_hal.c.obj
[26/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/compare_set.c.obj
[27/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_flash_hal_iram.c.obj
[28/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/brownout_hal.c.obj
[29/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/mcpwm_hal.c.obj
[30/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/can_hal.c.obj
[31/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/cpu_util.c.obj
[32/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/sdio_slave_hal.c.obj
[33/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/rtc_clk.c.obj
[34/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/rtc_clk_init.c.obj
[35/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/rtc_time.c.obj
[36/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/rtc_sleep.c.obj
[37/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/rtc_pm.c.obj
[38/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/soc_memory_layout.c.obj
[39/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/rtc_wdt.c.obj
[40/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/rtc_init.c.obj
[41/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/touch_sensor_hal.c.obj
[42/97] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/dac_periph.c.obj
[43/97] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/adc_periph.c.obj
[44/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/sdio_slave_hal.c.obj
[45/97] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/rtc_io_periph.c.obj
[46/97] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/rtc_periph.c.obj
[47/97] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/gpio_periph.c.obj
[48/97] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/sdio_slave_periph.c.obj
[49/97] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/spi_periph.c.obj
[50/97] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/sdmmc_periph.c.obj
[51/97] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/ledc_periph.c.obj
[52/97] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/interrupts.c.obj
[53/97] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/i2c_periph.c.obj
[54/97] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/uart_periph.c.obj
[55/97] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/i2s_periph.c.obj
[56/97] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/touch_sensor_periph.c.obj
[57/97] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_noos.c.obj
[58/97] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log.c.obj
[59/97] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_buffers.c.obj
[60/97] Building C object esp-idf/spi_flash/CMakeFiles/__idf_spi_flash.dir/esp32/spi_flash_rom_patch.c.obj
[61/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_table.c.obj
[62/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp32/esp_efuse_api.c.obj
[63/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp32/esp_efuse_fields.c.obj
[64/97] Building C object esp-idf/micro-ecc/CMakeFiles/__idf_micro-ecc.dir/micro-ecc/uECC.c.obj
[65/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp32/esp_efuse_utility.c.obj
[66/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_api.c.obj
[67/97] Building C object CMakeFiles/bootloader.elf.dir/project_elf_src.c.obj
[68/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_flash.c.obj
[69/97] Linking C static library esp-idf\log\liblog.a
[70/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common.c.obj
[71/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_utility.c.obj
[72/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_utility.c.obj
[73/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random.c.obj
[74/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp_image_format.c.obj
[75/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_fields.c.obj
[76/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_efuse_esp32.c.obj
[77/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock.c.obj
[78/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_flash_config_esp32.c.obj
[79/97] Linking C static library esp-idf\soc\soc\esp32\libsoc_esp32.a
[80/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_qio_mode.c.obj
[81/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_partitions.c.obj
[82/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_sha.c.obj
[83/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/secure_boot_signatures.c.obj
[84/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/flash_encrypt.c.obj
[85/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_init.c.obj
[86/97] Linking C static library esp-idf\soc\libsoc.a
[87/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_encrypt.c.obj
[88/97] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/bootloader_start.c.obj
[89/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/secure_boot.c.obj
[90/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_esp32.c.obj
[91/97] Linking C static library esp-idf\micro-ecc\libmicro-ecc.a
[92/97] Linking C static library esp-idf\bootloader_support\libbootloader_support.a
[93/97] Linking C static library esp-idf\efuse\libefuse.a
[94/97] Linking C static library esp-idf\spi_flash\libspi_flash.a
[95/97] Linking C static library esp-idf\main\libmain.a
[96/97] Linking C executable bootloader.elf
[97/97] Generating binary image from built executable
esptool.py v3.0-dev
Generated C:/Users/zheng/Desktop/esp-idf/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/build/bootloader/bootloader.bin
[1233/1233] Generating binary image from built executable
esptool.py v3.0-dev
Generated C:/Users/zheng/Desktop/esp-idf/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/build/onoff_server.bin

Project build complete. To flash, run this command:
C:\Users\zheng\.espressif\python_env\idf4.2_py3.6_env\Scripts\python.exe ..\..\..\..\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 detect --flash_freq 40m 0x1000 build\bootloader\bootloader.bin 0x8000 build\partition_table\partition-table.bin 0x10000 build\onoff_server.bin
or run 'idf.py -p (PORT) flash'

C:\Users\zheng\Desktop\esp-idf\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_server>idf.py -p COM3 flash
Adding "flash"'s dependency "all" to list of commands with default set of options.
Executing action: all (aliases: build)
Running ninja in directory c:\users\zheng\desktop\esp-idf\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_server\build
Executing "ninja all"...
[1/3] Performing build step for 'bootloader'
ninja: no work to do.
Executing action: flash
Running ninja in directory c:\users\zheng\desktop\esp-idf\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_server\build
Executing "ninja flash"...
[1/4] Performing build step for 'bootloader'
ninja: no work to do.
[1/2] cmd.exe /C "cd /D C:\Users\zheng\Desktop\esp-idf\components\esp.../Users/zheng/Desktop/esp-idf/components/esptool_py/run_esptool.cmake"
esptool.py --chip esp32 -p COM3 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 onoff_server.bin
esptool.py v3.0-dev
Serial port COM3
Connecting.....
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 3c:71:bf:e0:91:cc
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Compressed 3072 bytes to 103...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 3520.3 kbit/s)...
Hash of data verified.
Compressed 26096 bytes to 15415...
Writing at 0x00001000... (100 %)
Wrote 26096 bytes (15415 compressed) at 0x00001000 in 0.4 seconds (effective 546.5 kbit/s)...
Hash of data verified.
Compressed 917840 bytes to 525974...
Writing at 0x00010000... (3 %)
Writing at 0x00014000... (6 %)
Writing at 0x00018000... (9 %)
Writing at 0x0001c000... (12 %)
Writing at 0x00020000... (15 %)
Writing at 0x00024000... (18 %)
Writing at 0x00028000... (21 %)
Writing at 0x0002c000... (24 %)
Writing at 0x00030000... (27 %)
Writing at 0x00034000... (30 %)
Writing at 0x00038000... (33 %)
Writing at 0x0003c000... (36 %)
Writing at 0x00040000... (39 %)
Writing at 0x00044000... (42 %)
Writing at 0x00048000... (45 %)
Writing at 0x0004c000... (48 %)
Writing at 0x00050000... (51 %)
Writing at 0x00054000... (54 %)
Writing at 0x00058000... (57 %)
Writing at 0x0005c000... (60 %)
Writing at 0x00060000... (63 %)
Writing at 0x00064000... (66 %)
Writing at 0x00068000... (69 %)
Writing at 0x0006c000... (72 %)
Writing at 0x00070000... (75 %)
Writing at 0x00074000... (78 %)
Writing at 0x00078000... (81 %)
Writing at 0x0007c000... (84 %)
Writing at 0x00080000... (87 %)
Writing at 0x00084000... (90 %)
Writing at 0x00088000... (93 %)
Writing at 0x0008c000... (96 %)
Writing at 0x00090000... (100 %)
Wrote 917840 bytes (525974 compressed) at 0x00010000 in 13.1 seconds (effective 559.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Done

C:\Users\zheng\Desktop\esp-idf\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_server>idf.py monitor
Executing action: monitor
Choosing default port b'COM3' (use '-p PORT' option to set a specific serial port)
Running idf_monitor in directory c:\users\zheng\desktop\esp-idf\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_server
Executing "C:\Users\zheng\.espressif\python_env\idf4.2_py3.6_env\Scripts\python.exe C:\Users\zheng\Desktop\esp-idf\tools/idf_monitor.py -p COM3 -b 115200 --toolchain-prefix xtensa-esp32-elf- c:\users\zheng\desktop\esp-idf\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_server\build\onoff_server.elf -m 'C:\Users\zheng\.espressif\python_env\idf4.2_py3.6_env\Scripts\python.exe' 'C:\Users\zheng\Desktop\esp-idf\tools\idf.py'"...
--- WARNING: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM3 instead...
--- idf_monitor on \\.\COM3 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun  8 2016 00:22:57

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:7192
load:0x40078000,len:14352
ho 0 tail 12 room 4
load:0x40080400,len:4448
0x40080400: _init at ??:?

entry 0x400806f0
I (30) boot: ESP-IDF v4.2-dev-459-ge36516372 2nd stage bootloader
I (30) boot: compile time 14:19:56
I (30) boot: chip revision: 1
I (34) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (42) boot.esp32: SPI Speed      : 40MHz
I (46) boot.esp32: SPI Mode       : DIO
I (51) boot.esp32: SPI Flash Size : 2MB
I (55) boot: Enabling RNG early entropy source...
I (61) boot: Partition Table:
I (64) boot: ## Label            Usage          Type ST Offset   Length
I (72) 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) boot_comm: chip revision: 1, min. application chip revision: 0
I (105) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x2b3dc (177116) map
I (178) esp_image: segment 1: paddr=0x0003b404 vaddr=0x3ffbdb60 size=0x03988 ( 14728) load
I (184) esp_image: segment 2: paddr=0x0003ed94 vaddr=0x40080000 size=0x00404 (  1028) load
0x40080000: _WindowOverflow4 at C:/Users/zheng/Desktop/esp-idf/components/freertos/xtensa/xtensa_vectors.S:1817

I (185) esp_image: segment 3: paddr=0x0003f1a0 vaddr=0x40080404 size=0x00e78 (  3704) load
I (195) esp_image: segment 4: paddr=0x00040020 vaddr=0x400d0020 size=0x9e64c (648780) map
0x400d0020: _stext at ??:?

I (437) esp_image: segment 5: paddr=0x000de674 vaddr=0x4008127c size=0x11ab4 ( 72372) load
0x4008127c: call_start_cpu1 at C:/Users/zheng/Desktop/esp-idf/components/esp32/cpu_start.c:275

I (479) boot: Loaded app from partition at offset 0x10000
I (480) boot: Disabling RNG early entropy source...
I (480) cpu_start: Pro cpu up.
I (484) cpu_start: Application information:
I (488) cpu_start: Project name:     onoff_server
I (494) cpu_start: App version:      v4.2-dev-459-ge36516372
I (500) cpu_start: Compile time:     Feb 27 2020 14:18:18
I (506) cpu_start: ELF file SHA256:  540c86f66dc1a5bd...
I (512) cpu_start: ESP-IDF:          v4.2-dev-459-ge36516372
I (519) cpu_start: Starting app cpu, entry point is 0x40081278
0x40081278: call_start_cpu1 at C:/Users/zheng/Desktop/esp-idf/components/esp32/cpu_start.c:274

I (0) cpu_start: App cpu up.
I (529) heap_init: Initializing. RAM available for dynamic allocation:
I (536) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (542) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (548) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (554) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM
I (560) heap_init: At 3FFCAAA0 len 00015560 (85 KiB): DRAM
I (566) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (573) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (579) heap_init: At 40092D30 len 0000D2D0 (52 KiB): IRAM
I (585) cpu_start: Pro cpu start user code
I (604) spi_flash: detected chip: generic
I (604) spi_flash: flash io: dio
W (604) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (615) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (626) onoff_server: Initializing...
I (646) BTDM_INIT: BT controller compile version [e27d6da]
I (646) system_api: Base MAC address is not set
I (646) system_api: read default base MAC address from EFUSE
Guru Meditation Error: Core  0 panic'ed (IntegerDivideByZero). Exception was unhandled.
Core 0 register dump:
PC      : 0x4000d099  PS      : 0x00060d30  A0      : 0x80082978  A1      : 0x3ffb5d00
A2      : 0x00000064  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x00000000
A6      : 0x3ffb5d70  A7      : 0x3ffb5cf0  A8      : 0x00000001  A9      : 0x00000000
A10     : 0x00000000  A11     : 0x00000064  A12     : 0x3ffb5d34  A13     : 0x3ffb8364
A14     : 0x401477c8  A15     : 0x3ffc959c  SAR     : 0x00000020  EXCCAUSE: 0x00000006
0x401477c8: r_flash_read at ??:?

EXCVADDR: 0x00000000  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff

ELF file SHA256: 540c86f66dc1a5bd3f2bc47f43c5aba5369eacc580f18c04792dd4defbf56a8e

Backtrace: 0x4000d096:0x3ffb5d00 0x40082975:0x3ffb5d20 0x4003c166:0x3ffb5d40 0x4003c3bc:0x3ffb5d60 0x4013e862:0x3ffb5da0 0x40055199:0x3ffb5dc0 0x40147092:0x3ffb5de0 0x401399e7:0x3ffb5e20 0x40139f24:0x3ffb5e40 0x400902d1:0x3ffb5e70
0x40082975: btdm_us_2_lpcycles at C:/Users/zheng/Desktop/esp-idf/components/bt/controller/bt.c:806

0x4013e862: r_ld_init_hark at ??:?

0x40147092: r_rwip_init at ??:?

0x401399e7: r_rw_pre_main at arch_main.c:?

0x40139f24: btdm_controller_task at ??:?

0x400902d1: vPortTaskWrapper at C:/Users/zheng/Desktop/esp-idf/components/freertos/xtensa/port.c:143

Rebooting...

Any thought about my problem?

Campou commented 4 years ago

Hi @sheldon123z

Sorry for the inconvenience caused.

Currently please enable the "Bluetooth modem sleep" in the bluetooth controller menuconfig, this will fix this issue. And we have fixed this issue internally, the changes will be synchronized to Github very soon.

Another option is to cherry-pick this commit from master, it will also fix this issue.

Thanks and Regards

Campou commented 4 years ago

Hi @sheldon123z

The branch release/v4.0 has been updated, please pull and have a try.

Thanks.

sheldon123z commented 4 years ago

Hi @Campou ,

Thank you very much, that works!

I also have a quick question, since I am new to BLE mesh, I am still learning the stack. I found the examples seem not able to be provisioned by other provisioners except for the phone and the example provisioner, like an embedded Linux provisioner Raspberry Pi3 B+ using BlueZ, and the Tmall genie, which also uses Bluetooth mesh as the communication protocol. Both of them are not working with the examples. What adjustment should I do to handle this?

Thanks!