13 BLUETOOTH - geo-tp/ESP32-Bus-Pirate GitHub Wiki

Bluetooth Mode

This mode enables various Bluetooth operations such as device scanning, pairing, spoofing, sending HID data (keyboard, mouse), and passive sniffing.


🧩 Commands

Command Description
scan Scans for nearby Bluetooth devices for 10 seconds and lists them
pair <mac> Attempts to pair with and discover services from a remote device
spoof <mac> Overrides the ESP32's Bluetooth MAC address (must run before any BT action)
sniff Starts a passive sniffer that logs nearby Bluetooth traffic
status Displays the current Bluetooth mode, MAC address, and connection status
server [name] Starts a BLE HID server named name (default: Bus-Pirate-Bluetooth)
keyboard <text> Sends a text string over BLE HID keyboard (requires server to be started)
mouse <x> <y> Sends a relative mouse movement
mouse move <x> <y> Alternative form to move the BLE mouse cursor
mouse click Sends a single mouse left-click over BLE HID
reset Stops any active Bluetooth session and resets the Bluetooth subsystem

📝 Notes

  • scan is passive and does not connect to found devices.
  • pair enables client mode and attempts to connect to the provided MAC address.
  • spoof must be used before any connection is established; reboot or use reset before.
  • sniff works even if no connection is active, and logs nearby advertisements and traffic.
  • server initializes BLE HID mode so the device can act as a keyboard or mouse.
  • keyboard, mouse, and mouse click only work in server mode (BLE HID).
  • reset is useful to clear the Bluetooth state (e.g., before re-pairing or spoofing).
  • Keyboard and mouse actions follow standard HID protocol behavior.
  • Bluetooth HID commands will not work unless server has been started and a device is connected.

📌 Example Usage

mode bluetooth
scan
pair 7C:9E:BD:DE:AD:BE
spoof 12:34:56:78:9A:BC
sniff
server My-BLE-Device
server
keyboard Hello world
mouse -100 -50
mouse move 100 100
mouse click
reset
⚠️ **GitHub.com Fallback** ⚠️