wifi-rs icon indicating copy to clipboard operation
wifi-rs copied to clipboard

lib retruns "invalid password" irrespective of what i do

Open opeolluwa opened this issue 1 year ago • 0 comments

Hello there!

I was hoping to check the stability of this package, the application returns "Invalid password" irrespective of what I do, and this includes running the examples.

My environment

Rust version: rustc 1.77.1 OS type: macOS ( Ventura Version 13.6.4)

The Implementation

use wifi_rs::{prelude::*, WiFi};

fn main() -> Result<(), WifiConnectionError> {
    let config = Some(Config {
        interface: Some("wlo1"),
    });

    let mut wifi = WiFi::new(config);

    match wifi.connect("snowflakes", "@opeolluwa") {
        Ok(result) => println!(
            "{}",
            if result == true {
                "Connection Successful."
            } else {
                "Invalid password."
            }
        ),
        Err(err) => println!("The following error occurred: {:?}", err),
    }

    Ok(())
}

opeolluwa avatar May 13 '24 10:05 opeolluwa