Crate kenwood_thd75

Crate kenwood_thd75 

Source
Expand description

Async Rust library for controlling the Kenwood TH-D75 transceiver via CAT (Computer Aided Transceiver) – the serial command protocol Kenwood uses for remote radio control.

This library supports all 55 CAT commands over USB serial or Bluetooth SPP connections. Command definitions and validation rules are based on analysis of TH-D75 firmware v1.03.000.

§TH-D75 overview (per User Manual Chapter 28)

  • Models: TH-D75A (144/220/430 MHz tribander, Americas) and TH-D75E (144/430 MHz dual bander, Europe/UK).
  • TX power: 5 W / 2 W / 0.5 W / 0.05 W (4 steps).
  • Modulation: FM, NFM, DV (D-STAR GMSK), AM, LSB, USB, CW, WFM.
  • Frequency stability: +/-2.0 ppm.
  • Operating temperature: -20 to +60 C (-10 to +50 C with KNB-75LA).
  • Receiver: Band A double superheterodyne (1st IF 57.15 MHz, 2nd IF 450 kHz); Band B double/triple superheterodyne (1st IF 58.05 MHz, 2nd IF 450 kHz, 3rd IF 10.8 kHz for SSB/CW/AM).
  • Audio output: 400 mW or more at 8 ohm (7.4 V, 10% distortion).
  • Memory: 1000 channels, 1500 repeater lists, 30 hotspot lists.
  • Weatherproof: IP54/55.
  • Bluetooth: 3.0, Class 2, HSP + SPP profiles.
  • GPS: built-in receiver, TTFF cold ~40s / hot ~5s, 10 m accuracy.
  • microSD: 2-32 GB (FAT32), for config, recordings, GPS logs.

§Usage

use kenwood_thd75::transport::SerialTransport;
use kenwood_thd75::radio::Radio;
use kenwood_thd75::types::Band;

// Connect over USB serial.
let transport = SerialTransport::open("/dev/cu.usbmodem1234", 115_200)?;
let mut radio = Radio::connect(transport).await?;

// Verify the radio identity.
let info = radio.identify().await?;
println!("Connected to: {}", info.model);

// Read the current frequency on Band A.
let channel = radio.get_frequency(Band::A).await?;
println!("RX frequency: {} Hz", channel.rx_frequency.as_hz());

// Disconnect cleanly.
radio.disconnect().await?;

§Modules

  • types — Validated newtypes for frequencies, tones, modes, and channels.
  • protocol — Pure-logic CAT command codec (serialize / parse).
  • transport — Async I/O trait and serial / mock implementations.
  • radio — High-level async API wrapping the protocol and transport layers.
  • aprs — KISS TNC framing, AX.25 packet parsing, and APRS position decoding.
  • mmdvm — MMDVM serial protocol codec, D-STAR header, and slow data decoder.
  • error — Error types for transport, protocol, and validation failures.

Re-exports§

pub use error::Error;
pub use radio::Radio;
pub use radio::programming::McpSpeed;
pub use transport::EitherTransport;
pub use transport::MockTransport;
pub use transport::SerialTransport;
pub use transport::Transport;
pub use memory::MemoryError;
pub use memory::MemoryImage;
pub use aprs::client::AprsClient;
pub use aprs::client::AprsClientConfig;
pub use aprs::client::AprsEvent;
pub use radio::kiss_session::KissSession;
pub use radio::mmdvm_session::MmdvmSession;
pub use mmdvm::DStarEvent;
pub use mmdvm::DStarGateway;
pub use mmdvm::DStarGatewayConfig;
pub use mmdvm::LastHeardEntry;
pub use mmdvm::ReconnectPolicy;
pub use sdcard::SdCardError;
pub use sdcard::config::ConfigHeader;
pub use sdcard::config::write_d75;

Modules§

aprs
TH-D75-specific APRS integration.
error
Error types for the kenwood-thd75 library.
memory
Typed access to the TH-D75 memory image.
mmdvm
D-STAR gateway client for the TH-D75.
protocol
Pure-logic CAT (Computer Aided Transceiver) command codec.
radio
High-level async API for controlling a Kenwood TH-D75 transceiver.
sdcard
SD card file format parsers for the TH-D75.
transport
Async transport trait and implementations for radio communication.
types
Strong types with validation-on-construction for all TH-D75 radio parameters.

Structs§

AprsDataExtension
Parsed APRS data extensions from the position comment field.
AprsIsClient
Async TCP client for APRS-IS.
AprsIsConfig
APRS-IS (Internet Service) client configuration.
AprsItem
An APRS item report (data type ) ).
AprsMessage
An APRS message (data type :) addressed to a specific station or group.
AprsMessenger
Manages APRS message send/receive with automatic ack/retry.
AprsObject
An APRS object report (data type ;).
AprsPosition
A parsed APRS position report.
AprsStatus
An APRS status report (data type >).
AprsTelemetry
Parsed APRS telemetry report.
AprsWeather
An APRS weather report.
Ax25Address
An AX.25 v2.2 address: a 1-6 char callsign plus a 0-15 SSID, with the has-been-repeated (H-bit) and command/response (C-bit) flags that ride on the wire SSID byte.
Ax25Packet
A parsed AX.25 UI (Unnumbered Information) frame.
DigipeaterConfig
Digipeater configuration.
KissFrame
A decoded KISS frame.
ModemStatus
Parsed modem status response.
Phg
Power-Height-Gain-Directivity data (APRS101 Chapter 7).
SmartBeaconing
SmartBeaconing algorithm for adaptive APRS position beacon timing.
SmartBeaconingConfig
Configuration for the SmartBeaconing algorithm.
StationEntry
A single station’s latest state.
StationList
Tracks APRS stations heard on the network.

Enums§

AprsData
A parsed APRS data frame, covering all major APRS data types.
AprsError
Errors produced by APRS parsing, building, and stateful algorithms.
AprsIsError
Errors that can occur during APRS-IS operations.
AprsIsEvent
An event from the APRS-IS server.
AprsQuery
Parsed APRS query.
Ax25Error
Errors produced by AX.25 frame encode/decode and address construction.
DigiAction
Result of digipeater processing.
KissError
Errors that can occur during KISS frame processing.
MmdvmError
Errors produced by the MMDVM codec.
ModemMode
Modem operating mode (see MODE_* byte constants).
NakReason
NAK response reason code.

Functions§

aprs_is_passcode
Compute the APRS-IS passcode from a callsign.
build_aprs_item
Build a KISS-encoded APRS item report.
build_aprs_message
Build a KISS-encoded APRS message packet.
build_aprs_mice
Build a Mic-E encoded APRS position report for KISS transmission.
build_aprs_object
Build a KISS-encoded APRS object report.
build_aprs_position_compressed
Build a KISS-encoded APRS compressed position report.
build_aprs_position_report
Build a KISS-encoded APRS uncompressed position report.
build_aprs_status
Build a KISS-encoded APRS status report.
build_aprs_weather
Build a KISS-encoded positionless APRS weather report.
build_login_string
Build the APRS-IS login string.
build_query_response_position
Build a position query response as a KISS-encoded APRS position report.
format_is_packet
Format an APRS packet for transmission to APRS-IS.
parse_aprs_extensions
Parse data extensions from an APRS position comment string.
parse_is_line
Parse an APRS-IS server line.