D2 Relay is a small tool to relay measurements of a Leica DISTO™ D2 device to the console.
© Copyrights 2021-2025 Hartmut Seichter
Create a venv
[me@machine d2relay]$ python -m venv .venv
Activate the venv:
[me@machine d2relay]$ source .venv/bin/activate
Activate the venv:
(.venv) [me@machine d2relay]$ pip install -r requirements.txt
Check usage ...
(.venv) [me@machine d2relay]$ python -m app --help
usage: d2relay [-h] [--address ADDRESS]
a tool for reading out Leica Disto D2 devices over BLE
options:
-h, --help show this help message and exit
--address ADDRESS BLE address for Disto D2, default: FD:8B:B0:50:BA:A3
There are many ways to collaborate, please open an issue or a pull request. Some ideas:
- create a proper d2relay module to encapsulate the functionality
- support other Leica BLE devices (or some relabeled Bosch devices)
Plenty of hints can be found in my notes while reverse engineering my device.
- Infer correct units
- Detect error states such as 255 (too close)
- Make things configurable by using command line parameters
- Interactive Mode: trigger measurements over BT
- Demonstrator with FreeCAD or the like
d2relay is © 2021-2025 Hartmut Seichter - licenses under the terms MIT licence