Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
]
steps:
- name: Cache
uses: mozilla-actions/sccache-action@v0.0.7
uses: mozilla-actions/sccache-action@v0.0.10
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Rust toolchain for RISC-V
if: ${{ !contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.device.soc) }}
uses: dtolnay/rust-toolchain@v1
Expand All @@ -45,10 +45,10 @@ jobs:
components: rust-src, clippy, rustfmt
- name: Setup Rust toolchain for Xtensa
if: ${{ contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.device.soc) }}
uses: esp-rs/xtensa-toolchain@v1.5
uses: esp-rs/xtensa-toolchain@v1.7.0
with:
ldproxy: false
version: 1.88.0.0 # bumped from 1.86.0.0 since darling, esp-hal, etc require >=1.88
version: 1.96.0

- name: Build project
run: cargo +${{ matrix.device.toolchain }} build-${{ matrix.device.soc }}
Expand All @@ -65,7 +65,7 @@ jobs:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Stable Rust Toolchain
uses: dtolnay/rust-toolchain@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Stable Rust Toolchain
uses: dtolnay/rust-toolchain@v1
with:
target: riscv32imac-unknown-none-elf
toolchain: stable
- name: Package test
run: cargo test-ota
run: cargo test-ota
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ssh-stamp-esp32/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ edge-nal-embassy = { workspace = true }
heapless = { workspace = true }

esp-hal = { workspace = true }
esp-radio = { version = "0.18", features = ["wifi", "log-04"] }
esp-radio = { version = "1.0.0-beta.0", features = ["wifi", "log-04"] }
esp-storage = { version = "0.9" }
esp-bootloader-esp-idf = { version = "0.5" }
esp-alloc = { version = "0.10" }
Expand Down
14 changes: 8 additions & 6 deletions ssh-stamp-esp32/src/network/wifi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ use embassy_time::{Duration, Timer};
use esp_hal::peripherals::WIFI;
use esp_hal::rng::Rng;
use esp_radio::wifi::{
AuthenticationMethod, Config as RadioConfig, ControllerConfig, Interface as WifiInterface,
WifiController, ap::AccessPointConfig,
AuthenticationMethod, Config as RadioConfig, ControllerConfig, Interface, WifiController,
ap::AccessPointConfig,
};
use log::{debug, error, warn};
use ssh_stamp_hal::{HalError, NetworkProviderHal, WifiApConfigStatic, WifiError, WifiHal};
Expand Down Expand Up @@ -103,8 +103,10 @@ impl NetworkProviderHal for EspWifi {
.with_password(password.clone()),
);

let ap_interface = Interface::access_point();

let controller_config = ControllerConfig::default().with_initial_config(ap_radio_config);
let (wifi_controller, interfaces) = esp_radio::wifi::new(wifi_peri, controller_config)
let wifi_controller = WifiController::new(wifi_peri, controller_config)
.map_err(|_| HalError::Wifi(WifiError::Initialization))?;

let net_config = embassy_net::Config::ipv4_static(StaticConfigV4 {
Expand All @@ -116,7 +118,7 @@ impl NetworkProviderHal for EspWifi {
let seed = u64::from(self.rng.random()) << 32 | u64::from(self.rng.random());

let (ap_stack, runner) = embassy_net::new(
interfaces.access_point,
ap_interface,
net_config,
RESOURCES_CELL.init(StackResources::<3>::new()),
seed,
Expand Down Expand Up @@ -180,7 +182,7 @@ pub async fn accept_requests<'a>(

/// Manages the `WiFi` access point lifecycle.
///
/// In esp-radio 0.18+, `set_config` both configures and starts the radio.
/// In esp-radio 1.0+, `set_config` both configures and starts the radio.
/// We call it once and retry only on error, preserving client connections.
#[embassy_executor::task]
pub async fn wifi_up(
Expand Down Expand Up @@ -214,7 +216,7 @@ pub async fn wifi_up(

/// Network task for Embassy executor.
#[embassy_executor::task]
pub async fn net_up(mut runner: Runner<'static, WifiInterface<'static>>) {
pub async fn net_up(mut runner: Runner<'static, Interface>) {
debug!("Bringing up network stack...");
runner.run().await;
}
Expand Down
Loading