Skip to main content

Bluetooth Low Energy (BLE) library for CircuitPython

Project description

Introduction

Documentation Status Discord Build Status Code Style: Black

This module provides higher-level BLE (Bluetooth Low Energy) functionality, building on the native _bleio module.

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Installing from PyPI

Warning: Linux support is very limited. See Adafruit Blinka _bleio for details.

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-ble

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-ble

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-ble

Usage Example

from adafruit_ble import BLERadio

radio = BLERadio()
print("scanning")
found = set()
for entry in radio.start_scan(timeout=60, minimum_rssi=-80):
    addr = entry.address
    if addr not in found:
        print(entry)
    found.add(addr)

print("scan done")

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adafruit-circuitpython-ble-9.0.1.tar.gz (56.0 kB view details)

Uploaded Source

Built Distribution

adafruit_circuitpython_ble-9.0.1-py3-none-any.whl (37.1 kB view details)

Uploaded Python 3

File details

Details for the file adafruit-circuitpython-ble-9.0.1.tar.gz.

File metadata

File hashes

Hashes for adafruit-circuitpython-ble-9.0.1.tar.gz
Algorithm Hash digest
SHA256 2b597c9e8ddeb39dd25737c3344c789faefc81f672c48bc7ddf63f10467b0a7a
MD5 3e4434ee7da027c67efe03f4b26d1930
BLAKE2b-256 a282a4fb32534651ae279160147e4abf6111b26444e7a901868aceaacf0da214

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_ble-9.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_ble-9.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a5655076d1a6f22a13448ad90f855caa2812aae7e349373856fa536aa9fc013f
MD5 48e23d624551501f8bbc67f105af20ec
BLAKE2b-256 329ca741231c55cd748b22d2e2814fed3a509430aa88cbec97d98e7cc1311d09

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page