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

Example wifi_embassy_dhcp not working #1807

Closed
DBLouis opened this issue Jul 16, 2024 · 5 comments
Closed

Example wifi_embassy_dhcp not working #1807

DBLouis opened this issue Jul 16, 2024 · 5 comments

Comments

@DBLouis
Copy link

DBLouis commented Jul 16, 2024

I tried running the wifi_embassy_dhcp example on my ESP32 without success. The other example wifi_dhcp work correctly.
I just cloned this repository and run the example as-is, changing only the SSID and PASSWORD environment variables.

This is the output I get in serial connection:

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:7104
0x3fff0030 - esp_wifi::HEAP_DATA
    at ??:??
load:0x40078000,len:15576
load:0x40080400,len:4
ho 8 tail 4 room 4
load:0x40080404,len:3876
entry 0x4008064c
0x4008064c - core::fmt::Arguments::new_v1
    at /home/louis/.rustup/toolchains/esp/lib/rustlib/src/rust/library/core/src/fmt/mod.rs:343
I (30) boot: ESP-IDF v5.1-beta1-378-gea5e0ff298-dirt 2nd stage bootloader
I (30) boot: compile time Jun  7 2023 07:48:23
I (32) boot: Multicore bootloader
I (36) boot: chip revision: v1.0
I (40) boot.esp32: SPI Speed      : 40MHz
I (45) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 4MB
I (54) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (63) boot: ## Label            Usage          Type ST Offset   Length
I (70) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (78) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (85) boot:  2 factory          factory app      00 00 00010000 003f0000
I (93) boot: End of partition table
I (97) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=112c0h ( 70336) map
I (131) esp_image: segment 1: paddr=000212e8 vaddr=3ffb0000 size=00e0ch (  3596) load
I (132) esp_image: segment 2: paddr=000220fc vaddr=3ffc3aac size=00190h (   400) load
I (137) esp_image: segment 3: paddr=00022294 vaddr=40080000 size=0d5f0h ( 54768) load
I (168) esp_image: segment 4: paddr=0002f88c vaddr=00000000 size=0078ch (  1932)
I (169) esp_image: segment 5: paddr=00030020 vaddr=400d0020 size=5c080h (376960) map
I (316) boot: Loaded app from partition at offset 0x10000
I (316) boot: Disabling RNG early entropy source...
INFO - esp-wifi configuration Config { rx_queue_size: 5, tx_queue_size: 3, static_rx_buf_num: 10, dynamic_rx_buf_num: 32, static_tx_buf_num: 0, dynamic_tx_buf_num: 32, ampdu_rx_enable: 0, ampdu_tx_enable: 0, amsdu_tx_enable: 0, rx_ba_win: 6, max_burst_size: 1, country_code: "CN", country_code_operating_class: 0, mtu: 1492, heap_size: 65536, tick_rate_hz: 100, listen_interval: 3, beacon_timeout: 6, ap_beacon_timeout: 300, failure_retry_cnt: 1, scan_method: 0 }
WARN - esp_wifi_internal_tx 12290
start connection task
Device capabilities: Ok(EnumSet(Client))
Starting wifi
Wifi started!
About to connect...
Failed to connect to wifi: Disconnected
About to connect...
Failed to connect to wifi: Disconnected
WARN - esp_wifi_internal_tx 12294
About to connect...
Failed to connect to wifi: Disconnected
@playfulFence
Copy link
Contributor

playfulFence commented Jul 16, 2024

Hmm, works on my esp32 🤔
One difference I see from the log is the chip revision, let me check if I have an access to the v1.0 board.

UPD: Also try to reset the chip couple of times, I've had this happen multiple times and it helped 😄 .

@playfulFence
Copy link
Contributor

playfulFence commented Jul 16, 2024

Works for me on esp32 v1.0 board as well

image

@playfulFence
Copy link
Contributor

playfulFence commented Jul 16, 2024

@DBLouis Let us know how it goes when you get to it, please 😉

@DBLouis
Copy link
Author

DBLouis commented Jul 16, 2024

I tried again, let it run longer, and restarted several time. It run the example with this command: cargo xtask run-example esp-hal esp32 wifi_embassy_dhcp.

Also my board is ESP-32 Dev Kit C V4.

@DBLouis
Copy link
Author

DBLouis commented Jul 16, 2024

Never mind, it works fine. I was using an AP with WIFI AC, which is not supported by the chip. WIFI N works fine of course.

@DBLouis DBLouis closed this as completed Jul 16, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants