@@ -4,34 +4,40 @@ RootCanal is a virtual Bluetooth Controller. RootCanal aims reducing the
4
4
overhead of writing and deploying end-to-end tests on Bluetooth devices
5
5
by taking away the physical layer.
6
6
7
- ## Feature emulation
8
-
9
7
The emulation of Bluetooth features on RootCanal _ is limited to features
10
8
that have direct consequences on connected hosts_ . The accurate implementation
11
9
of HCI commands and events is thus critical to RootCanal's goal, while accurate
12
10
emulation of the scheduler and base-band is out of scope.
13
11
14
12
## Usage
15
13
16
- ### Emulator integration
14
+ RootCanal can be natively built or installed pre-compiled though the PyPI
15
+ ` rootcanal ` package. Both options have been tested with ` linux-x86_64 ` and
16
+ ` macos-arm64 ` , ` windows ` is not yet supported.
17
+
18
+ ### Build instructions
17
19
18
- RootCanal is natively integrated in the Cuttlefish and Goldfish emulators.
19
- Bluetooth is enabled by default on these platforms. External hosts can connect
20
- to the HCI port 7300 to interact with the emulated device.
20
+ ```
21
+ sudo apt install bazel rustc cargo
22
+ cargo install pdl-compiler --version 0.3.2
23
+ ```
21
24
22
- ### Standalone tool
25
+ ```
26
+ git clone https://github.com/google/rootcanal.git
27
+ cd rootcanal
28
+ git submodule update --init
29
+ bazel run :rootcanal
30
+ ```
23
31
24
- RootCanal can be built and started as a standalone tool.
25
- Instructions to build and run root-canal from an AOSP instance:
32
+ ### Python instructions
26
33
27
- ``` bash
28
- source build/envsetup.sh
29
- lunch aosp_cf_x86_64_phone-userdebug
30
- m root-canal
31
- ./out/host/linux-x86/bin/root-canal
32
34
```
33
- Note: You can also find a prebuilt version inside
34
- [ cvd-host_package.tar.gz from Android CI] [ cvd-host_package ]
35
+ pip install rootcanal
36
+ python -m rootcanal
37
+ ```
38
+
39
+ ### Launch options
40
+
35
41
The following configuration options are implemented:
36
42
37
43
* ` --test_port ` (default ` 6401 ` ) Configure the TCP port for the test channel.
@@ -45,7 +51,8 @@ The following configuration options are implemented:
45
51
* ` --controller_properties_file ` (default ` "" ` ) Configure the path to
46
52
a custom Controller configuration file. All properties defined in
47
53
` model/controller/controller_properties.h ` can be edited to test with a
48
- specific controller setup.
54
+ specific controller setup. The format of the configuration file is defined
55
+ by ` proto/rootcanal/configuration.proto `
49
56
50
57
* ` --enable_hci_sniffer ` (default ` false ` ) Capture PCAP traces for all
51
58
connected HCI hosts. The PCAP traces are saved in the current directory.
@@ -396,7 +403,3 @@ begin BR/EDR and LE dual phys.
396
403
| LE Set Data Related Address Changes | No |
397
404
| LE Set Default Subrate | No |
398
405
| LE Subrate Request | No |
399
-
400
- # Links
401
-
402
- [ 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
0 commit comments