• Home
Name Date Size #Lines LOC

..--

desktop/03-May-2024-473362

include/03-May-2024-14355

lmp/03-May-2024-7,2936,561

model/03-May-2024-20,61515,030

net/03-May-2024-843445

packets/03-May-2024-525443

scripts/03-May-2024-1,7811,275

test/03-May-2024-4,9873,667

Android.bpD03-May-20248.5 KiB306296

Cargo.lockD03-May-202413.4 KiB536473

Cargo.tomlD03-May-2024622 2118

OWNERSD03-May-202497 64

README.mdD03-May-20241.7 KiB5838

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