| Crates.io | esp-hal-wifimanager |
| lib.rs | esp-hal-wifimanager |
| version | 0.1.1 |
| created_at | 2025-07-17 21:04:44.28604+00 |
| updated_at | 2025-09-09 09:41:02.047987+00 |
| description | Wifi Manager for esp-hal (bt+wifi ap) |
| homepage | |
| repository | https://github.com/filipton/esp-hal-wifimanager |
| max_upload_size | |
| id | 1758116 |
| size | 111,355 |
Easy to use Wifimanager for esp-hal (no-std).
If it can't connect to wifi it spawns BLE server (You can use chrome on android or windows to configure it) and open wifi accesspoint with DHCP server.
ap feature that will spawn ap to connect toble feature that will spawn ble server to connect toenv feature that will automatically setup wifi from env vars (for quick and easy testing)esp32c3/esp32s3/esp32 feature to select platform
If neither ap, ble nor env feature is selected, crate will fail to compile.
Obviously you need to select your platform (esp32s3 / esp32c3)
Env feature will automatically setup wifi after startup, to use it:
.cargo/config.toml filecargo run with WM_CONN env var like this:cargo run --config "env.WM_CONN='{\"ssid\": \"ssid\", \"psk\": \"pass\", \"data\": {}}'"
Add this to your Cargo.toml (note also add embassy, its only for async):
NOTE: this section is not updated, will update it sometime near feature.
[dependencies]
esp-hal = { version = "1.0.0-rc.0", features = [ "esp32s3", "unstable" ] }
esp-wifi = { version = "0.15.0", features = [ "esp32s3", "coex" ] }
esp-hal-embassy = { version = "0.9.0", features = ["esp32s3"] }
Simple example (to see full example check ./examples dir):
// ...
let nvs = esp_hal_wifimanager::Nvs::new(0x9000, 0x6000).unwrap();
let mut wm_settings = esp_hal_wifimanager::WmSettings::default();
let timg0 = esp_hal::timer::timg::TimerGroup::new(peripherals.TIMG0);
let wifi_res = esp_hal_wifimanager::init_wm(
wm_settings,
&spawner,
Some(&nvs),
rng.clone(),
timg0.timer0,
peripherals.WIFI,
peripherals.BT, // only if ble feature is enabled
None, // signal for ap/ble start
)
.await;
From wifi-coex example in esp-hal repo.
static mut HEAP: core::mem::MaybeUninit<[u8; 30 * 1024]> = core::mem::MaybeUninit::uninit();
#[link_section = ".dram2_uninit"]
static mut HEAP2: core::mem::MaybeUninit<[u8; 64 * 1024]> = core::mem::MaybeUninit::uninit();
unsafe {
esp_alloc::HEAP.add_region(esp_alloc::HeapRegion::new(
HEAP.as_mut_ptr() as *mut u8,
core::mem::size_of_val(&*core::ptr::addr_of!(HEAP)),
esp_alloc::MemoryCapability::Internal.into(),
));
// COEX needs more RAM - add some more
esp_alloc::HEAP.add_region(esp_alloc::HeapRegion::new(
HEAP2.as_mut_ptr() as *mut u8,
core::mem::size_of_val(&*core::ptr::addr_of!(HEAP2)),
esp_alloc::MemoryCapability::Internal.into(),
));
}