Programming Bluetooth with Python on Linux

Python is an increasingly popular programming language due to its simplicity and readability. The gatt-python library for Python that facilitates the implementation and communication with Bluetooth Low Energy devices using the Generic Attribute Profile (GATT). GATT is the specification for the transmission and reception of short data over a Bluetooth Low Energy link.

The SDK supports a range of functionalities, including device discovery, connection and disconnection, custom GATT profile implementation and access to all Bluetooth GATT services and characteristics. It also allows for reading and writing characteristic values and subscribing to notifications for changes in these values. The library is only compatible with Linux because it uses the D-Bus API of BlueZ for Bluetooth device interaction.

Bluetooth LE Supported on Zerynth

There’s a growing number of operating systems for microcontrollers on single board computers, most of which can scan for Bluetooth LE devices such as beacons and connect to them via GATT for setup and extraction of data. Zerynth is now one such OS that you can program using Python.
Zerynth r2.2.0 update allows use of Bluetooth LE.

There’s a new article on Design Bluetooth BLE Applications in Python on ESP32 using Zerynth. The official documentation provides lots of examples.