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

ESP32C6 Wifi APIs not available on v5.1/v5.1.1 #307

Closed
sjames opened this issue Oct 18, 2023 · 4 comments
Closed

ESP32C6 Wifi APIs not available on v5.1/v5.1.1 #307

sjames opened this issue Oct 18, 2023 · 4 comments

Comments

@sjames
Copy link

sjames commented Oct 18, 2023

Hi,

I'm using cargo generate esp-rs/esp-idf-template cargo to generate a new esp32 project. I'm using an esp32c6 module, so I use IDF v5.1.1 .

I find that the Rust Wifi APIs defined in src/wifi.rs are not available. The wifi module is gated by the following configurations.

#[cfg(all(
    not(esp32h2),
    feature = "alloc",
    esp_idf_comp_esp_wifi_enabled,
    esp_idf_comp_esp_event_enabled,
))]
pub mod wifi;

I couldn't figure out how these configurations are set. Does anyone have Wifi working with Rust on ESP32C6?

Regards,
Sojan

@sjames
Copy link
Author

sjames commented Oct 18, 2023

Answering this myself.

It turns out that the esp-idf-template does not configure the MCU that needs to build, and the default mcu is the esp32h2 that does not have the Wifi.

I fixed this by setting the mcu in the .cargo/config.toml

[env]
# Note: these variables are not used when using pio builder (`cargo build --features pio`)
ESP_IDF_VERSION = "v5.1.1"
MCU = "esp32c6"

@ivmarkov
Copy link
Collaborator

I'm in the process of updating the esp-idf-template crate to work with the newly released esp-idf-* crates.
Thanks for this feedback - makes sense! Just updated the .cargo/config.toml with the MCU parameter: esp-rs/esp-idf-template@6d71a63

A new esp-idf-template will be pushed till the end of the week.

@ivmarkov
Copy link
Collaborator

Also this: esp-rs/esp-idf-template@01b55d3

@ivmarkov
Copy link
Collaborator

To be fixed once this is merged: esp-rs/esp-idf-template#159

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