kiss-tnc

Crates.iokiss-tnc
lib.rskiss-tnc
version0.2.2
sourcesrc
created_at2021-10-17 14:16:14.31936
updated_at2022-12-28 16:48:46.914848
descriptionA library to connect to KISS TNCs, such as Direwolf
homepage
repositoryhttps://gitlab.scd31.com/stephen/kiss-tnc
max_upload_size
id466203
size15,671
Stephen D (scd31)

documentation

README

kiss-tnc

Kiss-tnc is a library for connecting to KISS TNCs, such as Direwolf. It can be used to read and write frames, which can be useful for APRS and AX.25 utilities.

Example

use kiss_tnc::Tnc;

tokio_test::block_on(async {
    let mut tnc = Tnc::connect_tcp("localhost:8001") // Direwolf default port number
                  .await.expect("Could not connect to KISS TNC");
    tnc.send_frame("Hello world!".as_bytes()); // Send "Hello world!" over the air
    tnc.flush();

    // Reads a frame from the TNC
    // In most cases you can ignore `port` - it only matters if
    // you have multiple channels
    let (_port, data) = tnc.read_frame().await.expect("Could not read frame");
    println!("{:?}", data);
});
Commit count: 0

cargo fmt