Skip to content
Merged
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
4 changes: 3 additions & 1 deletion src/infuse_iot/tools/bt_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
default_multicast_address,
)
from infuse_iot.tdf import TDF
from infuse_iot.util.console import Console


class SubCommand(InfuseCommand):
Expand Down Expand Up @@ -45,12 +46,13 @@ def run(self):
if self._data:
types |= GatewayRequestConnectionRequest.DataType.DATA
with self._client.connection(self._id, types, self._conn_timeout) as _:
Console.log_info(f"Connected to {self._id:016x} ({types.name})")
while True:
evt = self._client.receive()
if evt is None:
continue
if isinstance(evt, ClientNotificationConnectionDropped):
print(f"Connection to {self._id:016x} lost")
Console.log_error(f"Connection to {self._id:016x} lost")
break
if not isinstance(evt, ClientNotificationEpacketReceived):
continue
Expand Down