espnow demo code haven't gotten the desired result

pmoreira
Posts: 2
Joined: Mon Apr 07, 2025 6:33 pm

espnow demo code haven't gotten the desired result

Postby pmoreira » Mon Apr 07, 2025 7:13 pm

Hello, I'm trying out the Espressif ESP32 demo code with ESP-IDF 5.2.2, specifically https://github.com/espressif/esp-idf/tr ... ifi/espnow, but I haven't gotten the desired result:

Desired Example Outputs:

Here's an example of the console output from the ESPNOW receiver device.

I (898) phy: phy_version: 3960, 5211945, Jul 18 2018, 10:40:07, 0, 0
I (898) wifi: mode: sta (30:ae:a4:80:45:68)
I (898) espnow_example: Wi-Fi started
I (898) ESPNOW: espnow [version: 1.0] init
I (5908) espnow_example: Start sending stream data
I (6908) espnow_example: Send data to ff:ff:ff:ff:ff:ff
I (7908) espnow_example: Send data to ff:ff:ff:ff:ff:ff
I (52138) espnow_example: Send data to ff:ff:ff:ff:ff:ff
I (52138) espnow_example: Receive data from stream 0 from: 30:ae:a4:0c:34:ec, len: 200
I (53158) espnow_example: Send data to ff:ff:ff:ff:ff:ff
I (53158) espnow_example: Receive data from stream 1 from: 30:ae:a4:0c:34:ec, len: 200
I (54168) espnow_example: Send data to ff:ff:ff:ff:ff:ff
I (54168) espnow_example: Receive data from stream 2 from: 30:ae:a4:0c:34:ec, len: 200
I (54168) espnow_example: Receive unicast data 0 from: 30:ae:a4:0c:34:ec, len: 200
I (54678) espnow_example: Receive first unicast data from: 30:ae:a4:0c:34:ec, len: 200
I (55668) espnow_example: Receive second unicast data from: 30:ae:a4:0c:34:ec, len: 200

Here is an example of the console output from the ESPNOW sending device.

I (915) phy: phy_version: 3960, 5211945, Jul 18 2018, 10:40:07, 0, 0
I (915) wifi: mode: sta (30:ae:a4:0c:34:ec)
I (915) espnow_example: Wi-Fi started
I (915) ESPNOW: espnow [version: 1.0] init
I (5915) espnow_example: Start sending stream data
I (5915) espnow_example: Receive stream data #41 from: 30:ae:a4:80:45:68, len: 200
I (5915) espnow_example: Receive stream data #42 from: 30:ae:a4:80:45:68, len: 200
I (5925) espnow_example: Receive data from 44th transmission of: 30:ae:a4:80:45:68, len: 200
I (5935) espnow_example: Receive data from the 45th transmission of: 30:ae:a4:80:45:68, len: 200
I (6965) espnow_example: Send data to ff:ff:ff:ff:ff:ff
I (6965) espnow_example: Receive data from the 46th transmission of: 30:ae:a4:80:45:68, len: 200
I (7975) espnow_example: Send data to ff:ff:ff:ff:ff:ff
I (7975) espnow_example: Receive data from the 47th transmission of: 30:ae:a4:80:45:68, len: 200
I (7975) espnow_example: Start sending unicast data
I (7975) espnow_example: Send data to 30:ae:a4:80:45:68
I (9015) espnow_example: Send data to 30:ae:a4:80:45:68
I (9015) espnow_example: Receive data from the 48th broadcast of: 30:ae:a4:80:45:68, len: 200
I (10015) espnow_example: Send data to 30:ae:a4:80:45:68
I (16075) espnow_example: Send data to 30:ae:a4:80:45:68
I (17075) espnow_example: Send data at 30:ae:a4:80:45:68
I (24125) espnow_example: Send data to 30:ae:a4:80:45:68

After loading the FW on the devices, I get the following logs:

Slave device:
I (31) boot: ESP-IDF v5.2.2-dirty 2nd stage bootloader
I (31) boot: compile time Apr 7 2025 14:18:36
I (31) boot: Multicore bootloader
I (36) boot: chip revision: v3.1
I (40) boot.esp32: SPI Speed : 40MHz
I (44) boot.esp32: SPI Mode : DIO
I (49) boot.esp32: SPI Flash Size : 2MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label Usage Type ST Offset Length
I (70) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (77) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (85) 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=1e970h (125296) map
I (148) esp_image: segment 1: paddr=0002e998 vaddr=3ffb0000 size=01680h ( 5760) load
I (150) esp_image: segment 2: paddr=00030020 vaddr=400d0020 size=7e530h (517424) map
I (331) esp_image: segment 3: paddr=000ae558 vaddr=3ffb1680 size=024e4h ( 9444) load
I (334) esp_image: segment 4: paddr=000b0a44 vaddr=40080000 size=167d8h ( 92120) load
I (384) boot: Loaded app from partition at offset 0x10000
I (384) boot: Disabling RNG early entropy source...
I (395) cpu_start: Multicore app
I (404) cpu_start: Pro cpu start user code
I (404) cpu_start: cpu freq: 160000000 Hz
I (404) cpu_start: Application information:
I (407) cpu_start: Project name: espnow_example
I (413) cpu_start: App version: v5.5-dev-2844-g5c51472e82-dirty
I (420) cpu_start: Compile time: Apr 7 2025 14:27:35
I (426) cpu_start: ELF file SHA256: 09c186ea3...
I (431) cpu_start: ESP-IDF: v5.2.2-dirty
I (437) cpu_start: Min chip rev: v0.0
I (441) cpu_start: Max chip rev: v3.99
I (446) cpu_start: Chip rev: v3.1
I (451) heap_init: Initializing. RAM available for dynamic allocation:
I (458) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (464) heap_init: At 3FFB7C38 len 000283C8 (160 KiB): DRAM
I (470) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (477) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (483) heap_init: At 400967D8 len 00009828 (38 KiB): IRAM
I (491) spi_flash: detected chip: generic
I (494) spi_flash: flash io: dio
W (498) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the
binary image header.
I (512) main_task: Started on CPU0
I (522) main_task: Calling app_main()
I (552) wifi:wifi driver task: 3ffbf704, prio:23, stack:6656, core=0
I (552) wifi:wifi firmware version: 3e0076f
I (552) wifi:wifi certification version: v7.0
I (552) wifi:config NVS flash: enabled
I (552) wifi:config nano formating: disabled
I (562) wifi:Init data frame dynamic rx buffer num: 32
I (562) wifi:Init static rx mgmt buffer num: 5
I (572) wifi:Init management short buffer num: 32
I (572) wifi:Init dynamic tx buffer num: 32
I (572) wifi:Init static rx buffer size: 1600
I (582) wifi:Init static rx buffer num: 10
I (582) wifi:Init dynamic rx buffer num: 32
I (592) wifi_init: rx ba win: 6
I (592) wifi_init: tcpip mbox: 32
I (592) wifi_init: udp mbox: 6
I (602) wifi_init: tcp mbox: 6
I (602) wifi_init: tcp tx win: 5760
I (602) wifi_init: tcp rx win: 5760
I (612) wifi_init: tcp mss: 1440
I (612) wifi_init: WiFi IRAM OP enabled
I (622) wifi_init: WiFi RX IRAM OP enabled
I (622) phy_init: phy_version 4791,2c4672b,Dec 20 2023,16:06:06
I (722) wifi:mode : softAP (a0:dd:6c:85:d6:75)
I (722) wifi:Total power save buffer number: 16
I (722) wifi:Init max length of beacon: 752/752
I (722) wifi:Init max length of beacon: 752/752
I (732) ESPNOW: espnow [version: 1.0] init
I (732) main_task: Returned from app_main()
I (5732) espnow_example: Start sending broadcast data
I (6732) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (7732) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (8732) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (9732) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (10732) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (11732) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (12732) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (13732) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (14732) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (15732) espnow_example: send data to ff:ff:ff:ff:ff:ff

Master device:
I (5535) espnow_example: Start sending broadcast data
I (5535) espnow_example: Receive 134th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (5535) espnow_example: peer a0:dd:6c:85:d6:75 added
I (5535) espnow_example: Receive 135th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (5545) espnow_example: Receive 136th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (5555) espnow_example: Receive 137th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (5565) espnow_example: Receive 138th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (6575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (6575) espnow_example: Receive 139th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (7575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (7575) espnow_example: Receive 140th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (8575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (8575) espnow_example: Receive 141th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (9575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (9575) espnow_example: Receive 142th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (10575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (10575) espnow_example: Receive 143th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (11575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (11575) espnow_example: Receive 144th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (12575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (12575) espnow_example: Receive 145th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (13575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (13575) espnow_example: Receive 146th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (14575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (14575) espnow_example: Receive 147th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (15575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (15575) espnow_example: Receive 148th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (16575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (16575) espnow_example: Receive 149th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (17575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (17575) espnow_example: Receive 150th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (18575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (18575) espnow_example: Receive 151th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (19575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (19575) espnow_example: Receive 152th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (20575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (20575) espnow_example: Receive 153th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (21575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (21575) espnow_example: Receive 154th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (22575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (22575) espnow_example: Receive 155th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (23575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (23575) espnow_example: Receive 156th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (24575) espnow_example: send data to ff:ff:ff:ff:ff:ff
I (24575) espnow_example: Receive 157th broadcast data from: a0:dd:6c:85:d6:75, len: 10
I (25575) espnow_example: send data to ff:ff:ff:ff:ff:ff


All suggestions in README.md are followed.

The channel and keys match on the master and slave modules.

After load Firmware correctly, only broadcast data are received, unicast data are missing.

What could be the problem?

Many Thank in advance.

Who is online

Users browsing this forum: No registered users and 5 guests