Sure! Here's a short README.md
for your code:
This project measures the throughput of a Bluetooth Low Energy (BLE) device using the Nordic Throughput Service.
- Python 3.7+
- bleak library
Install the required library using pip:
pip install bleak
-
Clone the repository:
git clone https://github.com/MoritzSpiller/BLE-Throughput-Tester-Py.git cd BLE-Throughput-Tester
-
Run the script:
python main.py
device_found(device, advertisement_data)
: Callback function when a device is found during scanning.notification_handler(characteristic, data)
: Handles notifications and processes the received data.calculate_throughput()
: Calculates the throughput based on bytes received and time.main()
: Main function to scan for devices, connect to the target device, and measure throughput.
The script uses Python's logging
module to log information. The log level is set to INFO
by default.
This project is licensed under the MIT License.