RootCanal is a virtual Bluetooth Controller. Its goals include, but are not limited to: Bluetooth Testing and Emulation.
RootCanal is usable:
Cuttlefish enables RootCanal by default, refer to the Cuttlefish documentation for more informations
m root-canal # Build RootCanal out/host/linux-x86/bin/root-canal # Run RootCanal
Note: You can also find a prebuilt version inside cvd-host_package.tar.gz from Android CI
RootCanal when run as a host tool, exposes 4 ports by default:
A HAL using RootCanal is available as android.hardware.bluetooth@1.1-service.sim
The HCI channel uses the standard Bluetooth UART transport protocol (also known as H4) over TCP. You can refer to Vol 4, Part A, 2 of the Bluetooth Core Specification for more information. Each connection on the HCI channel creates a new virtual controller.
The test channel uses a simple custom protocol to send test commands to RootCanal. You can connect to it using scripts/test_channel.py.
The physical channels uses a custom protocol described in packets/link_layer_packets.pdl with a custom framing. Warning: The protocol can change in backward incompatible ways, be careful when depending on it.