Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/gg_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ async def run(
await bridge.start()

# Wait until the source terminates
await hci_source.wait_for_termination()
await hci_source.terminated


@click.command()
Expand Down
2 changes: 1 addition & 1 deletion apps/l2cap_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ async def run(device_config, hci_transport, bridge):
await bridge.start(device)

# Wait until the transport terminates
await hci_source.wait_for_termination()
await hci_source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion apps/rfcomm_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ async def run(device_config, hci_transport, bridge):
await bridge.start(device)

# Wait until the transport terminates
await hci_source.wait_for_termination()
await hci_source.terminated
except core.ConnectionError as error:
print(color(f"!!! Bluetooth connection failed: {error}", "red"))
except Exception as error:
Expand Down
2 changes: 1 addition & 1 deletion apps/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ async def scan(
scanning_phys=scanning_phys,
)

await hci_source.wait_for_termination()
await hci_source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion apps/speaker/speaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ async def run(self, connect_address):
print("Waiting for connection...")
await self.advertise()

await hci_source.wait_for_termination()
await hci_source.terminated

for output in self.outputs:
await output.stop()
Expand Down
2 changes: 1 addition & 1 deletion examples/device_information_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def main() -> None:
# Go!
await device.power_on()
await device.start_advertising(auto_restart=True)
await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_a2dp_sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async def main() -> None:
await device.set_discoverable(True)
await device.set_connectable(True)

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_a2dp_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ async def read(byte_count):
await device.set_discoverable(True)
await device.set_connectable(True)

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_advertiser.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async def main() -> None:

await device.power_on()
await device.start_advertising(advertising_type=advertising_type, target=target)
await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_classic_discoverable.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async def main() -> None:
await device.set_discoverable(True)
await device.set_connectable(True)

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_classic_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async def main() -> None:
await device.power_on()
await device.start_discovery()

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_connect_and_encrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def main() -> None:
print(f'!!! Encryption failed: {error}')
return

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def main() -> None:
await device.start_advertising()
await device.start_scanning()

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_device_with_snooper.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def main() -> None:
await device.power_on()
await device.start_scanning()

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_gatt_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async def main() -> None:
else:
await device.start_advertising(auto_restart=True)

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_gatt_server_with_pairing_delegate.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async def main() -> None:
else:
await device.start_advertising(auto_restart=True)

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_gatt_with_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ async def main() -> None:
# Setup a server
await server(device)

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_hfp_handsfree.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ async def serve(websocket: websockets.asyncio.server.ServerConnection):

await websockets.asyncio.server.serve(serve, 'localhost', 8989)

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_hid_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ async def menu():
print("Executing in Web mode")
await keyboard_device(hid_device)

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_hid_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ async def menu():
# Interrupt Channel
await hid_host.connect_interrupt_channel()

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_rfcomm_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ async def main() -> None:
tcp_port = int(sys.argv[5])
asyncio.create_task(tcp_server(tcp_port, session))

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_rfcomm_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ async def main() -> None:
await device.set_discoverable(True)
await device.set_connectable(True)

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/run_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def on_adv(advertisement):
await device.power_on()
await device.start_scanning(filter_duplicates=filter_duplicates)

await hci_transport.source.wait_for_termination()
await hci_transport.source.terminated


# -----------------------------------------------------------------------------
Expand Down
Loading