feat: set hostname for the device

This commit is contained in:
2026-06-11 01:46:41 -05:00
parent 06d37ff5bd
commit d02fcbd2a6
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -83,7 +83,9 @@ async fn main(spawner: Spawner) -> ! {
)
.expect("Failed to initialize Wi-Fi controller");
let net_config = embassy_net::Config::dhcpv4(Default::default());
let mut dhcp_config = embassy_net::DhcpConfig::default();
dhcp_config.hostname = Some("cover-theif".try_into().unwrap());
let net_config = embassy_net::Config::dhcpv4(dhcp_config);
let rng = esp_hal::rng::Rng::new();
let seed = (rng.random() as u64) << 32 | rng.random() as u64;