Once you’ve discovered the Whoop’s BLE services, you can connect to the device and start sending commands. There are several methods available, each with different trade-offs.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bWanShiTong/reverse-engineering-whoop-post/llms.txt
Use this file to discover all available pages before exploring further.
Connection Methods
The Whoop 4.0 uses BLE random addressing, so you must specify the address type when connecting.The Whoop’s MAC address changes periodically as part of BLE privacy features. You may need to rescan for the device.
Method 1: Python with pygatt
pygatt provides a Python interface to gatttool and works well for reading data and subscribing to notifications.
Basic Connection
Subscribing to Notifications
To receive data from the device:The
subscribe() method automatically enables notifications on the characteristic.Writing Commands (Limited Success)
Whilepygatt can write to characteristics, command execution is unreliable:
Method 2: gatttool (Recommended for Commands)
gatttool is a command-line tool that provides the most reliable way to send commands to the Whoop.
Basic Command Syntax
-i hci0- Bluetooth adapter to use-t random- Address type (required for Whoop)-b XX:XX:XX:XX:XX:XX- Device MAC address-a 0x0010- Handle for CMD_TO_STRAP characteristic-n <hex_data>- Command payload in hex
Example: Enable Heart Rate Broadcast
After enabling heart rate broadcast, you can read heart rate from any BLE heart rate monitor app using the standard service UUID
00002a37-0000-1000-8000-00805f9b34fb.Example: Set Alarm
To set an alarm to ring in 10 seconds:All commands require a valid CRC-32 checksum. See the Protocol Reference for details.
Method 3: Python with bleak
bleak is a cross-platform BLE library that works on Windows, macOS, and Linux.
Reading Heart Rate
Using the example from the bleak repository:Writing Commands with bleak
Like
pygatt, bleak may have reliability issues when writing commands. Results vary by platform and Bluetooth adapter.Method 4: BLE Scanner App (Quick Testing)
For quick command testing without code, you can use the BLE Scanner app:This method is proven to work reliably and is great for testing commands before implementing them in code.
Troubleshooting
”Could not find device” Error
- Ensure the device is nearby and not connected to the app
- The Whoop can only maintain one BLE connection at a time
- Try rescanning - the MAC address may have changed
Commands Not Working
- Verify the CRC-32 checksum is correct
- Check that you’re using the right handle (
0x0010for CMD_TO_STRAP) - Ensure you specified
-t randomfor the address type - Try using
gatttoolor the BLE Scanner app instead
Connection Drops
- Stay within ~10 meters of the device
- Avoid Bluetooth interference from other devices
- The Whoop may disconnect after inactivity
Permission Denied
Recommended Approach
For the most reliable reverse engineering workflow:- Use BLE Scanner app for initial command discovery and testing
- Use
gatttoolfor reliable command execution from scripts - Use Python (
pygattorbleak) for reading notifications and data analysis - Use Wireshark to capture and verify all communication
You can combine methods - for example, use
gatttool via Python’s subprocess module for reliable writes while using pygatt for notifications.