Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
desktop/ | 03-May-2024 | - | 473 | 362 | ||
include/ | 03-May-2024 | - | 143 | 55 | ||
lmp/ | 03-May-2024 | - | 7,293 | 6,561 | ||
model/ | 03-May-2024 | - | 20,615 | 15,030 | ||
net/ | 03-May-2024 | - | 843 | 445 | ||
packets/ | 03-May-2024 | - | 525 | 443 | ||
scripts/ | 03-May-2024 | - | 1,781 | 1,275 | ||
test/ | 03-May-2024 | - | 4,987 | 3,667 | ||
Android.bp | D | 03-May-2024 | 8.5 KiB | 306 | 296 | |
Cargo.lock | D | 03-May-2024 | 13.4 KiB | 536 | 473 | |
Cargo.toml | D | 03-May-2024 | 622 | 21 | 18 | |
OWNERS | D | 03-May-2024 | 97 | 6 | 4 | |
README.md | D | 03-May-2024 | 1.7 KiB | 58 | 38 |
README.md
1# RootCanal 2 3RootCanal is a virtual Bluetooth Controller. 4Its goals include, but are not limited to: Bluetooth Testing and Emulation. 5 6## Usage 7 8RootCanal is usable: 9- With the Cuttlefish Virtual Device. 10- As a Host standalone binary. 11- As a Bluetooth HAL. 12- As a library. 13 14### Cuttlefish Virtual Device 15 16Cuttlefish enables RootCanal by default, refer to the Cuttlefish documentation 17for more informations 18 19### Host standalone binary 20 21```bash 22m root-canal # Build RootCanal 23out/host/linux-x86/bin/root-canal # Run RootCanal 24``` 25 26Note: You can also find a prebuilt version inside [cvd-host_package.tar.gz from Android CI][cvd-host_package] 27 28[cvd-host_package]: https://ci.android.com/builds/latest/branches/aosp-master/targets/aosp_cf_x86_64_phone-userdebug/view/cvd-host_package.tar.gz 29 30RootCanal when run as a host tool, exposes 4 ports by default: 31- 6401: Test channel port 32- 6402: HCI port 33- 6403: BR_EDR Phy port 34- 6404: LE Phy port 35 36### Bluetooth HAL 37 38A HAL using RootCanal is available as `android.hardware.bluetooth@1.1-service.sim` 39 40## Channels 41 42### HCI Channel 43 44The HCI channel uses the standard Bluetooth UART transport protocol (also known as H4) over TCP. 45You can refer to Vol 4, Part A, 2 of the Bluetooth Core Specification for more information. 46Each connection on the HCI channel creates a new virtual controller. 47 48### Test Channel 49 50The test channel uses a simple custom protocol to send test commands to RootCanal. 51You can connect to it using [scripts/test_channel.py](scripts/test_channel.py). 52 53### Phy Channels 54 55The physical channels uses a custom protocol described in [packets/link_layer_packets.pdl](packets/link_layer_packets.pdl) 56with a custom framing. 57**Warning:** The protocol can change in backward incompatible ways, be careful when depending on it. 58