2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-25 09:55:38 +00:00

WMBus.pm: create error message for payload in SML format

git-svn-id: https://svn.fhem.de/fhem/trunk@28056 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
kaihs 2023-10-15 15:15:22 +00:00
parent 91c051dd39
commit 518e436619

View File

@ -2145,6 +2145,13 @@ sub decodeApplicationLayer($) {
$self->decodeConfigword(); $self->decodeConfigword();
if ($self->{cifield} == CI_RESP_SML_4 || $self->{cifield} == CI_RESP_SML_12) {
# payload is SML encoded, that's not implemented
$self->{errormsg} = "payload is SML encoded, can't be decoded, SML payload is " . unpack("H*", substr($applicationlayer,$offset));
$self->{errorcode} = ERR_SML_PAYLOAD;
return 0;
}
$self->{encryptionMode} = $encryptionModes{$self->{cw_parts}{mode}}; $self->{encryptionMode} = $encryptionModes{$self->{cw_parts}{mode}};
if ($self->{cw_parts}{mode} == 0) { if ($self->{cw_parts}{mode} == 0) {
# no encryption # no encryption
@ -2219,14 +2226,7 @@ sub decodeApplicationLayer($) {
return 0; return 0;
} }
if ($self->{cifield} == CI_RESP_SML_4 || $self->{cifield} == CI_RESP_SML_12) {
# payload is SML encoded, that's not implemented
$self->{errormsg} = "payload is SML encoded, can't be decoded, SML payload is " . unpack("H*", substr($applicationlayer,$offset));
$self->{errorcode} = ERR_SML_PAYLOAD;
return 0;
} else {
return $self->decodePayload($payload); return $self->decodePayload($payload);
}
} }