diff options
Diffstat (limited to 'interact/__init__.py')
-rw-r--r-- | interact/__init__.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/interact/__init__.py b/interact/__init__.py index faa92b2..dac3702 100644 --- a/interact/__init__.py +++ b/interact/__init__.py @@ -5,6 +5,7 @@ from blueberry.host_grpc import Host GRPC_PORT = 8999 + def run(profile: str, interaction_id: str, test: str, pts_addr: bytes): channel = grpc.insecure_channel(f'localhost:{GRPC_PORT}') print(f'{profile} mmi: {interaction_id}') @@ -12,6 +13,13 @@ def run(profile: str, interaction_id: str, test: str, pts_addr: bytes): a2dp.interact(channel, interaction_id, test, pts_addr) channel.close() + +def reset(): + channel = grpc.insecure_channel(f'localhost:{GRPC_PORT}') + Host(channel).Reset(wait_for_ready=True) + channel.close() + + def read_local_address() -> bytes: channel = grpc.insecure_channel(f'localhost:{GRPC_PORT}') bluetooth_address = Host(channel).ReadLocalAddress(wait_for_ready=True) |