7 releases

0.2.2 Dec 28, 2022
0.2.1 Dec 19, 2022
0.1.3 Jan 16, 2022
0.1.2 Nov 5, 2021
0.1.1 Oct 23, 2021

#1242 in Network programming

Download history 31/week @ 2024-02-18 46/week @ 2024-02-25 28/week @ 2024-03-03 55/week @ 2024-03-10 9/week @ 2024-03-17 126/week @ 2024-03-31

196 downloads per month
Used in 2 crates (via minipac)

MIT license

15KB
319 lines

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);
});

lib.rs:

KISS TNC client for Rust

Usage

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);
});

Dependencies

~3–13MB
~128K SLoC