wble-spawn: Spawn a BLE device
wble-spawn
creates a BLE device with a specific GATT profile and relays every
GATT operation to a real BLE device. This tool is intended to be used at the end
of a processing chain.
Usage
wble-spawn [OPTIONS]
A compatible WHAD interface and the path to a JSON profile are required to populate the BLE device with the corresponding services and characteristics. It will also allow wble-spawn to use the same advertising data, in order to make the emulated device appear the same way the original does.
Command-line options
wble-spawn supports the following options:
--interface
(-i
): specifies the WHAD interface to use to connect to the target device--profile
(-p
): specifies the GATT profile file (JSON) to use
It also supports the following debugging options:
--log
: if set, specifies the level of logging (must be one of the following, from the less verbose to the more verbose level): error, warn, info, debug--log-file FILE
: if set, logging will output messages to the specified fileFILE
instead of using standard output
Example
The following example first creates a JSON profile file using wble-central, then connects to the same device, launches Wireshark to monitor BLE packets and spawns a device based on the mydevice.json profile.
All the data exchanged between a central device that connects to the emulated peripheral will be logged by Wireshark.
# wble-central -i hci0 -b 11:22:33:44:55:66 profile mydevice.json
# wble-connect -i hci0 11:22:33:44:55:66 | wshark | wble-spawn -i hci1 -p mydevice.json