Expand description
A crate to list WiFi hotspots in your area.
As of v0.5.x now supports macOS, Linux and Windows. :tada:
§Usage
This crate is on crates.io and can be
used by adding tokio-wifiscanner to the dependencies in your project’s Cargo.toml.
[dependencies]
tokio-wifiscanner = "0.2.*"and this to your crate root:
extern crate tokio_wifiscanner;§Example
#[tokio::main(flavor = "current_thread")]
async fn main() {
let networks = tokio_wifiscanner::scan().await.expect("Cannot scan network");
for network in networks {
println!(
"{} {:15} {:10} {:4} {}",
network.mac, network.ssid, network.channel, network.signal_level, network.security
);
}
}Alternatively if you’ve cloned the the Git repo, you can run the above examples
using: cargo run --example scan.
Structs§
- Wifi
- Wifi struct used to return information about wifi hotspots
Enums§
Functions§
- scan
- Returns a list of WiFi hotspots in your area.
Uses
airporton macOS andiwon Linux.