From f54a5dc7ecc7ea89f474e8348e2bc08bb545469d Mon Sep 17 00:00:00 2001 From: Kavish Devar Date: Sun, 29 Sep 2024 00:26:06 +0530 Subject: [PATCH] send unparsed data to client --- start-daemon.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/start-daemon.py b/start-daemon.py index 8233a46..efb751d 100644 --- a/start-daemon.py +++ b/start-daemon.py @@ -53,7 +53,9 @@ def handle_client(connection, client_socket): } data: str = JSONEncoder().encode(earDetectionJSON) else: - logging.warning(f"Unhandled notification type: {notif_key}") + logging.debug(f"Unhandled notification type: {notif_key}") + logging.debug(f"Data: {data}") + data: str = JSONEncoder().encode({"type": "unknown", "data": data}) continue if not client_socket or not isinstance(client_socket, socket.socket): @@ -160,6 +162,7 @@ def notification_handler(notification_type: int, data: bytes): elif notification_type == Notifications.UNKNOWN: logger = logging.getLogger("Unknown Notification") hex_data = ' '.join(f'{byte:02x}' for byte in data) + globals()["notif_unknown"] = hex_data logger.debug(hex_data) def main():