Some fixes for the examples and the crate

This commit is contained in:
Israel Duff
2021-02-03 19:39:18 +01:00
parent 69fb3ae92b
commit f55eac147b
6 changed files with 54 additions and 6 deletions
+24
View File
@@ -0,0 +1,24 @@
extern crate wifi_rs;
use std::io;
use wifi_rs::WiFi;
use wifi_rs::prelude::*;
fn main() -> Result<(), io::Error> {
let config = Some(Config {
interface: Some("wlo1"),
});
let mut wifi = WiFi::new(config);
let config = HotspotConfig::new(Some(HotspotBand::Bg), Some(Channel::One));
wifi.create_hotspot(
"test-hotspot",
"password",
Some(
&config
)
);
Ok(())
}