Bleico¶
Bluetooth Low Energy System Tray Utility¶
Bleico is a system tray application/tool to scan, connect, explore and debug Bluetooth low energy devices which are compliant with Bluetooth SIG GATT Characteristics.
- Lincense: GPL-3.0
- Documentation: https://bleico.readthedocs.io.
It is based on bleak, bleak-sigspec and PyQt5
Features¶
- Bluetooth Low Energy Scanner
- System Tray Menu with:
- Icon according to Appearance characteristic (if present)
- Device Name
- Device UUID
- Services and Characteristics menu tree
- Characteristic Metadata view
- Device information (if present)
- Readable and writeable Characteristics organised in sections by services
- Read periodically from Characteristics
- Write to Characteristics (from menu or dialog box)
- Enable desktop notifications on notifiable Characteristics
- Configurable tool tip
- Last update, Connection status and RSSI
- Desktop Notification on Connection status changes (can be disabled).
- Automatic Reconnection on disconnect, in 30 seconds cycles until reconnected.
Command Line Tool vs Standalone Application¶
Bleico comes in two versions, as a command line tool e.g:
$ bleico -h
usage: bleico [Mode] [options]
Bluetooth Low Energy System Tray Utility
positional arguments:
Mode Mode:
- config
- run
optional arguments:
-h, --help show this help message and exit
-v show program's version number and exit
-t T device target uuid
-s show scanner with available devices
-r R read timeout in seconds, default: 1
-dflev DFLEV debug file mode level, options [debug, info, warning, error, critical]
-dslev DSLEV debug sys out mode level, options [debug, info, warning, error, critical]
Or as a standalone application
The only difference is that with the command line tool, every event is logged to the console so any error can be easily debbuged. .e.g:
$ bleico run
************************************************************
$$$$$$$\ $$\ $$$$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\
$$ __$$\ $$ | $$ _____|\_$$ _|$$ __$$\ $$ __$$\
$$ | $$ |$$ | $$ | $$ | $$ / \__|$$ / $$ |
$$$$$$$\ |$$ | $$$$$\ $$ | $$ | $$ | $$ |
$$ __$$\ $$ | $$ __| $$ | $$ | $$ | $$ |
$$ | $$ |$$ | $$ | $$ | $$ | $$\ $$ | $$ |
$$$$$$$ |$$$$$$$$\ $$$$$$$$\ $$$$$$\ \$$$$$$ | $$$$$$ |
\_______/ \________|\________|\______| \______/ \______/
************************************************************
2020-09-10 22:27:20,153 [bleico] [MainThread] [INFO] Running bleico 0.0.1
2020-09-10 22:27:23,544 [bleico] [MainThread] [INFO] Connected to: 9998175F-9A91-4CA2-B5EA-482AFC3453B9
2020-09-10 22:27:24,540 [bleico] [MainThread] [INFO] Device esp32-batt-temp found
2020-09-10 22:27:24,541 [bleico] [MainThread] [INFO] Services:
2020-09-10 22:27:24,541 [bleico] [MainThread] [INFO] (S) Device Information
2020-09-10 22:27:24,541 [bleico] [MainThread] [INFO] (C) - Appearance
2020-09-10 22:27:24,541 [bleico] [MainThread] [INFO] (C) - Manufacturer Name String
2020-09-10 22:27:24,541 [bleico] [MainThread] [INFO] (C) - Model Number String
2020-09-10 22:27:24,541 [bleico] [MainThread] [INFO] (C) - Serial Number String
2020-09-10 22:27:24,541 [bleico] [MainThread] [INFO] (C) - Firmware Revision String
2020-09-10 22:27:24,541 [bleico] [MainThread] [INFO] (C) - Hardware Revision String
2020-09-10 22:27:24,541 [bleico] [MainThread] [INFO] (C) - Software Revision String
2020-09-10 22:27:24,541 [bleico] [MainThread] [INFO] (S) Battery Service
2020-09-10 22:27:24,542 [bleico] [MainThread] [INFO] (C) - Battery Level
2020-09-10 22:27:24,542 [bleico] [MainThread] [INFO] (C) - Battery Power State
2020-09-10 22:27:24,542 [bleico] [MainThread] [INFO] (S) Environmental Sensing
2020-09-10 22:27:24,542 [bleico] [MainThread] [INFO] (C) - Temperature
2020-09-10 22:27:24,542 [bleico] [MainThread] [INFO] (C) - Temperature Range
2020-09-10 22:27:24,542 [bleico] [MainThread] [INFO] Device: esp32-batt-temp, UUID: 9998175F-9A91-4CA2-B5EA-482AFC3453B9
2020-09-10 22:27:24,542 [bleico] [MainThread] [INFO] Device Information:
2020-09-10 22:27:24,542 [bleico] [MainThread] [INFO] - Appearance: Generic Thermometer
2020-09-10 22:27:24,542 [bleico] [MainThread] [INFO] - Manufacturer Name : Espressif Incorporated
2020-09-10 22:27:24,542 [bleico] [MainThread] [INFO] - Model Number : ESP32 module with ESP32
2020-09-10 22:27:24,542 [bleico] [MainThread] [INFO] - Serial Number : 30:AE:A4:23:35:64
2020-09-10 22:27:24,543 [bleico] [MainThread] [INFO] - Firmware Revision : micropython-1.13.0
2020-09-10 22:27:24,543 [bleico] [MainThread] [INFO] - Hardware Revision : esp32
2020-09-10 22:27:24,543 [bleico] [MainThread] [INFO] - Software Revision : 3.4.0
2020-09-10 22:27:24,552 [bleico] [MainThread] [INFO] Multithreading with maximum 4 threads
2020-09-10 22:27:24,687 [bleico] [MainThread] [INFO] [Battery Service] Battery Level: 96 %
2020-09-10 22:27:24,687 [bleico] [MainThread] [INFO] [Environmental Sensing] Temperature: 25.03 °C
2020-09-10 22:27:24,688 [bleico] [MainThread] [INFO] [Environmental Sensing] Temperature Range Minimum Temperature: 15.0 °C
2020-09-10 22:27:24,688 [bleico] [MainThread] [INFO] [Environmental Sensing] Temperature Range Maximum Temperature: 28.0 °C
2020-09-10 22:27:25,782 [bleico] [MainThread] [INFO] [Battery Service] Battery Level: 96 %
2020-09-10 22:27:25,782 [bleico] [MainThread] [INFO] [Environmental Sensing] Temperature: 25.03 °C
2020-09-10 22:27:25,782 [bleico] [MainThread] [INFO] [Environmental Sensing] Temperature Range Minimum Temperature: 15.0 °C
2020-09-10 22:27:25,782 [bleico] [MainThread] [INFO] [Environmental Sensing] Temperature Range Maximum Temperature: 28.0 °C
Installation¶
Command Line Tool¶
Install
bleicoby running:$ pip install bleicoOr get latest development version:
$ pip install https://github.com/Carglglz/bleico/tree/develop.zip
Compatibility¶
Right now [1] bleico is compatible only with devices that exposes GATT services/characteristics defined by Bluetooth SIG Specifications.
Added in bleico v0.0.2:¶
- Compatibility with Nordic UART RX, Nordic UART TX characteristics.
It assumes also a simple behaviour where bleico can connect to a device (acting as a peripheral-server) that does not require authentication or an initial writing to a descriptor or control point in order to read/write or subscribe to notifications/indications of any of its characteristics.
| [1] | See bleak-sigspec to look into adding a custom/vendor characteristic |