From 33d8a31d9b4fba34c9d9108c51f039a7b85e879d Mon Sep 17 00:00:00 2001 From: Niek Hombrouckx Date: Wed, 14 Jan 2026 21:44:29 +0100 Subject: [PATCH 1/2] Fix MAX_ADVERT_DATA_SIZE and MAX_PACKET_PAYLOAD constants to align with protocol specifications --- src/pymc_core/protocol/constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pymc_core/protocol/constants.py b/src/pymc_core/protocol/constants.py index d5b23d9..4ec6830 100644 --- a/src/pymc_core/protocol/constants.py +++ b/src/pymc_core/protocol/constants.py @@ -45,13 +45,13 @@ # --------------------------------------------------------------------------- # Misc sizes # --------------------------------------------------------------------------- -MAX_ADVERT_DATA_SIZE = 96 +MAX_ADVERT_DATA_SIZE = 32 PUB_KEY_SIZE = 32 SIGNATURE_SIZE = 64 PATH_HASH_SIZE = 1 CIPHER_MAC_SIZE = 32 # SHA‑256 HMAC CIPHER_BLOCK_SIZE = 16 -MAX_PACKET_PAYLOAD = 256 # firmware's default +MAX_PACKET_PAYLOAD = 184 # firmware's default MAX_PATH_SIZE = 64 MAX_PACKET_PAYLOAD = 256 From 596351280694e95e64b651c073a26020989bcbe4 Mon Sep 17 00:00:00 2001 From: Niek Hombrouckx Date: Wed, 14 Jan 2026 21:52:42 +0100 Subject: [PATCH 2/2] Remove double declaration of MAX_PACKET_PAYLOAD --- src/pymc_core/protocol/constants.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pymc_core/protocol/constants.py b/src/pymc_core/protocol/constants.py index 4ec6830..3859b87 100644 --- a/src/pymc_core/protocol/constants.py +++ b/src/pymc_core/protocol/constants.py @@ -54,7 +54,6 @@ MAX_PACKET_PAYLOAD = 184 # firmware's default MAX_PATH_SIZE = 64 -MAX_PACKET_PAYLOAD = 256 MAX_HASH_SIZE = 32 # SHA-256 truncated NAME_MAX_LEN = 16 # Max length of a contact name