From a8e3db688bc78aebe9bcafbd2a3cd88d40e1a579 Mon Sep 17 00:00:00 2001 From: lfierz Date: Wed, 11 Dec 2024 18:38:59 +0100 Subject: [PATCH 1/2] fix download definition T_RH_VOC_NOX_PM25 the download pack can only contain one sample, as the max download data pack size is 20 bytes (2bytes reserved for the sequence number) this fixes a crash when starting a data download for a gadget built with the arduino-ble-gadget lib and sample config T_RH_VOC_NOX_PM25, e.g. used for SEN55 --- src/BLEProtocol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BLEProtocol.cpp b/src/BLEProtocol.cpp index e4bbe3a..3c87a04 100644 --- a/src/BLEProtocol.cpp +++ b/src/BLEProtocol.cpp @@ -194,7 +194,7 @@ std::map sampleConfigSelector = { .downloadType = 23, .sampleType = 24, .sampleSizeBytes = 10, - .sampleCountPerPacket = 2, + .sampleCountPerPacket = 1, .sensirionAdvertisementSampleType = 0, .sampleSlots = {{SignalType::TEMPERATURE_DEGREES_CELSIUS, {.signalType = SignalType::TEMPERATURE_DEGREES_CELSIUS, From f8f71f810bf0bce7b9c36678c3c009cd09409f3d Mon Sep 17 00:00:00 2001 From: lfierz Date: Wed, 11 Dec 2024 18:45:11 +0100 Subject: [PATCH 2/2] prepare bugfix 0.5.1 --- CHANGELOG.md | 9 +++++++++ library.properties | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e4a2a9..1477e3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [0.5.1] - 2024-12-11 + +### Fixed + +- Fix download definition T_RH_VOC_NOX_PM25 to only have 1 sample per download pack. + With 2 there was a buffer overflow leading to a crash when starting a data download + for a gadget built with arduino-ble-gadget using T_RH_VOC_NOX_PM25 (e.g. SEN55 Example) + The fixed definition is supported by MyAmbience Version 3.5.0 onwards. + ## [0.5.0] - 2024-09-09 ### Added diff --git a/library.properties b/library.properties index 6db3c50..292f6b2 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Sensirion UPT Core -version=0.5.0 +version=0.5.1 author=Jonas Stolle, Maximilian Paulsen maintainer=Sensirion AG sentence=Library for definitions and configurations used by other Sensirion Unified Prototyping Toolkit (UPT) libraries.