Crates.io | esp8266-wifi-serial |
lib.rs | esp8266-wifi-serial |
version | 0.1.3 |
source | src |
created_at | 2021-07-28 12:42:12.100586 |
updated_at | 2021-08-02 19:40:35.510821 |
description | A driver to work with the esp8266 module over the serial port. |
homepage | |
repository | https://github.com/alekseysidorov/esp8266-wifi-serial |
max_upload_size | |
id | 428337 |
size | 52,527 |
(WIP) Driver to work with the esp8266 module over the serial port.
By using this module you can join the existing access point or creating your own. After a network creation, the module can both listen to incoming TCP connections or connect to other sockets.
let mut module = Module::new(rx, tx, clock).expect("unable to create module");
// Create a new access point.
let mut session = SoftApConfig {
ssid: "test_network",
password: "12345678",
channel: 4,
mode: WifiMode::Open,
}
.start(module)
.expect("unable to start network sesstion");
// Start listening for incoming connections on the specified port.
session.listen(2048).unwrap();
// Start an event loop.
loop {
let event = nb::block!(session.poll_network_event()).expect("unable to poll network event");
// Some business logic.
}
Warning: this library is not finished yet and it is not worth using it in mission-critical software, it can burn your hamster.
The crate was been tested with the gd32vf103
board.
I will be happy to see new contributions to the development of this crate.