ebyte-e32-rs

Platform-agnostic driver for Ebyte E32 LoRa modules.

Uses embedded-hal for interfacing with a serial port, an input pin (AUX), and two output pins(M0, M1).

CLI and GUI frontends for the driver (Linux)

Demo Project (STM32F411)

Example

```rust, norun use ebytee32::{ mode::Normal, parameters::{AirBaudRate, Persistence}, Ebyte, }; use embeddedhal::{ blocking::delay, digital::v2::{InputPin, OutputPin}, serial, }; use embeddedhal::digital::v2::ToggleableOutputPin; use std::fmt::Debug;

pub fn simpletestebyte( mut ebyte: Ebyte, mut led: LED, mut delay: impl delay::DelayMs, ) where S: serial::Read + serial::Write, >::Error: Debug, >::Error: Debug, AUX: InputPin, M0: OutputPin, M1: OutputPin, D: delay::DelayMs, LED: ToggleableOutputPin, LED::Error: Debug, { let modeldata = ebyte.modeldata().unwrap(); let mut params = ebyte.parameters().unwrap();

println!("{model_data:#?}");
println!("{params:#?}");

params.air_rate = AirBaudRate::Bps300;
params.channel = 23;

ebyte
    .set_parameters(&params, Persistence::Temporary)
    .unwrap();

let params = ebyte.parameters().unwrap();
println!("{:#?}", params);

loop {
    delay.delay_ms(5000u32);
    println!("Sending it!");
    ebyte.write_buffer(b"it").unwrap();
    led.toggle().unwrap();
}

} ```

Supported E32 LoRa Modules

I tested so far with an E32-433T30D and an E32-868T20D. According to the datasheet, the differences between the modules are minor, but do check: chapter 11 "E32 series" lists some differences. For example, E32-170T30D only supports baud rates up to 9.6k. Please report or PR if you find something that doesn't work.

Crate Features

Known Limitations

Module Graph

modules

Dependency Graph

(Note this doesn't include the optional feature value_enum)

dependencies