tree: 34c4aa68cf02312dfb32b8ddc9d8e5f0a99fa565 [path history] [tgz]
  1. meta/
  2. src/

Mock Piconet Server

The Mock Piconet Server (MPS) component is used in integration tests for the Bluetooth profiles.

The server manages a fake piconet of peers, and simulates the behavior of the Profile Server. The component implements the ProfileTest protocol, which can be used to register mock peers in the piconet, launch profiles to test, and drive peer behavior. The server supports establishing L2CAP connections. For RFCOMM connections, test writers should use the RFCOMM component as an intermediary.

Build Configuration

To include the mock piconet server and its tests in your build, add:

--with //src/connectivity/bluetooth/testing/mock-piconet-server and --with //src/connectivity/bluetooth/testing/mock-piconet-server:tests to your fx set.

To run the unit tests for the server: fx test mock-piconet-server-tests.

The Mock Piconet Server is referenced using a relative URL. Make sure to include the MPS component in the deps of your integration test package.


The Mock Piconet Server provides a client-facing library of utilities to launch and interact with the server. To use the tools provided in the library, add //src/connectivity/bluetooth/testing/mock-piconet-server:lib to the of your test component.


Import the PiconetHarness to your test to get started. Define the topology by adding profiles-under-test or mock piconet members to be driven by the test code. Use the client library to route capabilities needed & exposed by the test. Check out the AVRCP Integration Tests for an example.