Bluetooth Low Energy
This module handles Bluetooth Low Energy (BLE) devices. It provides device discovery, services enumeration, and characteristic writing for unauthenticated devices.
Commands
Section titled “Commands”ble.recon on
Section titled “ble.recon on”Start BLE device discovery.
ble.recon off
Section titled “ble.recon off”Stop BLE device discovery.
ble.clear
Section titled “ble.clear”Clear all devices collected by the BLE discovery module.
ble.show
Section titled “ble.show”Show discovered BLE devices.
ble.enum MAC
Section titled “ble.enum MAC”Enumerate services and characteristics for the given BLE device.
ble.write MAC UUID HEX_DATA
Section titled “ble.write MAC UUID HEX_DATA”Write the HEX_DATA buffer to the BLE device with the specified MAC.
Writes to the characteristic with the given UUID.
Parameters
Section titled “Parameters”| Parameter | Default | Description |
|---|---|---|
ble.device | -1 | Index of the HCI device to use, -1 to autodetect. |
ble.show.filter | Defines a regular expression filter for ble.show. | |
ble.show.limit | 0 | If greater than zero, defines limit for ble.show. |
ble.show.sort | rssi asc | Defines sorting field (rssi, mac, or seen) and direction (asc or desc) for ble.show. |
ble.timeout | 5 | Connection timeout in seconds. |
ble.ttl | 30 | Seconds of inactivity for a device to be pruned. |
Examples
Section titled “Examples”Connect, enumerate and read characteristics from the BLE device 04:52:de:ad:be:ef (requires ble.recon on first):
ble.enum 04:52:de:ad:be:efWrite bytes to the device 04:52:de:ad:be:ef on characteristic 234bfbd5e3b34536a3fe723620d4b78d.
Requires ble.recon on first:
ble.write 04:52:de:ad:be:ef 234bfbd5e3b34536a3fe723620d4b78d ffffffffffffffffHacking a Loccess smartlock using bettercap: