no_std ESP-AT network layer

License License Crates.io Actions Status

Network layer implementation/client for ESP-AT implementing embedded-nal based on ATAT.

Currently, this crates offers the following features * Joining an WIFI access point, s. wifi module * TCP client stack (multi socket), s. stack module

Example

````rust use std::str::FromStr; use embeddednal::{SocketAddr, TcpClientStack}; use espatnal::example::ExampleTimer; use espatnal::wifi::{Adapter, WifiAdapter}; use crate::espat_nal::example::ExampleAtClient as AtClient;

let client = AtClient::default(); // Creating adapter with 1024 bytes TX and 256 RX block size let mut adapter: Adapter<_, _, 1_000_000, 1024, 256> = Adapter::new(client, ExampleTimer::default());

// Joining WIFI access point let state = adapter.join("test_wifi", "secret").unwrap(); assert!(state.connected);

// Creating a TCP connection let mut socket = adapter.socket().unwrap(); adapter.connect(&mut socket, SocketAddr::from_str("10.0.0.1:21").unwrap()).unwrap();

// Sending some data adapter.send(&mut socket, b"hallo!").unwrap(); ````

Development

Any form of support is greatly appreciated. Feel free to create issues and PRs. See DEVELOPMENT for more details.

License

Licensed under either of

Each contributor agrees that his/her contribution covers both licenses.