Skip to content

Commit

Permalink
Remove escaping (AA and A9) master data and CRC
Browse files Browse the repository at this point in the history
  • Loading branch information
csowada committed Mar 20, 2023
1 parent ab3f59f commit 0221fc7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

## Unreleased

## [1.1.9] - 2023-03-20
### Fixed
- Remove escaping (0xAA and 0xA) master data bytes and master CRC on function ``EBusCommandUtils.buildPartMasterTelegram``

## [1.1.8] - 2021-12-29
### Changed
- Update project dependencies
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/de/csdev/ebus/command/EBusCommandUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,19 @@ public static byte unescapeSymbol(byte reversedByte) {

// add the escaped bytes
for (byte b : masterData) {
buf.put(escapeSymbol(b));
// disable escaping the special characters as vaillant and wolf
// generates AA and A9 bytes!
// buf.put(escapeSymbol(b));
buf.put(b);
}

// calculate crc
byte crc8 = EBusUtils.crc8(buf.array(), buf.position());

buf.put(escapeSymbol(crc8));
// disable escaping the special characters as vaillant and wolf
// generates AA and A9 bytes!
// buf.put(escapeSymbol(b));
buf.put(crc8);

// set limit and reset position
buf.limit(buf.position());
Expand Down

0 comments on commit 0221fc7

Please sign in to comment.