A Rusty interface for the RN2903 LoRa module's serial protocol
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
Leonora Tindall aa6d70b3a2
Add example for packet sending support
3週間前
docu Add documentation PDFs 8ヶ月前
examples Add example for packet sending support 3週間前
src add packet sending support 4ヶ月前
.gitignore Basic SerialPort wrapper 8ヶ月前
CHANGELOG.md This is 0.2 🎉 8ヶ月前
CONTRIBUTING.md Formalize release process 8ヶ月前
Cargo.lock add packet sending support 4ヶ月前
Cargo.toml add packet sending support 4ヶ月前
LICENSE.html Add GNU GPL v3 license, and package metadata 8ヶ月前
README.md Add LoRa and FSK packet reception 8ヶ月前

README.md

RN2903

A Rusty interface for the RN2903 LoRa module's serial protocol

The RN2903 is a LoRa and FSK transciever for the 915MHz ISM band, commonly used in USB devices like the LoStik.

This crate provides a safe, idiomatic interface using cross-platform native serial functionality via serialport. This supports, for instance, a LoStik connected to a USB TTY or virtual COM port, or a RN2903 connected via a TTL serial interface.

This crate is available under the GNU General Public License, version 3.0 only, and does not directly depend on unstable crates.

Example

For instance, here is a simple program which dumps all LoRa packets received.

use rn2903::{Rn2903, ModulationMode};

fn main() {
    let mut txvr = Rn2903::new_at("/dev/ttyUSB0")
        .expect("Could not open device. Error");
    txvr.mac_pause().unwrap();
    txvr.radio_set_modulation_mode(ModulationMode::LoRa).unwrap();
    loop {
        if let Some(packet) = txvr.radio_rx(65535).unwrap() {
            println!("{:?}", packet);
        }
    }
}

Module Documentation

This repository reproduces the relevant documents for the RN2903 module at command_reference-40001811B.pdf and datasheet-DS5000239H.pdf.