Fixed checksum error for encrypted meters

This commit is contained in:
Gunnar Skjold 2022-01-05 19:25:52 +01:00
parent 6fd8dc0432
commit 8fe1a1edf2
2 changed files with 1 additions and 2 deletions

View File

@ -693,7 +693,6 @@ bool readHanPort() {
debugI("Buffer overflow, resetting");
return false;
}
pos = HDLC_validate((uint8_t *) buf, len, hc, &timestamp);
if(pos == MBUS_FRAME_INTERMEDIATE_SEGMENT) {
debugI("Intermediate segment");
if(ma == NULL) {

View File

@ -22,7 +22,7 @@
#define MBUS_FRAME_LENGTH_NOT_EQUAL -40
#define MBUS_FRAME_INTERMEDIATE_SEGMENT -41
#define MBUS_FRAME_LAST_SEGMENT -42
#define MBUS_CHECKSUM_ERROR -3
#define MBUS_CHECKSUM_ERROR -2
struct HDLCConfig {
uint8_t encryption_key[32];