FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: Askie am 11 August 2018, 18:52:49

Titel: Hex Checksumme in Perl umsetzen
Beitrag von: Askie am 11 August 2018, 18:52:49
Moin,
ich arbeite gerade an der Umsetzung eines VE.direct hex Protokolls zur Kommunikation mit meinem Inverter.
Leider gelingt mir die Umsetzung folgender Passage nicht:

"Where the colon indicates the start of the frame and the newline is the end of frame. The sum of all
data bytes and the check must equal 0x55. Since the normal protocol is in text values the frames are
sent in their hexadecimal ASCII representation, ['0' .. '9'], ['A' .. 'F'], must be uppercase. There is no
need to escape any characters.
: [command] [dataHighNibble, dataLowNibble][......] [checkHigh, checkLow] \n
Note: The command is only send as a single nibble. Numbers are sent in Little Endian format. An
error response with value 0xAAAA is sent on framing errors."

***Edit: Das Problem lag leider wischen den Ohren...erledigt

Hat jemand eine Idee, wie man das in Perl lösen kann?