directip-client

Crates.iodirectip-client
lib.rsdirectip-client
version0.2.0
sourcesrc
created_at2022-08-20 22:31:54.749012
updated_at2022-11-28 21:38:09.068913
descriptionIridium SBD Direct-IP communication client
homepage
repositoryhttps://github.com/castelao/DirectIP/tree/main/directip-client
max_upload_size
id649504
size32,043
Luiz Irber (luizirber)

documentation

https://docs.rs/directip-client

README

Iridium's SBD Direct-IP client

Iridium's Direct-IP protocol of Short Burst Data communication system.

This crate is focused on transmitting Mobile Terminated messages, often used to send commands to a remote station. For instance, it could be used to communicate with an under water glider (a scientific autonomous robot).

Install

MacOS (Apple Silicon)

curl -o directip -L https://github.com/castelao/DirectIP/releases/latest/download/directip-client-aarch64-apple-darwin
chmod +x directip

MacOS (Intel)

curl -o directip -L https://github.com/castelao/DirectIP/releases/latest/download/directip-client-x86_64-apple-darwin
chmod +x directip

Linux (arm)

curl -o directip -L https://github.com/castelao/DirectIP/releases/latest/download/directip-client-arm-unknown-linux-gnueabihf
chmod +x directip

Linux (x86_64)

curl -o directip -L https://github.com/castelao/DirectIP/releases/latest/download/directip-client-x86_64-unknown-linux-musl
chmod +x directip

Windows (x86_64)

Invoke-WebRequest -Uri 'https://github.com/castelao/DirectIP/releases/latest/download/directip-client-x86_64-pc-windows-msvc.exe' -OutFile directip

From source code

Install the Rust compiler if you don't already have it. Follow the instructions at https://www.rust-lang.org/tools/install

Compile it by running: cargo build --release -p directip-client

Options and customization

  • dry-run: Create a message and show in the screen without trying to transmit it.

  • encoding:

    • ascii: Default option. Expects a valid UTF-8.
    • binary: Transmit as it is.
    • hex: Not fully functional yet.
  • from-file: When used, it is expected a path to a file instead of the payload itself.

Examples

Note that the examples below expect a server running local. If that's not your case, you can add --dry-run to test it.

ASCII payload

Giving the payload as an argument:

directip-client --msg-id=987 --server 127.0.0.1:10800 --imei 012345678901234 "Hello World"

or chain it with another command and pass the payload through stdin:

echo "Hello World" | directip-client --msg-id=987 --server 127.0.0.1:10800 --imei 012345678901234

or load it from a file:

echo "Hello world" > ./my_command.txt

directip-client --server 127.0.0.1:10800 \
    --msg-id=987 \
    --imei 012345678901234 \
    --from-file ./my_command.txt

Binary payload

Chain it with another command to pass a binary payload using stdin:

head -c 8 /dev/urandom | directip-client --server 127.0.0.1:10800 --msg-id=987 --imei 012345678901234

or load it from a file:

head -c 8 /dev/urandom > ./my_command.txt

directip-client --server 127.0.0.1:10800 \
    --msg-id=987 \
    --imei 012345678901234 \
    --encoding=binary \
    --from-file ./my_command.txt

HEX payload

WIP

Minimum supported Rust version

Currently the minimum supported Rust version is 1.64.0

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 34

cargo fmt