Crates.io | tokio-wifiscanner |
lib.rs | tokio-wifiscanner |
version | 0.2.1 |
source | src |
created_at | 2021-01-25 13:34:42.987343 |
updated_at | 2021-01-25 16:05:49.953672 |
description | List WiFi hotspots in your area |
homepage | |
repository | https://github.com/mic90/tokio-wifiscanner |
max_upload_size | |
id | 346476 |
size | 42,074 |
The project is a simple tokio wrapper around wifiscanner library.
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;
#[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 Git repo, you can run the above example
using: cargo run --example scan
.