kawaiifi
kawaiifi is a Wi-Fi scanning library for Linux, macOS, and Windows.
It discovers local Basic Service Sets (BSSs) and reports their SSID, BSSID, signal strength, channel, channel width, security protocols, and information elements (IEs).
Usage
[]
= "0.2"
Obtaining a Wi-Fi Interface
Use kawaiifi::default_interface() to get the first available interface.
use Interface;
let interface: Interface = default_interface?.ok_or?;
Use kawaiifi::interfaces() to get all available interfaces.
use Interface;
let interfaces: = interfaces?;
Some Interface properties are platform-specific.
println!;
println!;
println!;
Triggering a Wi-Fi Scan
Blocking scans are triggered using Interface::scan_blocking().
use Scan;
let scan: Scan = interface.scan_blocking?;
Asynchronous scans are triggered using Interface::scan().
use Scan;
let scan: Scan = interface.scan.await?;
Accessing BSS Data
Scan contains a list of BSSs that are accessed through Scan::bss_list().
use Bss;
let bss_list: & = scan.bss_list;
println!;
Bss exposes common properties that are available on all platforms.
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
Some Bss properties are platform-specific.
println!;
println!;
println!;
Accessing Information Elements
Bss contains a list of 802.11 Information Elements (IEs) that are accessed through Bss::ies().
use Ie;
let ies: & = bss.ies;
println!;
Ie exposes basic properties such as the information element's name, ID,
and a summary.
println!;
Ie also exposes the information element's underlying data through Ie::data.
use IeData;
match &ie.data
Troubleshooting
See the repository troubleshooting notes for platform-specific permissions and location-services behavior.
Changelog
See the repository changelog for release notes.
License
Dual-licensed under MIT or Apache 2.0.