Page 1 of 1

wifi: alloc eb len=76 type=2 fail after update esp-idf

Posted: Tue Sep 04, 2018 2:00 pm
by gigijoe
After pull the latest esp-idf today the wifi doesn't work any more
portTICK_PERIOD_MS = 10
CCT_TICKS_PER_US = 240
RAM left 3568416
W (1549) wifi: alloc eb len=76 type=2 fail, heap:3260136

W (1549) wifi: m f probe req l=0

W (1649) wifi: alloc eb len=76 type=2 fail, heap:3259808

W (1649) wifi: m f probe req l=0

W (1769) wifi: alloc eb len=76 type=2 fail, heap:2948492

W (1769) wifi: m f probe req l=0
gigijoe@gigijoe-i5-2500k:~/ESP32/esp-idf$ git pull
remote: Counting objects: 192, done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 192 (delta 147), reused 190 (delta 145), pack-reused 0
Receiving objects: 100% (192/192), 643.24 KiB | 335 KiB/s, done.
Resolving deltas: 100% (147/147), completed with 88 local objects.
From https://github.com/espressif/esp-idf
a557e8c..e54f3d9 master -> origin/master
7c42b55..405b198 release/v3.0 -> origin/release/v3.0
Fetching submodule components/bt/lib
remote: Counting objects: 3, done.
remote: Total 3 (delta 2), reused 3 (delta 2), pack-reused 0
Unpacking objects: 100% (3/3), done.
From https://github.com/espressif/esp32-bt-lib
12ca65c..96e7e06 release/v3.0 -> origin/release/v3.0
Updating a557e8c..e54f3d9
Fast-forward
components/bootloader/Kconfig.projbuild | 32 +
.../bootloader/subproject/main/esp32.bootloader.ld | 5 +-
.../bootloader_random.h | 0
.../bootloader_support/include/esp_flash_encrypt.h | 3 +
.../include_bootloader/bootloader_flash.h | 11 +
.../bootloader_support/src/bootloader_common.c | 6 +-
.../bootloader_support/src/bootloader_flash.c | 29 +
.../bootloader_support/src/bootloader_init.c | 13 +
.../bootloader_support/src/bootloader_random.c | 16 +-
components/bootloader_support/src/flash_encrypt.c | 2 +
components/esp32/clk.c | 21 +
components/esp32/cpu_start.c | 9 +-
components/esp32/hw_random.c | 14 +
components/esp32/include/esp_mesh.h | 715 ++++++------
components/esp32/include/esp_mesh_internal.h | 99 +-
components/esp32/include/esp_system.h | 23 +-
components/esp32/spiram.c | 2 +-
components/esp32/test/test_random.c | 67 ++
components/fatfs/test/test_fatfs_sdmmc.c | 4 +-
components/fatfs/test/test_fatfs_spiflash.c | 4 +-
components/freertos/tasks.c | 7 +-
components/heap/heap_caps_init.c | 2 +-
components/heap/multi_heap_poisoning.c | 9 +
components/libsodium/port/randombytes_esp32.c | 10 +-
components/mbedtls/port/esp_hardware.c | 11 +-
components/newlib/random.c | 15 +-
components/soc/esp32/rtc_wdt.c | 21 +
components/soc/include/soc/rtc_wdt.h | 12 +
components/spi_flash/flash_ops.c | 2 +-
components/wpa_supplicant/port/os_xtensa.c | 19 +-
.../_static/mesh-asynchronous-power-on-example.png | Bin 0 -> 69671 bytes
docs/_static/mesh-beacon-frame-rssi.png | Bin 0 -> 38529 bytes
docs/_static/mesh-bidirectional-data-stream.png | Bin 0 -> 39218 bytes
.../_static/mesh-esp-mesh-network-architecture.png | Bin 0 -> 30450 bytes
...vents_delivery.png => mesh-events-delivery.png} | Bin 16574 -> 16574 bytes
docs/_static/mesh-network-building.png | Bin 0 -> 47626 bytes
docs/_static/mesh-node-types.png | Bin 0 -> 38384 bytes
docs/_static/mesh-packet.png | Bin 0 -> 15252 bytes
docs/_static/mesh-parent-node-failure.png | Bin 0 -> 27803 bytes
docs/_static/mesh-preferred-parent-node.png | Bin 0 -> 43761 bytes
docs/_static/mesh-root-node-designated-example.png | Bin 0 -> 42711 bytes
docs/_static/mesh-root-node-election-example.png | Bin 0 -> 49663 bytes
docs/_static/mesh-root-node-failure.png | Bin 0 -> 31346 bytes
docs/_static/mesh-root-node-switch-example.png | Bin 0 -> 51137 bytes
docs/_static/mesh-routing-tables-example.png | Bin 0 -> 45416 bytes
..._software_stack.png => mesh-software-stack.png} | Bin 16842 -> 16842 bytes
.../mesh-traditional-network-architecture.png | Bin 0 -> 29878 bytes
docs/_static/mesh-tree-topology.png | Bin 0 -> 26009 bytes
docs/_static/mesh_network_architecture.png | Bin 31796 -> 0 bytes
docs/_static/mesh_network_topology.png | Bin 58156 -> 0 bytes
docs/en/api-guides/index.rst | 2 +-
docs/en/api-guides/mesh.rst | 1162 ++++++++++++++++----
docs/en/api-reference/mesh/esp_mesh.rst | 261 ++++-
docs/zh_CN/api-guides/index.rst | 2 +-
examples/bluetooth/blufi/main/blufi_security.c | 6 +-
examples/wifi/espnow/main/espnow_example_main.c | 6 +-
tools/kconfig/Makefile | 2 +-
57 files changed, 1919 insertions(+), 705 deletions(-)
rename components/bootloader_support/{include_bootloader => include}/bootloader_random.h (100%)
create mode 100644 components/esp32/test/test_random.c
create mode 100644 docs/_static/mesh-asynchronous-power-on-example.png
create mode 100644 docs/_static/mesh-beacon-frame-rssi.png
create mode 100644 docs/_static/mesh-bidirectional-data-stream.png
create mode 100644 docs/_static/mesh-esp-mesh-network-architecture.png
rename docs/_static/{mesh_events_delivery.png => mesh-events-delivery.png} (100%)
create mode 100644 docs/_static/mesh-network-building.png
create mode 100644 docs/_static/mesh-node-types.png
create mode 100644 docs/_static/mesh-packet.png
create mode 100644 docs/_static/mesh-parent-node-failure.png
create mode 100644 docs/_static/mesh-preferred-parent-node.png
create mode 100644 docs/_static/mesh-root-node-designated-example.png
create mode 100644 docs/_static/mesh-root-node-election-example.png
create mode 100644 docs/_static/mesh-root-node-failure.png
create mode 100644 docs/_static/mesh-root-node-switch-example.png
create mode 100644 docs/_static/mesh-routing-tables-example.png
rename docs/_static/{mesh_software_stack.png => mesh-software-stack.png} (100%)
create mode 100644 docs/_static/mesh-traditional-network-architecture.png
create mode 100644 docs/_static/mesh-tree-topology.png
delete mode 100644 docs/_static/mesh_network_architecture.png
delete mode 100644 docs/_static/mesh_network_topology.png
gigijoe@gigijoe-i5-2500k:~/ESP32/esp-idf$ git submodule update --init
Submodule 'components/asio/asio' () registered for path 'components/asio/asio'
Submodule 'components/aws_iot/aws-iot-device-sdk-embedded-C' () registered for path 'components/aws_iot/aws-iot-device-sdk-embedded-C'
Submodule 'components/bt/lib' () registered for path 'components/bt/lib'
Submodule 'components/coap/libcoap' () registered for path 'components/coap/libcoap'
Submodule 'components/esp32/lib' () registered for path 'components/esp32/lib'
Submodule 'components/esptool_py/esptool' () registered for path 'components/esptool_py/esptool'
Submodule 'components/expat/expat' () registered for path 'components/expat/expat'
Submodule 'components/json/cJSON' () registered for path 'components/json/cJSON'
Submodule 'components/libsodium/libsodium' () registered for path 'components/libsodium/libsodium'
Submodule 'components/mbedtls/mbedtls' () registered for path 'components/mbedtls/mbedtls'
Submodule 'components/micro-ecc/micro-ecc' () registered for path 'components/micro-ecc/micro-ecc'
Submodule 'components/nghttp/nghttp2' () registered for path 'components/nghttp/nghttp2'
Submodule 'components/spiffs/spiffs' () registered for path 'components/spiffs/spiffs'
I have double check to go back to a557e8cc14880717f242918a754cbc37d85e036a then wifi works.

Please help

Thank you

Re: wifi: alloc eb len=76 type=2 fail after update esp-idf

Posted: Tue Sep 04, 2018 3:11 pm
by f.h-f.s.
I've had trouble with memory when my internal memory got below 30k, even though SPIRAM had alot of space left. You could check with

Code: Select all

// SPIRAM
heap_caps_log_heap_info(MALLOC_CAP_SPIRAM);
// INTERNAL RAM
heap_caps_log_heap_info(MALLOC_CAP_INTERNAL);
just a wild guess though, Goodluck.

Re: wifi: alloc eb len=76 type=2 fail after update esp-idf

Posted: Wed Sep 05, 2018 10:14 am
by gigijoe
Internal memory size is a good point

I'm able to get wifi work again with latest esp-idf by the following setting

1.CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL from 4096 to 1024
2.CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL from 131072 to 65536

I'm NOT sure is it a good solution, but it works @@

Re: wifi: alloc eb len=76 type=2 fail after update esp-idf

Posted: Fri Mar 08, 2019 12:36 pm
by snahmad75
My settings are now.

CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=6000
CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST=y
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=45768


It failed when CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST is disabled.

CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST=

Any idea?

Is it going to slow down WiFi.