Crate sbd [] [src]

Parse and write Iridium Short Burst Data (SBD) messages.

Background

Iridium is both a satellite constellation and a company that provides satellite communications. The Iridium network is used by phones, modems, and other communication devices.

One mode of transmitting data over the Iridium network is via Short Burst Data (SBD) messages. These messages carry a payload of some small number of bytes, usually less than one thousand. Messages can be Mobile-Originated (MO), meaning that they are sent from an Iridium modem, or Mobile-Terminated (MT), meaning that the are sent to an Iridium modem. Mobile-Originated messages are delivered either to an email address via MIME attachment, or directly to a given IP address and port via TCP; this second method is called DirectIP.

Usage

This is a simple library for reading mobile originated SBD messages from a stream, decoding their headers and data payloads, and writing them back to a stream. This library does not handle mobile terminated messages.

MO messages can be read from a byte stream:

let mut file = std::fs::File::open("data/0-mo.sbd").unwrap();
let message = sbd::mo::Message::read_from(file).unwrap();

To receive MO messages via DirectIP, a server is provided. This server will listen for incoming messages forever, storing them in a Storage:

let storage = sbd::storage::FilesystemStorage::open("/var/iridium").unwrap();
let mut server = sbd::directip::Server::new("0.0.0.0:10800", storage);
server.serve_forever();

Most of the functionality of this library is exposed by a single executable, named sbd. Use the sbd executable to inspect raw sbd files stores on a filesystem, interrogate sbd files on a filesystem, and start that forever-running server to receive Iridium SBD DirectIP messages.

Modules

directip

Receive incoming Iridium messages through their Direct IP service.

mo

Module for reading and writing Mobile-Originated (MO) SBD messages.

storage

Squirrel away SBD messages and retrieve them later.

Enums

Error

Crate-specific errors

Type Definitions

Result

Create-specific Result.