Compare commits

..

1 Commits

Author SHA1 Message Date
Gilles Boccon-Gibod f6c7cae661 use correct own_address_type when restarting advertising 2023-09-22 10:33:36 -07:00
2 changed files with 8 additions and 4 deletions
+3 -1
View File
@@ -2758,7 +2758,9 @@ class Device(CompositeEventEmitter):
self.abort_on(
'flush',
self.start_advertising(
advertising_type=self.advertising_type, auto_restart=True
advertising_type=self.advertising_type,
own_address_type=self.advertising_own_address_type,
auto_restart=True,
),
)
+5 -3
View File
@@ -31,12 +31,14 @@ async def open_ws_client_transport(spec: str) -> Transport:
'''
Open a WebSocket client transport.
The parameter string has this syntax:
<websocket-url>
<remote-host>:<remote-port>
Example: ws://localhost:7681/v1/websocket/bt
Example: 127.0.0.1:9001
'''
websocket = await websockets.client.connect(spec)
remote_host, remote_port = spec.split(':')
uri = f'ws://{remote_host}:{remote_port}'
websocket = await websockets.client.connect(uri)
transport = PumpedTransport(
PumpedPacketSource(websocket.recv),