tokio-wifiscanner

Crates.iotokio-wifiscanner
lib.rstokio-wifiscanner
version0.2.2
sourcesrc
created_at2021-01-25 13:34:42.987343
updated_at2024-11-30 13:04:05.101293
descriptionList WiFi hotspots in your area
homepage
repositoryhttps://github.com/mic90/tokio-wifiscanner
max_upload_size
id346476
size51,276
MichaƂ Mania (mic90)

documentation

https://docs.rs/tokio-wifiscanner

README

tokio-wifiscanner

The project is a simple tokio wrapper around wifiscanner library.

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 Git repo, you can run the above example using: cargo run --example scan.

Commit count: 11

cargo fmt