commit | 9cd1890faa52091ba7023de48d40f0066245404b | [log] [tgz] |
---|---|---|
author | Jayson Messenger <messengerj@google.com> | Tue Jul 26 10:34:37 2022 -0400 |
committer | Jayson Messenger <messengerj@google.com> | Wed Jul 27 14:03:12 2022 -0400 |
tree | a97801ac1d4d249b904d15f1579312228798682e | |
parent | 472702a9d9bfa692603f11e90ec847465ce439d6 [diff] |
Adding in context manager for Connection and Peer classes * Connection implements async context manager to disconnect when context is left * The Connection only calls disconnect if the context manager exits without an exception * Peer implements async context manager to discover when entering the context * Device.connect_as_gatt implements an async context manager to nest the connection and peer context managers * Added HCI_StatusError that can be raised when a HCI Command Status event is received that doesn't show "PENDING" as status * Added Connection.sustain to wait for a timeout or disconnect * Peer.sustain also maps to Connectin.sustain * Updated battery_client.py to use .connect_as_gatt and .sustain * Updated heart_rate_client.py to use .connect_as_gatt and .sustain
_ _ _ | | | | | | | |__ _ _ ____ | |__ | | _____ | _ \| | | | \| _ \| || ___ | | |_) ) |_| | | | | |_) ) || ____| |____/|____/|_|_|_|____/ \_)_____)
Bumble is a full-featured Bluetooth stack written entirely in Python. It supports most of the common Bluetooth Low Energy (BLE) and Bluetooth Classic (BR/EDR) protocols and profiles, including GAP, L2CAP, ATT, GATT, SMP, SDP, RFCOMM, HFP, HID and A2DP. The stack can be used with physical radios via HCI over USB, UART, or the Linux VHCI, as well as virtual radios, including the virtual Bluetooth support of the Android emulator.
Browse the pre-built Online Documentation, or see the documentation source under docs/mkdocs/src
, or build the static HTML site from the markdown text with:
mkdocs build -f docs/mkdocs/mkdocs.yml
Licensed under the Apache 2.0 License.
This is not an official Google product.
This library is in alpha and will be going through a lot of breaking changes. While releases will be stable enough for prototyping, experimentation and research, we do not recommend using it in any production environment yet. Expect bugs and sharp edges. Please help by trying it out, reporting bugs, and letting us know what you think!