`atat` logo

`atat`

Free

Abstraction crate to ease writing AT based driver crates - [![crates.io](https://img.shields.io/crates/v/atat.svg)](https://crates.io/crates/atat)

FreeFree tier
Type
Open Source

About `atat`

ATAT is a #![no_std] Rust crate designed for parsing AT commands (Hayes command set) and acting as a driver support crate for AT-command based serial modules. It implements best practices from AT command handling, including flushing channels, detecting complete lines, handling URCs, and managing final result codes. The crate provides a state machine for the AT parser (idle, waiting_response, data_mode) and includes examples for embassy (embedded) and tokio (std) environments. It has been used to build drivers for U-Blox cellular and short-range modules. The crate is fully tested and open source.

Key Features

#![no_std] compatibility for embedded systems
Parses AT commands following the Hayes command set
Implements AT best practices: flushing, line detection, URC handling, final result codes
State machine for AT parser (idle, waiting_response, data_mode)
Examples for embassy (embedded) and tokio (std)
Full test coverage and CI
Supports logging command lines and responses for debugging
Used to build drivers for U-Blox cellular and short-range modules

Pros & Cons

Pros
  • no_std – works without standard library, ideal for microcontrollers
  • Well-documented best practices from real-world AT experience
  • Includes both embedded and std examples
  • Actively maintained and tested
  • Open source and free to use
  • Supports both async (embassy) and synchronous (tokio) use cases
Cons
  • Limited to parsing AT commands; does not handle all vendor-specific extensions
  • Requires familiarity with AT protocol and embedded Rust
  • No built-in support for non-AT command sets
  • Documentation may assume prior knowledge of AT specifications

Best For

Developing drivers for cellular modules (e.g., U-Blox)Building drivers for short-range wireless modules (e.g., U-Blox)Embedded IoT device communication with serial AT commandsLearning and implementing AT command parsing best practicesCreating no_std Rust drivers for any AT-command based hardware

FAQ

Does ATAT support no_std (embedded) environments?
Yes, ATAT is designed as a #![no_std] crate and works without the standard library, making it suitable for microcontroller-based systems.
Are there examples available for using ATAT?
Yes, the repository includes examples for embassy (embedded) and tokio (std) environments. You can build them with cargo run --bin embassy or cargo run --example std-tokio.
Which cellular modules is ATAT used with?
ATAT has been used to build initial drivers for U-Blox cellular modules (ublox-cellular-rs) and U-Blox short-range modules (ublox-short-range-rs).
Is ATAT free to use?
Yes, ATAT is open source (dual-licensed under MIT or Apache-2.0) and hosted on GitHub, free to use and contribute to.