From 673cf48eb66ab2f7a92ca86983a29c4f86e77566 Mon Sep 17 00:00:00 2001 From: Nasimovy Date: Sun, 17 Aug 2025 15:35:11 +0200 Subject: [PATCH] made changes to detection because it was completely wrong, CST226SE has 2 posible adresses --- src/detect/ScanI2CTwoWire.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/detect/ScanI2CTwoWire.cpp b/src/detect/ScanI2CTwoWire.cpp index fd3258bd0..f74ace0ea 100644 --- a/src/detect/ScanI2CTwoWire.cpp +++ b/src/detect/ScanI2CTwoWire.cpp @@ -470,8 +470,8 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize) SCAN_SIMPLE_CASE(PCT2075_ADDR, PCT2075, "PCT2075", (uint8_t)addr.address); case CST328_ADDR: // Do we have the CST328 or the CST226SE - registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xAB), 8); - if (registerValue == 0x3232365345) { + registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xAB), 1); + if (registerValue == 0xA9) { type = CST226SE; logFoundDevice("CST226SE", (uint8_t)addr.address); } else {