Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apsta_mode example fail to run on ESP32C6. #83784

Open
phb98 opened this issue Jan 10, 2025 · 3 comments
Open

apsta_mode example fail to run on ESP32C6. #83784

phb98 opened this issue Jan 10, 2025 · 3 comments
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: ESP32 Espressif ESP32 priority: low Low impact/importance bug

Comments

@phb98
Copy link

phb98 commented Jan 10, 2025

Describe the bug

apsta_mode example fail to run on esp32c6_devkitc board.
The example doesn't have overlay file for this dev kit yet, so i create a new file esp32c6_devkitc.overlay based on similar ESP32 overlay.
Nothing else was changed(Kconfig, code)

&wifi {
	status = "okay";
};

/ {
	wifi_ap: wifi_ap {
		compatible = "espressif,esp32-wifi";
		status = "okay";
	};
};

From the log, it seem like it fails to send TX packet
To Reproduce

Run this Example with above overlay file
Expected behavior

Should run this example normally
Impact

Logs and console output

ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x40800000,len:0x284ec
0x40800000: _esp32c6_vector_table at ??:?

load:0x40828500,len:0x3f8c
0x40828500: ?? at /home/bacphan/zephyrproject/modules/hal/espressif/components/esp_hw_support/sleep_modes.c:234

SHA-256 comparison failed:
Calculated: 94ca3e56a36618baf92e9b897ac669ccf792e4d8fd1af35927bbdcb9c8c61480
Expected: 00000000403b0000000000000000000000000000000000000000000000000000
Attempting to boot anyway...
entry 0x4080375e
0x4080375e: __start at /home/bacphan/zephyrproject/zephyr/soc/espressif/common/loader.c:247

I (110) soc_init: ESP Simple boot
I (110) soc_init: compile time Jan 10 2025 15:43:40
I (110) spi_flash: detected chip: boya
I (111) spi_flash: flash io: dio
W (112) spi_flash: Detected size(16384k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (125) soc_init: chip revision: v0.1
I (128) flash_init: SPI Speed      : 80MHz
I (132) flash_init: SPI Mode       : DIO
I (136) flash_init: SPI Flash Size : 16MB
I (139) soc_random: Enabling RNG early entropy source
I (144) boot: DRAM: lma 0x00000020 vma 0x40800000 len 0x284ec  (165100)
0x40800000: _esp32c6_vector_table at ??:?

I (150) boot: DRAM: lma 0x00028514 vma 0x40828500 len 0x3f8c   (16268)
0x40828500: ?? at /home/bacphan/zephyrproject/modules/hal/espressif/components/esp_hw_support/sleep_modes.c:234

I (157) boot: padd: lma 0x0002c4b8 vma 0x00000000 len 0x3b40   (15168)
I (163) boot: IMAP: lma 0x00030000 vma 0x42800000 len 0xedd8   (60888)
0x42800000: _image_drom_vaddr at ??:?

I (169) boot: padd: lma 0x0003ede0 vma 0x00000000 len 0x1218   (4632)
I (175) boot: IMAP: lma 0x00040000 vma 0x42000000 len 0x4df30  (319280)
0x42000000: ieee80211_ampdu_reorder at ??:?

I (182) boot: Image with 6 segments
I (185) boot: DROM segment: paddr=00030000h, vaddr=42800000h, size=0EDE0h ( 60896) map
I (192) boot: IROM segment: paddr=00040000h, vaddr=42000000h, size=4DF2Eh (319278) map
I (211) soc_random: Disabling RNG early entropy source
I (212) boot: Jumping to the main image...
I (243) heap_runtime: ESP heap runtime init at 0x4083e150 size 249 kB.
[00:00:00.037,000] <inf> wifi_init: rx ba win: 6
[00:00:00.037,000] <inf> wifi_init: WiFi IRAM OP enabled
*** Booting Zephyr OS build v4.0.0-1926-g7c4abb1eb9fd ***
[00:00:05.038,000] <inf> MAIN: Turning on AP Mode
[00:00:05.038,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start: Started DHCPv4 server, address pool:
[00:00:05.038,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start:     0: 192.168.4.11
[00:00:05.038,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start:     1: 192.168.4.12
[00:00:05.038,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start:     2: 192.168.4.13
[00:00:05.038,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start:     3: 192.168.4.14
[00:00:05.038,000] <inf> MAIN: DHCPv4 server started...

[00:00:05.131,000] <err> esp32_wifi: Failed to send packet
[00:00:05.131,000] <err> esp32_wifi: Failed to send packet
[00:00:05.131,000] <err> esp32_wifi: Failed to send packet
[00:00:05.131,000] <err> esp32_wifi: Failed to send packet
[00:00:05.132,000] <inf> MAIN: AP Mode is enabled. Waiting for station to connect
[00:00:05.132,000] <inf> MAIN: Connecting to SSID: SSID

[00:00:05.132,000] <inf> MAIN: AP Mode is disabled.
[00:00:05.133,000] <err> esp32_wifi: Failed to send packet
[00:00:05.133,000] <err> esp32_wifi: Failed to send packet
[00:00:05.133,000] <err> esp32_wifi: Failed to send packet
[00:00:05.133,000] <err> esp32_wifi: Failed to send packet
[00:00:06.134,000] <err> esp32_wifi: Failed to send packet
[00:00:07.135,000] <err> esp32_wifi: Failed to send packet
[00:00:07.537,000] <inf> MAIN: Disconnected from SSID

Environment (please complete the following information):

Latest commit on main

Additional context

@phb98 phb98 added the bug The issue is a bug, or the PR is fixing a bug label Jan 10, 2025
@phb98
Copy link
Author

phb98 commented Jan 11, 2025

FYI: This sample also fail on board esp32_devkitc_wroom/esp32/procpu

(.venv) ➜  zephyr git:(main) west espressif monitor
Serial port /dev/ttyUSB1
Connecting..........
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting......
Detecting chip type... ESP32
--- idf_monitor on /dev/ttyUSB1 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:0x3ffb0000,len:14860
ho 0 tail 12 room 4
load:0x40080000,len:82880
0x40080000: _WindowOverflow4 at /root/zephyrproject/zephyr/arch/xtensa/core/window_vectors.S:56

1150 mmu set 00010000, pos 00010000
entry 0x40089160
0x40089160: __start at /root/zephyrproject/zephyr/soc/espressif/common/loader.c:247

I (56) soc_init: ESP Simple boot
I (57) soc_init: compile time Jan 11 2025 16:38:39
W (57) soc_init: Unicore bootloader
I (57) spi_flash: detected chip: generic
I (61) spi_flash: flash io: dio
I (63) soc_init: chip revision: v3.0
I (67) flash_init: SPI Speed      : 40MHz
I (70) flash_init: SPI Mode       : DIO
I (74) flash_init: SPI Flash Size : 4MB
I (78) boot: DRAM: lma 0x00001020 vma 0x3ffb0000 len 0x3a0c   (14860)
I (84) boot: IRAM: lma 0x00004a34 vma 0x40080000 len 0x143c0  (82880)
0x40080000: _WindowOverflow4 at /root/zephyrproject/zephyr/arch/xtensa/core/window_vectors.S:56

I (90) boot: padd: lma 0x00018e08 vma 0x00000000 len 0x71f0   (29168)
I (96) boot: IMAP: lma 0x00020000 vma 0x400d0000 len 0x544d0  (345296)
0x400d0000: _stext at ??:?

I (102) boot: padd: lma 0x000744d8 vma 0x00000000 len 0xbb20   (47904)
I (109) boot: DMAP: lma 0x00080000 vma 0x3f400000 len 0xc838   (51256)
I (115) boot: Image with 6 segments
I (118) boot: DROM segment: paddr=00080000h, vaddr=3f400000h, size=0C838h ( 51256) map
I (126) boot: IROM segment: paddr=00020000h, vaddr=400d0000h, size=544D0h (345296) map
I (144) boot: Jumping to the main image...
I (172) heap_runtime: ESP heap runtime init at 0x3ffc58f8 size 105 kB.
[00:00:00.176,000] <inf> wifi_init: rx ba win: 6
[00:00:00.176,000] <inf> wifi_init: WiFi IRAM OP enabled
*** Booting Zephyr OS build v4.0.0-2693-g334c6be2da1f ***
[00:00:05.177,000] <inf> MAIN: Turning on AP Mode
[00:00:05.178,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start: Started DHCPv4 server, address pool:
[00:00:05.178,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start:     0: 192.168.4.11
[00:00:05.178,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start:     1: 192.168.4.12
[00:00:05.178,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start:     2: 192.168.4.13
[00:00:05.178,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start:     3: 192.168.4.14
[00:00:05.179,000] <inf> MAIN: DHCPv4 server started...

[00:00:05.244,000] <err> esp32_wifi: Failed to send packet
[00:00:05.245,000] <err> esp32_wifi: Failed to send packet
[00:00:05.245,000] <err> esp32_wifi: Failed to send packet
[00:00:05.245,000] <err> esp32_wifi: Failed to send packet
[00:00:05.246,000] <inf> MAIN: AP Mode is enabled. Waiting for station to connect
[00:00:05.246,000] <inf> MAIN: Connecting to SSID: SSID

[00:00:05.248,000] <err> esp32_wifi: Failed to send packet
[00:00:05.248,000] <err> esp32_wifi: Failed to send packet
[00:00:05.248,000] <err> esp32_wifi: Failed to send packet
[00:00:05.248,000] <err> esp32_wifi: Failed to send packet
[00:00:06.246,000] <err> esp32_wifi: Failed to send packet
[00:00:06.249,000] <err> esp32_wifi: Failed to send packet
[00:00:07.247,000] <err> esp32_wifi: Failed to send packet
[00:00:07.249,000] <err> esp32_wifi: Failed to send packet
[00:00:08.085,000] <inf> MAIN: Disconnected from SSID

Zephyr commit is at 334c6be2da1

@phb98
Copy link
Author

phb98 commented Jan 13, 2025

Hi
Disable IPv6 will stop error "Failed to send packet"

CONFIG_NET_IPV6=n

But somehow the AP still being disabled immediately

*** Booting Zephyr OS build v4.0.0-1926-g7c4abb1eb9fd ***
[00:00:05.038,000] <inf> MAIN: Turning on AP Mode
[00:00:05.038,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start: Started DHCPv4 server, address pool:
[00:00:05.038,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start:     0: 192.168.4.11
[00:00:05.038,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start:     1: 192.168.4.12
[00:00:05.038,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start:     2: 192.168.4.13
[00:00:05.038,000] <dbg> net_dhcpv4_server: net_dhcpv4_server_start:     3: 192.168.4.14
[00:00:05.038,000] <inf> MAIN: DHCPv4 server started...

[00:00:05.114,000] <inf> MAIN: AP Mode is enabled. Waiting for station to connect
[00:00:05.114,000] <inf> MAIN: Connecting to SSID: SSID

[00:00:05.114,000] <inf> MAIN: AP Mode is disabled.
[00:00:07.521,000] <inf> MAIN: Disconnected from SSID

@EricNRS
Copy link
Contributor

EricNRS commented Jan 13, 2025

May be related to #81744.

@kartben kartben added the priority: low Low impact/importance bug label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: ESP32 Espressif ESP32 priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

5 participants