All Projects → hbldh → Bleak

hbldh / Bleak

Licence: mit
Bluetooth Low Energy platform Agnostic Klient for Python

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Bleak

rpi3-bluetooth
Raspberry Pi 3 on-board Bluetooth example
Stars: ✭ 17 (-95.9%)
Mutual labels:  bluetooth, bluetooth-low-energy
JDY-08
JDY-08 Bluetooth transparent transmission module, with resource for KiCAD
Stars: ✭ 48 (-88.43%)
Mutual labels:  bluetooth, bluetooth-low-energy
pirowflo
All-in-one data interface for your Waterrower S4 Monitor or Smartrow
Stars: ✭ 73 (-82.41%)
Mutual labels:  bluetooth, bluetooth-low-energy
pybluez-examples
Example Bluetooth tasks using the Python PyBluez module
Stars: ✭ 59 (-85.78%)
Mutual labels:  bluetooth, bluetooth-low-energy
pyscrlink
Scratch-link for Linux written in python
Stars: ✭ 88 (-78.8%)
Mutual labels:  bluetooth, bluetooth-low-energy
ruuvitag-demo
Demo of reading Bluetooth Low Energy sensor measurements of RuuviTag environmental sensors and feeding them to MQTT, a database and dashboards
Stars: ✭ 14 (-96.63%)
Mutual labels:  bluetooth, bluetooth-low-energy
IoT-iBeacon
An Ionic app for indoor localization and navigation using BLE iBeacons.
Stars: ✭ 39 (-90.6%)
Mutual labels:  bluetooth, bluetooth-low-energy
android-ble-made-easy
An Android Library for handling Bluetooth Low Energy on Android Easy
Stars: ✭ 34 (-91.81%)
Mutual labels:  bluetooth, bluetooth-low-energy
bluer
BlueR — Official BlueZ Bindings for Rust
Stars: ✭ 43 (-89.64%)
Mutual labels:  bluetooth, bluetooth-low-energy
bluenet
Bluenet is the in-house firmware on Crownstone hardware. Functions: switching, dimming, energy monitoring, presence detection, indoor localization, switchcraft.
Stars: ✭ 79 (-80.96%)
Mutual labels:  bluetooth, bluetooth-low-energy
Plibsys
Highly portable C system library: threads and synchronization primitives, sockets (TCP, UDP, SCTP), IPv4 and IPv6, IPC, hash functions (MD5, SHA-1, SHA-2, SHA-3, GOST), binary trees (RB, AVL) and more. Native code performance.
Stars: ✭ 402 (-3.13%)
Mutual labels:  platform-independent, cross-platform
Blegattcoroutines
Functional Bluetooth GATT for Android (all the meanings)
Stars: ✭ 343 (-17.35%)
Mutual labels:  bluetooth-low-energy, bluetooth
BleLab
Bluetooth LE Lab - UWP application for interaction with BLE GATT devices
Stars: ✭ 68 (-83.61%)
Mutual labels:  bluetooth, bluetooth-low-energy
deskbluez
Connects to a low energy actuator system via bluetooth and allows remote control via command line or internal managed interface.
Stars: ✭ 56 (-86.51%)
Mutual labels:  bluetooth, bluetooth-low-energy
ble-utilities-unreal
This is Unreal Engine plugin that allows to scan for BLE devices with Cycling Power service running, connect to one of them and subscribe for its notifications.
Stars: ✭ 48 (-88.43%)
Mutual labels:  bluetooth, bluetooth-low-energy
IOS-DFU-Library
OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs
Stars: ✭ 400 (-3.61%)
Mutual labels:  bluetooth, bluetooth-low-energy
bluetooth-manager
Java Bluetooth Manager. A library/framework for managing bluetooth adapters, bluetooth devices, GATT services and characteristics
Stars: ✭ 75 (-81.93%)
Mutual labels:  bluetooth, bluetooth-low-energy
ble-heart-rate-demo
Web bluetooth heart rate monitor
Stars: ✭ 24 (-94.22%)
Mutual labels:  bluetooth, bluetooth-low-energy
cannon-bluetooth-remote
Python script to emulate Canon's BR-E1 remote
Stars: ✭ 22 (-94.7%)
Mutual labels:  bluetooth, bluetooth-low-energy
Blynk Library
Blynk library for embedded hardware. Works with Arduino, ESP8266, Raspberry Pi, Intel Edison/Galileo, LinkIt ONE, Particle Core/Photon, Energia, ARM mbed, etc.
Stars: ✭ 3,305 (+696.39%)
Mutual labels:  bluetooth-low-energy, bluetooth

===== bleak

.. figure:: https://raw.githubusercontent.com/hbldh/bleak/master/Bleak_logo.png :target: https://github.com/hbldh/bleak :alt: Bleak Logo :scale: 50%

.. image:: https://github.com/hbldh/bleak/workflows/Build%20and%20Test/badge.svg :target: https://github.com/hbldh/bleak/actions?query=workflow%3A%22Build+and+Test%22 :alt: Build and Test

.. image:: https://img.shields.io/pypi/v/bleak.svg :target: https://pypi.python.org/pypi/bleak

.. image:: https://readthedocs.org/projects/bleak/badge/?version=latest :target: https://bleak.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black

Bleak is an acronym for Bluetooth Low Energy platform Agnostic Klient.

Bleak is a GATT client software, capable of connecting to BLE devices acting as GATT servers. It is designed to provide a asynchronous, cross-platform Python API to connect and communicate with e.g. sensors.

Installation

.. code-block:: bash

$ pip install bleak

Features

  • Supports Windows 10, version 16299 (Fall Creators Update) or greater
  • Supports Linux distributions with BlueZ >= 5.43
  • OS X/macOS support via Core Bluetooth API, from at least OS X version 10.11

Bleak supports reading, writing and getting notifications from GATT servers, as well as a function for discovering BLE devices.

Usage

To discover Bluetooth devices that can be connected to:

.. code-block:: python

import asyncio
from bleak import BleakScanner

async def run():
    devices = await BleakScanner.discover()
    for d in devices:
        print(d)

loop = asyncio.get_event_loop()
loop.run_until_complete(run())

Connect to a Bluetooth device and read its model number:

.. code-block:: python

import asyncio
from bleak import BleakClient

address = "24:71:89:cc:09:05"
MODEL_NBR_UUID = "00002a24-0000-1000-8000-00805f9b34fb"

async def run(address):
    async with BleakClient(address) as client:
        model_number = await client.read_gatt_char(MODEL_NBR_UUID)
        print("Model Number: {0}".format("".join(map(chr, model_number))))

loop = asyncio.get_event_loop()
loop.run_until_complete(run(address))

See examples folder for more code, for instance example code for connecting to a TI SensorTag CC2650 <http://www.ti.com/ww/en/wireless_connectivity/sensortag/>_

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].