Module esp_at_nal::wifi

source ·
Expand description

§WIFI access point client

Joining a network and obtaining address information is supported.

Note: If the connection was not successful or is lost, the ESP-AT will try independently fro time to time (by default every second) to establish connection to the network. The status can be queried using get_join_state().

§Example

let client = AtClient::default();
let mut adapter: Adapter<_, _, 1_000_000, 256, 256> = Adapter::new(client, ExampleTimer::default());

// Setting target WIFI access point
adapter.join("test_wifi", "secret").unwrap();

// Waiting until a DCHP IP has been assigned
while !adapter.get_join_status().ip_assigned {}

let address = adapter.get_address().unwrap();
assert_eq!("10:fe:ed:05:ba:50", address.mac.unwrap().as_str());
assert_eq!("10.0.0.181", address.ipv4.unwrap().to_string());

Structs§

Enums§

  • Errors when receiving local address information
  • General errors for simple commands (e.g. enabling a configuration flag)
  • Possible errors when joining an access point

Traits§