feat: set hostname for the device
This commit is contained in:
+3
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user