Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fbiego/ble-cloner-arduino
The BLE Cloner project provides a Python script to clone the services, characteristics, and advertising data of a BLE device, generating an Arduino sketch to emulate it on an ESP32 using the NimBLE library.
https://github.com/fbiego/ble-cloner-arduino
arduino ble bleak clone cloner esp32 nimble python
Last synced: 20 days ago
JSON representation
The BLE Cloner project provides a Python script to clone the services, characteristics, and advertising data of a BLE device, generating an Arduino sketch to emulate it on an ESP32 using the NimBLE library.
- Host: GitHub
- URL: https://github.com/fbiego/ble-cloner-arduino
- Owner: fbiego
- License: mit
- Created: 2024-06-02T06:36:01.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-02T06:42:05.000Z (8 months ago)
- Last Synced: 2024-11-07T04:43:51.282Z (2 months ago)
- Topics: arduino, ble, bleak, clone, cloner, esp32, nimble, python
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BLE Cloner for Arduino
This project provides a Python script to clone the services, characteristics, and advertising data of a BLE device. It then generates an Arduino sketch that, when flashed to an ESP32, emulates the original BLE device using the NimBLE library.
## Prerequisites
Before running the script, ensure you have the `bleak` library installed:
```bash
pip install bleak
```
## Running the ScriptTo run the script, execute the following command in your terminal:
```bash
python ble.py
```## Usage
1. **Scan for BLE Devices**:
- The script will scan for BLE devices for 10 seconds and display a list of found devices.2. **Select a Device**:
- Choose the device you want to clone by entering its index from the displayed list.3. **Generate Arduino Sketch**:
- After selecting the device, an Arduino sketch will be created with the same services, characteristics, and advertising data as the original device.## Flashing the Sketch
1. **Open Arduino IDE**:
- Open the generated Arduino sketch in the Arduino IDE.2. **Connect ESP32**:
- Connect your ESP32 to your computer.3. **Select Board and Port**:
- In the Arduino IDE, select the appropriate board (e.g., ESP32 Dev Module) and port.4. **Upload Sketch**:
- Upload the sketch to your ESP32.This will create a BLE device on the ESP32 with similar services, characteristics, and advertising data as the cloned device.
## Example Output
After running the script and selecting a device, you will see the cloned services, characteristics, and advertising data printed in the console. An Arduino sketch file will be generated that you can use with the ESP32.