From 3c5d40722c28501badcb2fbbb30c9191705ddd54 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 3 May 2021 14:30:24 +0200 Subject: [PATCH] tool/compile_gatt: fix database hash calculation for Characteristic handle --- tool/compile_gatt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tool/compile_gatt.py b/tool/compile_gatt.py index 3a5dde651..7a5cd702c 100755 --- a/tool/compile_gatt.py +++ b/tool/compile_gatt.py @@ -537,7 +537,6 @@ def parseCharacteristic(fout, parts): write_16(fout, handle+1) write_uuid(fout, uuid) fout.write("\n") - handle = handle + 1 total_size = total_size + size database_hash_append_uint16(handle) @@ -546,6 +545,8 @@ def parseCharacteristic(fout, parts): database_hash_append_uint16(handle+1) database_hash_append_value(uuid) + handle = handle + 1 + uuid_is_database_hash = len(uuid) == 2 and uuid[0] == 0x2a and uuid[1] == 0x2b size = 2 + 2 + 2 + uuid_size