rust/bt-battery: Initial commit of the battery client

- Define a `BatteryMonitor` which can be used to scan for compatible LE
peers that support the BT Battery Service (BAS).
- Provide a mechanism for connecting to a compatible peer.
- Read and save the current battery level once a GATT connection is made.
- Add test utilities for setting up a mock peer battery service.

Test: cargo test

Change-Id: I643af01012c0487e11b5fa09afd49b96616f045c
Reviewed-on: https://bluetooth-review.git.corp.google.com/c/bluetooth/+/1660
Reviewed-by: Dayeong Lee <dayeonglee@google.com>
8 files changed
tree: 84d8c3eb00252e073f5b0e4fc070363863d3a982
  1. docs/
  2. rust/
  3. .gitignore
  4. AUTHORS
  5. CONTRIBUTING.md
  6. LICENSE
  7. OWNERS
  8. PATENTS
  9. README.md
README.md

Bluetooth Shared Libraries

What is this?

This is a repository for shared source libraries that can be useful for multiple Bluetooth stacks. Many of these are meant to be stack-agnostic and platform-agnostic and implement a useful part of a published Bluetooth specification.

It has been started as a repository for developing Rust crates but can be easily expanded to include libraries for other languages.

Structure

  • rust - Rust Crates