All Projects → BlackbirdHQ → atat

BlackbirdHQ / atat

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT
no_std crate for parsing AT commands

Programming Languages

rust
11053 projects
RPC
45 projects

Projects that are alternatives of or similar to atat

pwm-pca9685-rs
Platform-agnostic Rust driver for the PCA9685 I2C 16-channel, 12-bit PWM/Servo/LED controller
Stars: ✭ 19 (-62%)
Mutual labels:  embedded, no-std, embedded-hal-driver
lwprintf
Lightweight printf library optimized for embedded systems
Stars: ✭ 98 (+96%)
Mutual labels:  embedded, uart
async-stm32f1xx
Abstractions for asynchronous programming on the STM32F1xx family of microcontrollers.
Stars: ✭ 24 (-52%)
Mutual labels:  embedded, no-std
drone-cortexm
ARM® Cortex®-M platform crate for Drone, an Embedded Operating System.
Stars: ✭ 31 (-38%)
Mutual labels:  embedded, no-std
embedded-ccs811-rs
Platform agnostic Rust driver for the CCS811 ultra-low power digital gas sensor for monitoring indoor air quality
Stars: ✭ 12 (-76%)
Mutual labels:  embedded, embedded-hal-driver
bigbug
Easy Microcontroller Debugging Tool
Stars: ✭ 37 (-26%)
Mutual labels:  embedded, uart
gdbstub
An ergonomic and easy-to-integrate implementation of the GDB Remote Serial Protocol in Rust, with full no_std support.
Stars: ✭ 158 (+216%)
Mutual labels:  embedded, no-std
IOsonata
IOsonata multi-platform multi-architecture power & performance optimized software library for fast and easy IoT MCU firmware development. Object Oriented design, no board package to define, just pure plug & play any boards
Stars: ✭ 40 (-20%)
Mutual labels:  embedded, uart
Drone Core
The core crate for Drone, an Embedded Operating System.
Stars: ✭ 263 (+426%)
Mutual labels:  embedded, no-std
Rhai
Rhai - An embedded scripting language for Rust.
Stars: ✭ 958 (+1816%)
Mutual labels:  embedded, no-std
Wyhash Rs
wyhash fast portable non-cryptographic hashing algorithm and random number generator in Rust
Stars: ✭ 44 (-12%)
Mutual labels:  embedded, no-std
cassette
A simple, single-future, non-blocking executor intended for building state machines. Designed to be no-std and embedded friendly.
Stars: ✭ 47 (-6%)
Mutual labels:  embedded, no-std
littlefs2
Idiomatic Rust API for littlefs
Stars: ✭ 19 (-62%)
Mutual labels:  embedded, no-std
Drone
CLI utility for Drone, an Embedded Operating System.
Stars: ✭ 114 (+128%)
Mutual labels:  embedded, no-std
uart
serial com api
Stars: ✭ 37 (-26%)
Mutual labels:  embedded, uart
lv lib split jpg
JPG decoder for LVGL
Stars: ✭ 22 (-56%)
Mutual labels:  embedded
stm32f7xx-hal
A Rust embedded-hal HAL for all MCUs in the STM32 F7 family
Stars: ✭ 71 (+42%)
Mutual labels:  embedded
tensorflow-on-orangepi-zero
Tensorflow for Orange PI Zero
Stars: ✭ 16 (-68%)
Mutual labels:  embedded
micropython-micropower
Support for building ultra low power systems based on the Pyboard (1.x and D series).
Stars: ✭ 44 (-12%)
Mutual labels:  embedded
bx-github-ci
This tutorial provides one example on how a CI (Continuous Integration) workflow with the IAR Build Tools for Linux can be set up on GitHub. The IAR Build Tools on Linux are available for Arm, RISC-V and Renesas (RH850, RL78 and RX).
Stars: ✭ 20 (-60%)
Mutual labels:  embedded

ATAT

Test Code coverage Crates.io Version Crates.io Downloads chat No Std

ATAT

#![no_std] crate for parsing AT commands (Hayes command set)

A driver support crate for AT-command based serial modules, using the embedded-hal traits.

AT Best practices

This crate attempts to work from these AT best practices:

  • The DTE shall flush the AT channel (i.e. check if there are data waiting to be read) before sending a new AT command
  • The DTE shall detect/process complete lines (see the S3, S4 and V0/V1 settings), so they can be processed with a function that handles responses
  • The DTE shall handle the case of unexpected spaces or line endings
  • The DTE shall handle all the URCs: it can simply ignore them (not suggested) or, better, take a proper action
  • The DTE shall know what answer is expected and shall wait until it is received (i.e. final result code only or informationtext response + final result code)
  • The final result code marks the end of an AT command and can be OK, ERROR or ABORTED: when the final result is an error, be sure to handle it before continuing with the next AT command
  • The information text response format is command specific. The DTE will need explicit handling for each one. It is suggested to consult the u-blox AT Commands Manual [1]
  • It is suggested not to strictly parse information text responses but to checkif they contain interesting keywords and/or parameters
  • The DTE shall know if the issued AT command can be aborted or not
  • Some AT commands could output the final result code after some seconds, in this case check on AT manual for the suggested estimated response time. If the timeout expires then a decision should be taken accordingly: e.g. if the command can be aborted then try to abort it, etc ...
  • It is very useful, for debugging an application, to log all the command lines sent to the DCE and what is received from it
  • Create a state machine for the AT parser (i.e. idle, waiting_response, data_mode)
  • The DTE shall wait some time (the recommended value is at least 20 ms) after the reception of an AT command final response or URC before issuing a new AT commandto give the module the opportunity to transmit the buffered URCs. Otherwise the collision of the URCs with the subsequent AT command is still possible
  • The DTE shall be aware that, when using a serial port without HW flow control, the first character is used to wake up the module from power saving

Documentation

Tests

The crate is covered by tests. These tests can be run by cargo test --tests, and are run by the CI on every push.

Examples

The crate has examples for usage with cortex-m-rt and cortex-m-rtic crates.

The samples can be built using cargo build --example cortex-m-rt --target thumbv7em-none-eabihf and cargo build --example rtic --target thumbv7em-none-eabihf.

Furthermore I have used the crate to build initial WIP drivers for uBlox cellular modules (ublox-cellular-rs) and uBlox short-range modules (ublox-short-range-rs)

Releasing to crates.io

This workspace uses cargo-release to do workspace releases to crates.io. It can be installed through cargo with cargo install cargo-release. The steps involved in a new release are:

  1. Run cargo release --dry-run -- major|minor|patch, and verify the output
  2. Run cargo release -- major|minor|patch, to release

About

  • Minimum rustc version 1.52
  • Tested and built using stable toolchain

Supported Crates

The following dependent crates provide platform-agnostic device drivers built on embedded-hal which also implement this crate's traits:

Device Name Description Crate + Docs
ublox-short-range-rs Driver crate for U-Blox host-based short range devices (wifi and BT) with AT-command interface crates.io docs.rs
ublox-cellular-rs Driver crate for U-Blox host-based cellular devices with AT-command interface crates.io docs.rs
espresso AT based driver crate for ESP8266 WiFi modules

Features

  • derive: Enabled by default. Re-exports atat_derive to allow deriving Atat__ traits.
  • bytes: Enabled by default. Re-exports serde-bytes & heapless-bytes to allow serializing & deserializing non-quoted byte slices correctly.
  • log: Disabled by default. Enable log statements on various log levels to aid debugging. Powered by log.
  • defmt: Disabled by default. Enable defmt log statements on various log levels to aid debugging. Powered by defmt.
  • custom-error-messages: Disabled by default. Allows errors to contain custom error messages up to 64 characters, parsed by AtDigest::custom_error.

Chat / Getting Help

If you have questions on the development of AT-AT or want to write a driver based on it, feel free to join our matrix room at #atat:matrix.org!

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].